Codebase list libesedb / 02c4a8a
New upstream version 20170121 Hilko Bengen 7 years ago
883 changed file(s) with 35788 addition(s) and 23656 deletion(s). Raw diff Collapse all Expand all
00 Acknowledgements: libesedb
11
2 Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
2 Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
33
156156 * read catalog data type defintions and convert them into column definitions?
157157 - no
158158
159 20160902
160 * worked on tests
161
159162 20160110
160163 * worked on Python 3 support
161164
22 SUBDIRS = \
33 include \
44 common \
5 libcstring \
65 libcerror \
76 libcthreads \
87 libcdata \
2221 libesedb \
2322 libfmapi \
2423 libmapidb \
25 libcsystem \
2624 esedbtools \
2725 pyesedb \
2826 pyesedb-python2 \
8482
8583 library:
8684 (cd $(srcdir)/common && $(MAKE) $(AM_MAKEFLAGS))
87 (cd $(srcdir)/libcstring && $(MAKE) $(AM_MAKEFLAGS))
8885 (cd $(srcdir)/libcerror && $(MAKE) $(AM_MAKEFLAGS))
8986 (cd $(srcdir)/libcthreads && $(MAKE) $(AM_MAKEFLAGS))
9087 (cd $(srcdir)/libcdata && $(MAKE) $(AM_MAKEFLAGS))
117114 done && test -z "$$fail"
118115
119116 splint:
120 (cd $(srcdir)/libcstring && $(MAKE) splint $(AM_MAKEFLAGS))
121117 (cd $(srcdir)/libcerror && $(MAKE) splint $(AM_MAKEFLAGS))
122118 (cd $(srcdir)/libcthreads && $(MAKE) splint $(AM_MAKEFLAGS))
123119 (cd $(srcdir)/libcdata && $(MAKE) splint $(AM_MAKEFLAGS))
137133 (cd $(srcdir)/libesedb && $(MAKE) splint $(AM_MAKEFLAGS))
138134 (cd $(srcdir)/libfmapi && $(MAKE) splint $(AM_MAKEFLAGS))
139135 (cd $(srcdir)/libmapidb && $(MAKE) splint $(AM_MAKEFLAGS))
140 (cd $(srcdir)/libcsystem && $(MAKE) splint $(AM_MAKEFLAGS))
141136 (cd $(srcdir)/esedbtools && $(MAKE) splint $(AM_MAKEFLAGS))
142137 (cd $(srcdir)/pyesedb && $(MAKE) splint $(AM_MAKEFLAGS))
143138 (cd $(srcdir)/po && $(MAKE) $(AM_MAKEFLAGS))
9797 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9898 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9999 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101100 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102101 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103102 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
108107 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109108 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110109 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
110 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
111 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
113112 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114113 $(ACLOCAL_M4)
115114 DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
214213 $(top_srcdir)/include/libesedb/features.h.in \
215214 $(top_srcdir)/include/libesedb/types.h.in ABOUT-NLS AUTHORS \
216215 COPYING ChangeLog INSTALL NEWS README compile config.guess \
217 config.rpath config.sub depcomp install-sh ltmain.sh missing
216 config.rpath config.sub install-sh ltmain.sh missing
218217 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
219218 distdir = $(PACKAGE)-$(VERSION)
220219 top_distdir = $(distdir)
298297 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
299298 HAVE_LIBCPATH = @HAVE_LIBCPATH@
300299 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
301 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
302 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
303300 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
304301 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
305302 HAVE_LIBFDATA = @HAVE_LIBFDATA@
318315 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
319316 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
320317 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
321 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
322 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
323318 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
324319 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
325320 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
366361 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
367362 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
368363 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
369 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
370 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
371 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
372 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
373364 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
374365 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
375366 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
402393 LTLIBICONV = @LTLIBICONV@
403394 LTLIBINTL = @LTLIBINTL@
404395 LTLIBOBJS = @LTLIBOBJS@
396 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
405397 MAKEINFO = @MAKEINFO@
406398 MANIFEST_TOOL = @MANIFEST_TOOL@
407399 MKDIR_P = @MKDIR_P@
508500 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
509501 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
510502 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
511 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
512 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
513 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
514 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
515 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
516 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
517503 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
518504 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
519505 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
582568 libcpath_LIBS = @libcpath_LIBS@
583569 libcsplit_CFLAGS = @libcsplit_CFLAGS@
584570 libcsplit_LIBS = @libcsplit_LIBS@
585 libcstring_CFLAGS = @libcstring_CFLAGS@
586 libcstring_LIBS = @libcstring_LIBS@
587 libcsystem_CFLAGS = @libcsystem_CFLAGS@
588 libcsystem_LIBS = @libcsystem_LIBS@
589571 libcthreads_CFLAGS = @libcthreads_CFLAGS@
590572 libcthreads_LIBS = @libcthreads_LIBS@
591573 libdir = @libdir@
638620 SUBDIRS = \
639621 include \
640622 common \
641 libcstring \
642623 libcerror \
643624 libcthreads \
644625 libcdata \
658639 libesedb \
659640 libfmapi \
660641 libmapidb \
661 libcsystem \
662642 esedbtools \
663643 pyesedb \
664644 pyesedb-python2 \
12221202
12231203 library:
12241204 (cd $(srcdir)/common && $(MAKE) $(AM_MAKEFLAGS))
1225 (cd $(srcdir)/libcstring && $(MAKE) $(AM_MAKEFLAGS))
12261205 (cd $(srcdir)/libcerror && $(MAKE) $(AM_MAKEFLAGS))
12271206 (cd $(srcdir)/libcthreads && $(MAKE) $(AM_MAKEFLAGS))
12281207 (cd $(srcdir)/libcdata && $(MAKE) $(AM_MAKEFLAGS))
12551234 done && test -z "$$fail"
12561235
12571236 splint:
1258 (cd $(srcdir)/libcstring && $(MAKE) splint $(AM_MAKEFLAGS))
12591237 (cd $(srcdir)/libcerror && $(MAKE) splint $(AM_MAKEFLAGS))
12601238 (cd $(srcdir)/libcthreads && $(MAKE) splint $(AM_MAKEFLAGS))
12611239 (cd $(srcdir)/libcdata && $(MAKE) splint $(AM_MAKEFLAGS))
12751253 (cd $(srcdir)/libesedb && $(MAKE) splint $(AM_MAKEFLAGS))
12761254 (cd $(srcdir)/libfmapi && $(MAKE) splint $(AM_MAKEFLAGS))
12771255 (cd $(srcdir)/libmapidb && $(MAKE) splint $(AM_MAKEFLAGS))
1278 (cd $(srcdir)/libcsystem && $(MAKE) splint $(AM_MAKEFLAGS))
12791256 (cd $(srcdir)/esedbtools && $(MAKE) splint $(AM_MAKEFLAGS))
12801257 (cd $(srcdir)/pyesedb && $(MAKE) splint $(AM_MAKEFLAGS))
12811258 (cd $(srcdir)/po && $(MAKE) $(AM_MAKEFLAGS))
1616
1717 Also see:
1818
19 * Forensic analysis of the Windows Search database: https://googledrive.com/host/0B3fBvzttpiiSN082cmxsbHB0anc/Forensic%20analysis%20of%20the%20Windows%20Search%20database.pdf
19 * Forensic analysis of the Windows Search database: https://github.com/libyal/documentation/blob/master/Forensic%20analysis%20of%20the%20Windows%20Search%20database.pdf
2020 * Extensible Storage Engine (ESE) Database File Knowledge Base: https://github.com/libyal/esedb-kb
2121
2222 For more information see:
00 dnl Function to detect if libesedb dependencies are available
11 AC_DEFUN([AX_LIBESEDB_CHECK_LOCAL],
2 [dnl Check for internationalization functions in libesedb/libesedb_i18n.c
3 AC_CHECK_FUNCS([bindtextdomain])
4 ])
2 [dnl Check for internationalization functions in libesedb/libesedb_i18n.c
3 AC_CHECK_FUNCS([bindtextdomain])
54
5 dnl Check if library should be build with verbose output
6 AX_COMMON_CHECK_ENABLE_VERBOSE_OUTPUT
7
8 dnl Check if library should be build with debug output
9 AX_COMMON_CHECK_ENABLE_DEBUG_OUTPUT
10
11 dnl Check if DLL support is needed
12 AS_IF(
13 [test "x$enable_shared" = xyes],
14 [AS_CASE(
15 [$host],
16 [*cygwin* | *mingw*],
17 [AC_DEFINE(
18 [HAVE_DLLMAIN],
19 [1],
20 [Define to 1 to enable the DllMain function.])
21 AC_SUBST(
22 [HAVE_DLLMAIN],
23 [1])
24 ])
25 ])
26 ])
27
28 dnl Function to detect if esedbtools dependencies are available
29 AC_DEFUN([AX_ESEDBTOOLS_CHECK_LOCAL],
30 [AC_CHECK_HEADERS([signal.h sys/signal.h unistd.h])
31
32 AC_CHECK_FUNCS([close getopt setvbuf])
33
34 AS_IF(
35 [test "x$ac_cv_func_close" != xyes],
36 [AC_MSG_FAILURE(
37 [Missing function: close],
38 [1])
39 ])
40
41 dnl Check if tools should be build as static executables
42 AX_COMMON_CHECK_ENABLE_STATIC_EXECUTABLES
43
44 dnl Check if DLL support is needed
45 AS_IF(
46 [test "x$enable_shared" = xyes && test "x$ac_cv_enable_static_executables" = xno],
47 [AS_CASE(
48 [$host],
49 [*cygwin* | *mingw*],
50 [AC_SUBST(
51 [LIBESEDB_DLL_IMPORT],
52 ["-DLIBESEDB_DLL_IMPORT"])
53 ])
54 ])
55 ])
56
1919 If you have problems, you may need to regenerate the build system entirely.
2020 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
2121
22 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
23 # serial 1 (pkg-config-0.24)
24 #
25 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
26 #
27 # This program is free software; you can redistribute it and/or modify
28 # it under the terms of the GNU General Public License as published by
29 # the Free Software Foundation; either version 2 of the License, or
30 # (at your option) any later version.
31 #
32 # This program is distributed in the hope that it will be useful, but
33 # WITHOUT ANY WARRANTY; without even the implied warranty of
34 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
35 # General Public License for more details.
36 #
37 # You should have received a copy of the GNU General Public License
38 # along with this program; if not, write to the Free Software
39 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
40 #
41 # As a special exception to the GNU General Public License, if you
42 # distribute this file as part of a program that contains a
43 # configuration script generated by Autoconf, you may include it under
44 # the same distribution terms that you use for the rest of that program.
45
46 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
47 # ----------------------------------
22 dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
23 dnl serial 11 (pkg-config-0.29)
24 dnl
25 dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
26 dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
27 dnl
28 dnl This program is free software; you can redistribute it and/or modify
29 dnl it under the terms of the GNU General Public License as published by
30 dnl the Free Software Foundation; either version 2 of the License, or
31 dnl (at your option) any later version.
32 dnl
33 dnl This program is distributed in the hope that it will be useful, but
34 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
35 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
36 dnl General Public License for more details.
37 dnl
38 dnl You should have received a copy of the GNU General Public License
39 dnl along with this program; if not, write to the Free Software
40 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
41 dnl 02111-1307, USA.
42 dnl
43 dnl As a special exception to the GNU General Public License, if you
44 dnl distribute this file as part of a program that contains a
45 dnl configuration script generated by Autoconf, you may include it under
46 dnl the same distribution terms that you use for the rest of that
47 dnl program.
48
49 dnl PKG_PREREQ(MIN-VERSION)
50 dnl -----------------------
51 dnl Since: 0.29
52 dnl
53 dnl Verify that the version of the pkg-config macros are at least
54 dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
55 dnl installed version of pkg-config, this checks the developer's version
56 dnl of pkg.m4 when generating configure.
57 dnl
58 dnl To ensure that this macro is defined, also add:
59 dnl m4_ifndef([PKG_PREREQ],
60 dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
61 dnl
62 dnl See the "Since" comment for each macro you use to see what version
63 dnl of the macros you require.
64 m4_defun([PKG_PREREQ],
65 [m4_define([PKG_MACROS_VERSION], [0.29])
66 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
67 [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
68 ])dnl PKG_PREREQ
69
70 dnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
71 dnl ----------------------------------
72 dnl Since: 0.16
73 dnl
74 dnl Search for the pkg-config tool and set the PKG_CONFIG variable to
75 dnl first found in the path. Checks that the version of pkg-config found
76 dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
77 dnl used since that's the first version where most current features of
78 dnl pkg-config existed.
4879 AC_DEFUN([PKG_PROG_PKG_CONFIG],
4980 [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
5081 m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
6697 PKG_CONFIG=""
6798 fi
6899 fi[]dnl
69 ])# PKG_PROG_PKG_CONFIG
70
71 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
72 #
73 # Check to see whether a particular set of modules exists. Similar
74 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
75 #
76 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
77 # only at the first occurence in configure.ac, so if the first place
78 # it's called might be skipped (such as if it is within an "if", you
79 # have to call PKG_CHECK_EXISTS manually
80 # --------------------------------------------------------------
100 ])dnl PKG_PROG_PKG_CONFIG
101
102 dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
103 dnl -------------------------------------------------------------------
104 dnl Since: 0.18
105 dnl
106 dnl Check to see whether a particular set of modules exists. Similar to
107 dnl PKG_CHECK_MODULES(), but does not set variables or print errors.
108 dnl
109 dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
110 dnl only at the first occurence in configure.ac, so if the first place
111 dnl it's called might be skipped (such as if it is within an "if", you
112 dnl have to call PKG_CHECK_EXISTS manually
81113 AC_DEFUN([PKG_CHECK_EXISTS],
82114 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
83115 if test -n "$PKG_CONFIG" && \
87119 $3])dnl
88120 fi])
89121
90 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
91 # ---------------------------------------------
122 dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
123 dnl ---------------------------------------------
124 dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
125 dnl pkg_failed based on the result.
92126 m4_define([_PKG_CONFIG],
93127 [if test -n "$$1"; then
94128 pkg_cv_[]$1="$$1"
100134 else
101135 pkg_failed=untried
102136 fi[]dnl
103 ])# _PKG_CONFIG
104
105 # _PKG_SHORT_ERRORS_SUPPORTED
106 # -----------------------------
137 ])dnl _PKG_CONFIG
138
139 dnl _PKG_SHORT_ERRORS_SUPPORTED
140 dnl ---------------------------
141 dnl Internal check to see if pkg-config supports short errors.
107142 AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
108143 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
109144 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
111146 else
112147 _pkg_short_errors_supported=no
113148 fi[]dnl
114 ])# _PKG_SHORT_ERRORS_SUPPORTED
115
116
117 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
118 # [ACTION-IF-NOT-FOUND])
119 #
120 #
121 # Note that if there is a possibility the first call to
122 # PKG_CHECK_MODULES might not happen, you should be sure to include an
123 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
124 #
125 #
126 # --------------------------------------------------------------
149 ])dnl _PKG_SHORT_ERRORS_SUPPORTED
150
151
152 dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
153 dnl [ACTION-IF-NOT-FOUND])
154 dnl --------------------------------------------------------------
155 dnl Since: 0.4.0
156 dnl
157 dnl Note that if there is a possibility the first call to
158 dnl PKG_CHECK_MODULES might not happen, you should be sure to include an
159 dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
127160 AC_DEFUN([PKG_CHECK_MODULES],
128161 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
129162 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
177210 AC_MSG_RESULT([yes])
178211 $3
179212 fi[]dnl
180 ])# PKG_CHECK_MODULES
181
182
183 # PKG_INSTALLDIR(DIRECTORY)
184 # -------------------------
185 # Substitutes the variable pkgconfigdir as the location where a module
186 # should install pkg-config .pc files. By default the directory is
187 # $libdir/pkgconfig, but the default can be changed by passing
188 # DIRECTORY. The user can override through the --with-pkgconfigdir
189 # parameter.
213 ])dnl PKG_CHECK_MODULES
214
215
216 dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
217 dnl [ACTION-IF-NOT-FOUND])
218 dnl ---------------------------------------------------------------------
219 dnl Since: 0.29
220 dnl
221 dnl Checks for existence of MODULES and gathers its build flags with
222 dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
223 dnl and VARIABLE-PREFIX_LIBS from --libs.
224 dnl
225 dnl Note that if there is a possibility the first call to
226 dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
227 dnl include an explicit call to PKG_PROG_PKG_CONFIG in your
228 dnl configure.ac.
229 AC_DEFUN([PKG_CHECK_MODULES_STATIC],
230 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
231 _save_PKG_CONFIG=$PKG_CONFIG
232 PKG_CONFIG="$PKG_CONFIG --static"
233 PKG_CHECK_MODULES($@)
234 PKG_CONFIG=$_save_PKG_CONFIG[]dnl
235 ])dnl PKG_CHECK_MODULES_STATIC
236
237
238 dnl PKG_INSTALLDIR([DIRECTORY])
239 dnl -------------------------
240 dnl Since: 0.27
241 dnl
242 dnl Substitutes the variable pkgconfigdir as the location where a module
243 dnl should install pkg-config .pc files. By default the directory is
244 dnl $libdir/pkgconfig, but the default can be changed by passing
245 dnl DIRECTORY. The user can override through the --with-pkgconfigdir
246 dnl parameter.
190247 AC_DEFUN([PKG_INSTALLDIR],
191248 [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
192249 m4_pushdef([pkg_description],
197254 AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
198255 m4_popdef([pkg_default])
199256 m4_popdef([pkg_description])
200 ]) dnl PKG_INSTALLDIR
201
202
203 # PKG_NOARCH_INSTALLDIR(DIRECTORY)
204 # -------------------------
205 # Substitutes the variable noarch_pkgconfigdir as the location where a
206 # module should install arch-independent pkg-config .pc files. By
207 # default the directory is $datadir/pkgconfig, but the default can be
208 # changed by passing DIRECTORY. The user can override through the
209 # --with-noarch-pkgconfigdir parameter.
257 ])dnl PKG_INSTALLDIR
258
259
260 dnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
261 dnl --------------------------------
262 dnl Since: 0.27
263 dnl
264 dnl Substitutes the variable noarch_pkgconfigdir as the location where a
265 dnl module should install arch-independent pkg-config .pc files. By
266 dnl default the directory is $datadir/pkgconfig, but the default can be
267 dnl changed by passing DIRECTORY. The user can override through the
268 dnl --with-noarch-pkgconfigdir parameter.
210269 AC_DEFUN([PKG_NOARCH_INSTALLDIR],
211270 [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
212271 m4_pushdef([pkg_description],
217276 AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
218277 m4_popdef([pkg_default])
219278 m4_popdef([pkg_description])
220 ]) dnl PKG_NOARCH_INSTALLDIR
221
222
223 # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
224 # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
225 # -------------------------------------------
226 # Retrieves the value of the pkg-config variable for the given module.
279 ])dnl PKG_NOARCH_INSTALLDIR
280
281
282 dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
283 dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
284 dnl -------------------------------------------
285 dnl Since: 0.28
286 dnl
287 dnl Retrieves the value of the pkg-config variable for the given module.
227288 AC_DEFUN([PKG_CHECK_VAR],
228289 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
229290 AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
232293 AS_VAR_COPY([$1], [pkg_cv_][$1])
233294
234295 AS_VAR_IF([$1], [""], [$5], [$4])dnl
235 ])# PKG_CHECK_VAR
296 ])dnl PKG_CHECK_VAR
236297
237298 # Copyright (C) 2002-2014 Free Software Foundation, Inc.
238299 #
14111472 m4_include([m4/libcnotify.m4])
14121473 m4_include([m4/libcpath.m4])
14131474 m4_include([m4/libcsplit.m4])
1414 m4_include([m4/libcstring.m4])
1415 m4_include([m4/libcsystem.m4])
14161475 m4_include([m4/libcthreads.m4])
14171476 m4_include([m4/libfcache.m4])
14181477 m4_include([m4/libfdata.m4])
14331492 m4_include([m4/progtest.m4])
14341493 m4_include([m4/pthread.m4])
14351494 m4_include([m4/python.m4])
1495 m4_include([m4/tests.m4])
14361496 m4_include([m4/types.m4])
14371497 m4_include([acinclude.m4])
88 config_winapi.h \
99 file_stream.h \
1010 memory.h \
11 narrow_string.h \
12 system_string.h \
1113 types.h \
12 types.h.in
14 types.h.in \
15 wide_string.h
1316
1417 MAINTAINERCLEANFILES = \
1518 Makefile.in
9696 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9797 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9898 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
99 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
10099 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
101100 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
102101 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
107106 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
108107 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
109108 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
110 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
111 $(top_srcdir)/configure.ac
109 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
110 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
112111 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
113112 $(ACLOCAL_M4)
114113 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
199198 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
200199 HAVE_LIBCPATH = @HAVE_LIBCPATH@
201200 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
202 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
203 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
204201 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
205202 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
206203 HAVE_LIBFDATA = @HAVE_LIBFDATA@
219216 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
220217 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
221218 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
222 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
223 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
224219 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
225220 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
226221 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
267262 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
268263 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
269264 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
270 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
271 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
272 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
273 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
274265 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
275266 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
276267 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
303294 LTLIBICONV = @LTLIBICONV@
304295 LTLIBINTL = @LTLIBINTL@
305296 LTLIBOBJS = @LTLIBOBJS@
297 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
306298 MAKEINFO = @MAKEINFO@
307299 MANIFEST_TOOL = @MANIFEST_TOOL@
308300 MKDIR_P = @MKDIR_P@
409401 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
410402 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
411403 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
412 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
413 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
414 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
415 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
416 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
417 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
418404 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
419405 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
420406 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
483469 libcpath_LIBS = @libcpath_LIBS@
484470 libcsplit_CFLAGS = @libcsplit_CFLAGS@
485471 libcsplit_LIBS = @libcsplit_LIBS@
486 libcstring_CFLAGS = @libcstring_CFLAGS@
487 libcstring_LIBS = @libcstring_LIBS@
488 libcsystem_CFLAGS = @libcsystem_CFLAGS@
489 libcsystem_LIBS = @libcsystem_LIBS@
490472 libcthreads_CFLAGS = @libcthreads_CFLAGS@
491473 libcthreads_LIBS = @libcthreads_LIBS@
492474 libdir = @libdir@
545527 config_winapi.h \
546528 file_stream.h \
547529 memory.h \
530 narrow_string.h \
531 system_string.h \
548532 types.h \
549 types.h.in
533 types.h.in \
534 wide_string.h
550535
551536 MAINTAINERCLEANFILES = \
552537 Makefile.in
00 /*
11 * Byte stream functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Common include file
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2222 #define _COMMON_H
2323
2424 #if defined( HAVE_CONFIG_H )
25 #include <config.h>
25 #include "config.h"
2626 #endif
2727
2828 /* Include the Borland/CodeGear C++ Builder compiler specific configuration
2929 */
3030 #if defined( __BORLANDC__ )
31 #include <config_borlandc.h>
31 #include "config_borlandc.h"
3232
3333 /* Include the Microsoft Visual Studio C++ compiler specific configuration
3434 */
3535 #elif defined( _MSC_VER )
36 #include <config_msc.h>
36 #include "config_msc.h"
3737 #endif
3838
39 #include <config_winapi.h>
39 #include "config_winapi.h"
4040
4141 #endif /* !defined( _COMMON_H ) */
4242
6363 /* Define to 1 if you have the `fgetws' function. */
6464 /* #undef HAVE_FGETWS */
6565
66 /* Define to 1 if you have the `fmemopen' function. */
67 #define HAVE_FMEMOPEN 1
68
6669 /* Define to 1 if you have the `fopen' function. */
6770 #define HAVE_FOPEN 1
6871
99102 /* Define if the GNU gettext() function is already present or preinstalled. */
100103 #define HAVE_GETTEXT 1
101104
102 /* Define to 1 if you have the <glob.h> header file. */
103 #define HAVE_GLOB_H 1
105 /* Define to 1 if dlsym funtion is available in GNU dl. */
106 #define HAVE_GNU_DL_DLSYM 1
104107
105108 /* Define if you have the iconv() function and it works. */
106109 /* #undef HAVE_ICONV */
111114 /* Define to 1 if you have the `ioctl' function. */
112115 #define HAVE_IOCTL 1
113116
114 /* Define to 1 if you have the <io.h> header file. */
115 /* #undef HAVE_IO_H */
116
117117 /* Define if nl_langinfo has CODESET support. */
118118 #define HAVE_LANGINFO_CODESET 1
119119
168168 /* Define to 1 if you have the <libcsplit.h> header file. */
169169 /* #undef HAVE_LIBCSPLIT_H */
170170
171 /* Define to 1 if you have the `cstring' library (-lcstring). */
172 /* #undef HAVE_LIBCSTRING */
173
174 /* Define to 1 if you have the <libcstring.h> header file. */
175 /* #undef HAVE_LIBCSTRING_H */
176
177 /* Define to 1 if you have the `csystem' library (-lcsystem). */
178 /* #undef HAVE_LIBCSYSTEM */
179
180 /* Define to 1 if you have the <libcsystem.h> header file. */
181 /* #undef HAVE_LIBCSYSTEM_H */
182
183171 /* Define to 1 if you have the `cthreads' library (-lcthreads). */
184172 /* #undef HAVE_LIBCTHREADS */
185173
186174 /* Define to 1 if you have the <libcthreads.h> header file. */
187175 /* #undef HAVE_LIBCTHREADS_H */
188176
177 /* Define to 1 if you have the `dl' library (-ldl). */
178 #define HAVE_LIBDL 1
179
189180 /* Define to 1 if you have the `fcache' library (-lfcache). */
190181 /* #undef HAVE_LIBFCACHE */
191182
279270 /* Define to 1 if the local version of libcsplit is used. */
280271 #define HAVE_LOCAL_LIBCSPLIT 1
281272
282 /* Define to 1 if the local version of libcstring is used. */
283 #define HAVE_LOCAL_LIBCSTRING 1
284
285 /* Define to 1 if the local version of libcsystem is used. */
286 #define HAVE_LOCAL_LIBCSYSTEM 1
287
288273 /* Define to 1 if the local version of libcthreads is used. */
289274 #define HAVE_LOCAL_LIBCTHREADS 1
290275
480465 /* Define to 1 if you have the <sys/types.h> header file. */
481466 #define HAVE_SYS_TYPES_H 1
482467
483 /* Define to 1 if you have the `textdomain' function. */
484 #define HAVE_TEXTDOMAIN 1
485
486468 /* Define to 1 if you have the `time' function. */
487469 #define HAVE_TIME 1
488470
564546 /* Define to 1 if you have the `write' function. */
565547 #define HAVE_WRITE 1
566548
567 /* Define to the sub-directory in which libtool stores uninstalled libraries.
568 */
549 /* Define to the sub-directory where libtool stores uninstalled libraries. */
569550 #define LT_OBJDIR ".libs/"
570551
571552 /* Name of package */
578559 #define PACKAGE_NAME "libesedb"
579560
580561 /* Define to the full name and version of this package. */
581 #define PACKAGE_STRING "libesedb 20160622"
562 #define PACKAGE_STRING "libesedb 20170121"
582563
583564 /* Define to the one symbol short name of this package. */
584565 #define PACKAGE_TARNAME "libesedb"
587568 #define PACKAGE_URL ""
588569
589570 /* Define to the version of this package. */
590 #define PACKAGE_VERSION "20160622"
571 #define PACKAGE_VERSION "20170121"
591572
592573 /* The size of `int', as computed by sizeof. */
593574 #define SIZEOF_INT 4
599580 #define SIZEOF_SIZE_T 8
600581
601582 /* The size of `wchar_t', as computed by sizeof. */
602 /* #undef SIZEOF_WCHAR_T */
583 #define SIZEOF_WCHAR_T 4
603584
604585 /* Define to 1 if you have the ANSI C header files. */
605586 #define STDC_HEADERS 1
614595 /* #undef TM_IN_SYS_TIME */
615596
616597 /* Version number of package */
617 #define VERSION "20160622"
598 #define VERSION "20170121"
618599
619600 /* Enable large inode numbers on Mac OS X 10.5. */
620601 #ifndef _DARWIN_USE_64_BIT_INODE
6262 /* Define to 1 if you have the `fgetws' function. */
6363 #undef HAVE_FGETWS
6464
65 /* Define to 1 if you have the `fmemopen' function. */
66 #undef HAVE_FMEMOPEN
67
6568 /* Define to 1 if you have the `fopen' function. */
6669 #undef HAVE_FOPEN
6770
98101 /* Define if the GNU gettext() function is already present or preinstalled. */
99102 #undef HAVE_GETTEXT
100103
101 /* Define to 1 if you have the <glob.h> header file. */
102 #undef HAVE_GLOB_H
104 /* Define to 1 if dlsym funtion is available in GNU dl. */
105 #undef HAVE_GNU_DL_DLSYM
103106
104107 /* Define if you have the iconv() function and it works. */
105108 #undef HAVE_ICONV
110113 /* Define to 1 if you have the `ioctl' function. */
111114 #undef HAVE_IOCTL
112115
113 /* Define to 1 if you have the <io.h> header file. */
114 #undef HAVE_IO_H
115
116116 /* Define if nl_langinfo has CODESET support. */
117117 #undef HAVE_LANGINFO_CODESET
118118
167167 /* Define to 1 if you have the <libcsplit.h> header file. */
168168 #undef HAVE_LIBCSPLIT_H
169169
170 /* Define to 1 if you have the `cstring' library (-lcstring). */
171 #undef HAVE_LIBCSTRING
172
173 /* Define to 1 if you have the <libcstring.h> header file. */
174 #undef HAVE_LIBCSTRING_H
175
176 /* Define to 1 if you have the `csystem' library (-lcsystem). */
177 #undef HAVE_LIBCSYSTEM
178
179 /* Define to 1 if you have the <libcsystem.h> header file. */
180 #undef HAVE_LIBCSYSTEM_H
181
182170 /* Define to 1 if you have the `cthreads' library (-lcthreads). */
183171 #undef HAVE_LIBCTHREADS
184172
185173 /* Define to 1 if you have the <libcthreads.h> header file. */
186174 #undef HAVE_LIBCTHREADS_H
187175
176 /* Define to 1 if you have the `dl' library (-ldl). */
177 #undef HAVE_LIBDL
178
188179 /* Define to 1 if you have the `fcache' library (-lfcache). */
189180 #undef HAVE_LIBFCACHE
190181
278269 /* Define to 1 if the local version of libcsplit is used. */
279270 #undef HAVE_LOCAL_LIBCSPLIT
280271
281 /* Define to 1 if the local version of libcstring is used. */
282 #undef HAVE_LOCAL_LIBCSTRING
283
284 /* Define to 1 if the local version of libcsystem is used. */
285 #undef HAVE_LOCAL_LIBCSYSTEM
286
287272 /* Define to 1 if the local version of libcthreads is used. */
288273 #undef HAVE_LOCAL_LIBCTHREADS
289274
479464 /* Define to 1 if you have the <sys/types.h> header file. */
480465 #undef HAVE_SYS_TYPES_H
481466
482 /* Define to 1 if you have the `textdomain' function. */
483 #undef HAVE_TEXTDOMAIN
484
485467 /* Define to 1 if you have the `time' function. */
486468 #undef HAVE_TIME
487469
563545 /* Define to 1 if you have the `write' function. */
564546 #undef HAVE_WRITE
565547
566 /* Define to the sub-directory in which libtool stores uninstalled libraries.
567 */
548 /* Define to the sub-directory where libtool stores uninstalled libraries. */
568549 #undef LT_OBJDIR
569550
570551 /* Name of package */
00 /*
11 * Configuration for the Borland/CodeGear C++ Builder compiler
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Configuration for the Microsoft Visual Studio C++ compiler
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Configuration file for WINAPI
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * FILE stream functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Memory functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
0 /*
1 * Narrow character string functions
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _NARROW_STRING_H )
22 #define _NARROW_STRING_H
23
24 #include "common.h"
25 #include "memory.h"
26 #include "types.h"
27
28 #if defined( HAVE_GLIB_H )
29 #include <glib.h>
30 #endif
31
32 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
33 #include <stdlib.h>
34 #endif
35
36 #if defined( HAVE_STRING_H ) || defined( WINAPI )
37 #include <string.h>
38 #endif
39
40 #if defined( __cplusplus )
41 extern "C" {
42 #endif
43
44 /* String allocation
45 */
46 #define narrow_string_allocate( size ) \
47 (char *) memory_allocate( sizeof( char ) * ( size ) )
48
49 /* String reallocation
50 */
51 #define narrow_string_reallocate( string, size ) \
52 (char *) memory_reallocate( string, ( sizeof( char ) * ( size ) ) )
53
54 /* String length
55 */
56 #if defined( HAVE_STRLEN ) || defined( WINAPI )
57 #define narrow_string_length( string ) \
58 strlen( string )
59 #endif
60
61 /* String compare
62 */
63 #if defined( HAVE_MEMCMP ) || defined( WINAPI )
64 #define narrow_string_compare( string1, string2, size ) \
65 memcmp( (void *) string1, (void *) string2, size )
66
67 #elif defined( HAVE_STRNCMP )
68 #define narrow_string_compare( string1, string2, size ) \
69 strncmp( string1, string2, size )
70 #endif
71
72 /* Caseless string compare
73 */
74 #if defined( HAVE_GLIB_H )
75 #define narrow_string_compare_no_case( string1, string2, size ) \
76 g_ascii_strncasecmp( string1, string2, size )
77
78 #elif defined( _MSC_VER )
79 #define narrow_string_compare_no_case( string1, string2, size ) \
80 _strnicmp( string1, string2, size )
81
82 #elif ( defined( WINAPI ) && !defined( __CYGWIN__ ) ) || defined( HAVE_STRNICMP )
83 #define narrow_string_compare_no_case( string1, string2, size ) \
84 strnicmp( string1, string2, size )
85
86 #elif defined( HAVE_STRNCASECMP )
87 #define narrow_string_compare_no_case( string1, string2, size ) \
88 strncasecmp( string1, string2, size )
89
90 #elif defined( HAVE_STRCASECMP )
91 #define narrow_string_compare_no_case( string1, string2, size ) \
92 strcasecmp( string1, string2 )
93 #endif
94
95 /* String copy
96 */
97 #if defined( HAVE_MEMCPY ) || defined( WINAPI )
98 #define narrow_string_copy( destination, source, size ) \
99 (char *) memcpy( (void *) destination, (void *) source, size )
100
101 #elif defined( HAVE_STRNCPY )
102 #define narrow_string_copy( destination, source, size ) \
103 strncpy( destination, source, size )
104 #endif
105
106 /* String character search
107 */
108 #if defined( HAVE_MEMCHR ) || defined( WINAPI )
109 #define narrow_string_search_character( string, character, size ) \
110 (char *) memchr( (void *) string, (int) character, size )
111
112 #elif defined( HAVE_STRCHR )
113 #define narrow_string_search_character( string, character, size ) \
114 strchr( string, (int) character )
115 #endif
116
117 /* String reverse character search
118 */
119 #if defined( HAVE_MEMRCHR ) && ( HAVE_DECL_MEMRCHR == 1 )
120 #define narrow_string_search_character_reverse( string, character, size ) \
121 (char *) memrchr( (void *) string, (int) character, size )
122
123 #elif defined( HAVE_STRRCHR ) || defined( WINAPI )
124 #define narrow_string_search_character_reverse( string, character, size ) \
125 strrchr( string, (int) character )
126 #endif
127
128 /* String sub-string search
129 */
130 #if defined( HAVE_STRSTR ) || defined( WINAPI )
131 #define narrow_string_search_string( string, substring, size ) \
132 strstr( string, substring )
133 #endif
134
135 /* String formatted print (snprintf)
136 */
137 #if defined( HAVE_GLIB_H )
138 #define narrow_string_snprintf( target, size, ... ) \
139 g_snprintf( target, size, __VA_ARGS__ )
140
141 #elif defined( _MSC_VER )
142 #define narrow_string_snprintf( target, size, ... ) \
143 sprintf_s( target, size, __VA_ARGS__ )
144
145 #elif defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )
146 #define narrow_string_snprintf \
147 snprintf
148
149 #elif defined( HAVE_SNPRINTF ) || defined( WINAPI )
150 #define narrow_string_snprintf( target, size, ... ) \
151 snprintf( target, size, __VA_ARGS__ )
152 #endif
153
154 /* String input conversion (sscanf)
155 */
156 #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )
157 #define narrow_string_sscanf \
158 sscanf
159
160 #elif defined( HAVE_SSCANF ) || defined( WINAPI )
161 #define narrow_string_sscanf( string, format, ... ) \
162 sscanf( string, format, __VA_ARGS__ )
163 #endif
164
165 /* Variable arguments formatted print to string function (vsnprintf)
166 */
167 #if defined( HAVE_GLIB_H )
168 #define narrow_string_vsnprintf( string, size, format, ... ) \
169 g_vsnprintf( string, size, format, __VA_ARGS__ )
170
171 #elif defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )
172 #define narrow_string_vsnprintf \
173 vsnprintf
174
175 #elif defined( HAVE_VSNPRINTF ) || defined( WINAPI )
176 #define narrow_string_vsnprintf( string, size, format, ... ) \
177 vsnprintf( string, size, format, __VA_ARGS__ )
178 #endif
179
180 #if defined( __cplusplus )
181 }
182 #endif
183
184 #endif /* !defined( _NARROW_STRING_H ) */
185
0 /*
1 * System character string functions
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _SYSTEM_STRING_H )
22 #define _SYSTEM_STRING_H
23
24 #include "common.h"
25 #include "narrow_string.h"
26 #include "types.h"
27 #include "wide_string.h"
28
29 #if defined( _cplusplus )
30 extern "C" {
31 #endif
32
33 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
34
35 #if SIZEOF_WCHAR_T != 2
36 #error Unsupported wide system character size
37 #endif
38
39 /* Intermediate version of the macro required
40 * for correct evaluation predefined string
41 */
42 #define _SYSTEM_STRING_INTERMEDIATE( string ) \
43 L ## string
44
45 #define _SYSTEM_STRING( string ) \
46 _SYSTEM_STRING_INTERMEDIATE( string )
47
48 #define system_string_allocate( size ) \
49 wide_string_allocate( size )
50
51 #define system_string_reallocate( string, size ) \
52 wide_string_reallocate( string, size )
53
54 #define system_string_compare( destination, source, size ) \
55 wide_string_compare( destination, source, size )
56
57 #define system_string_compare_no_case( destination, source, size ) \
58 wide_string_compare_no_case( destination, source, size )
59
60 #define system_string_copy( destination, source, size ) \
61 wide_string_copy( destination, source, size )
62
63 #define system_string_length( string ) \
64 wide_string_length( string )
65
66 #define system_string_search_character( string, character, size ) \
67 wide_string_search_character( string, character, size )
68
69 #define system_string_search_character_reverse( string, character, size ) \
70 wide_string_search_character_reverse( string, character, size )
71
72 #define system_string_search_string( string, substring, size ) \
73 wide_string_search_string( string, substring, size )
74
75 #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )
76 #define system_string_sprintf \
77 wide_string_snwprintf
78
79 #else
80 #define system_string_sprintf( string, size, format, ... ) \
81 wide_string_snwprintf( string, size, format, __VA_ARGS__ )
82 #endif
83
84 #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )
85 #define system_string_vsprintf \
86 wide_string_vsnwprintf
87
88 #else
89 #define system_string_vsprintf( string, size, format, ... ) \
90 wide_string_vsnwprintf( string, size, format, __VA_ARGS__ )
91 #endif
92
93 #else
94
95 #define _SYSTEM_STRING( string ) \
96 string
97
98 #define system_string_allocate( size ) \
99 narrow_string_allocate( size )
100
101 #define system_string_reallocate( string, size ) \
102 narrow_string_reallocate( string, size )
103
104 #define system_string_compare( destination, source, size ) \
105 narrow_string_compare( destination, source, size )
106
107 #define system_string_compare_no_case( destination, source, size ) \
108 narrow_string_compare_no_case( destination, source, size )
109
110 #define system_string_copy( destination, source, size ) \
111 narrow_string_copy( destination, source, size )
112
113 #define system_string_length( string ) \
114 narrow_string_length( string )
115
116 #define system_string_search_character( string, character, size ) \
117 narrow_string_search_character( string, character, size )
118
119 #define system_string_search_character_reverse( string, character, size ) \
120 narrow_string_search_character_reverse( string, character, size )
121
122 #define system_string_search_string( string, substring, size ) \
123 narrow_string_search_string( string, substring, size )
124
125 #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )
126 #define system_string_sprintf \
127 narrow_string_snprintf
128
129 #else
130 #define system_string_sprintf( string, size, format, ... ) \
131 narrow_string_snprintf( string, size, format, __VA_ARGS__ )
132 #endif
133
134 #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )
135 #define system_string_vsprintf \
136 narrow_string_vsnprintf
137
138 #else
139 #define system_string_vsprintf( string, size, format, ... ) \
140 narrow_string_vsnprintf( string, size, format, __VA_ARGS__ )
141 #endif
142
143 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
144
145 #if defined( _cplusplus )
146 }
147 #endif
148
149 #endif /* !defined( _SYSTEM_STRING_H ) */
150
00 /*
11 * Type and type-support defintions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3131 * PRI definitions are defined
3232 */
3333 #include <libesedb/types.h>
34
35 #if defined( WINAPI ) && ( defined( _UNICODE ) || defined( UNICODE ) )
36
37 #define HAVE_WIDE_SYSTEM_CHARACTER 1
38
39 /* The system character type is wide
40 * A system string contains either UTF-16 or UTF-32
41 */
42 typedef wchar_t system_character_t;
43 typedef wint_t system_integer_t;
44
45 #define PRIc_SYSTEM "lc"
46 #define PRIs_SYSTEM "ls"
47
48 #else
49
50 /* The system character type is narrow
51 * A system string contains either UTF-8 or extended ASCII with a codepage
52 */
53 typedef char system_character_t;
54 typedef int system_integer_t;
55
56 #define PRIc_SYSTEM "c"
57 #define PRIs_SYSTEM "s"
58
59 #endif /* defined( WINAPI ) && ( defined( _UNICODE ) || defined( UNICODE ) ) */
3460
3561 /* Fix for systems without PRI definitions
3662 */
00 /*
11 * Type and type-support defintions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3131 * PRI definitions are defined
3232 */
3333 #include <@PACKAGE@/types.h>
34
35 #if defined( WINAPI ) && ( defined( _UNICODE ) || defined( UNICODE ) )
36
37 #define HAVE_WIDE_SYSTEM_CHARACTER 1
38
39 /* The system character type is wide
40 * A system string contains either UTF-16 or UTF-32
41 */
42 typedef wchar_t system_character_t;
43 typedef wint_t system_integer_t;
44
45 #define PRIc_SYSTEM "lc"
46 #define PRIs_SYSTEM "ls"
47
48 #else
49
50 /* The system character type is narrow
51 * A system string contains either UTF-8 or extended ASCII with a codepage
52 */
53 typedef char system_character_t;
54 typedef int system_integer_t;
55
56 #define PRIc_SYSTEM "c"
57 #define PRIs_SYSTEM "s"
58
59 #endif /* defined( WINAPI ) && ( defined( _UNICODE ) || defined( UNICODE ) ) */
3460
3561 /* Fix for systems without PRI definitions
3662 */
0 /*
1 * Wide character string functions
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _WIDE_STRING_H )
22 #define _WIDE_STRING_H
23
24 #include "common.h"
25 #include "memory.h"
26 #include "types.h"
27
28 #if defined( HAVE_WCHAR_H ) || defined( WINAPI )
29 #include <wchar.h>
30 #endif
31
32 #if defined( __cplusplus )
33 extern "C" {
34 #endif
35
36 /* Intermediate version of the macro required
37 * for correct evaluation predefined string
38 */
39 #define _WIDE_STRING_INTERMEDIATE( string ) \
40 L ## string
41
42 #define _WIDE_STRING( string ) \
43 _WIDE_STRING_INTERMEDIATE( string )
44
45 /* String allocation
46 */
47 #define wide_string_allocate( size ) \
48 (wchar_t *) memory_allocate( sizeof( wchar_t ) * ( size ) )
49
50 /* String reallocation
51 */
52 #define wide_string_reallocate( string, size ) \
53 (wchar_t *) memory_reallocate( string, ( sizeof( wchar_t ) * ( size ) ) )
54
55 /* String length
56 */
57 #if defined( HAVE_WCSLEN ) || defined( WINAPI )
58 #define wide_string_length( string ) \
59 wcslen( string )
60 #endif
61
62 /* String compare
63 */
64 #if defined( HAVE_WMEMCMP )
65 #define wide_string_compare( string1, string2, size ) \
66 wmemcmp( (void *) string1, (void *) string2, size )
67
68 #elif defined( HAVE_WCSNCMP ) || defined( WINAPI )
69 #define wide_string_compare( string1, string2, size ) \
70 wcsncmp( string1, string2, size )
71 #endif
72
73 /* Caseless string compare
74 */
75 #if defined( _MSC_VER ) || ( defined( __BORLANDC__ ) && ( __BORLANDC__ >= 0x0551 ) )
76 #define wide_string_compare_no_case( string1, string2, size ) \
77 _wcsnicmp( string1, string2, size )
78
79 #elif ( defined( WINAPI ) && !defined( __CYGWIN__ ) ) || defined( HAVE_WCSNICMP )
80 #define wide_string_compare_no_case( string1, string2, size ) \
81 wcsnicmp( string1, string2, size )
82
83 #elif defined( HAVE_WCSNCASECMP )
84 #define wide_string_compare_no_case( string1, string2, size ) \
85 wcsncasecmp( string1, string2, size )
86
87 #elif defined( HAVE_WCSCASECMP )
88 #define wide_string_compare_no_case( string1, string2, size ) \
89 wcscasecmp( string1, string2 )
90 #endif
91
92 /* String copy
93 */
94 #if defined( HAVE_WMEMCPY )
95 #define wide_string_copy( destination, source, size ) \
96 (wchar_t *) wmemcpy( (void *) destination, (void *) source, size )
97
98 #elif defined( HAVE_WCSNCPY ) || defined( WINAPI )
99 #define wide_string_copy( destination, source, size ) \
100 wcsncpy( destination, source, size )
101 #endif
102
103 /* String character search
104 */
105 #if defined( HAVE_WMEMCHR )
106 #define wide_string_search_character( string, character, size ) \
107 (wchar_t *) wmemchr( (void *) string, (wchar_t) character, size )
108
109 #elif defined( HAVE_WCSCHR ) || defined( WINAPI )
110 #define wide_string_search_character( string, character, size ) \
111 wcschr( string, (wchar_t) character )
112
113 #endif
114
115 /* String reverse character search
116 */
117 #if defined( HAVE_WMEMRCHR )
118 #define wide_string_search_character_reverse( string, character, size ) \
119 (wchar_t *) wmemrchr( (void *) string, (wchar_t) character, size )
120
121 #elif defined( HAVE_WCSRCHR ) || defined( WINAPI )
122 #define wide_string_search_character_reverse( string, character, size ) \
123 wcsrchr( string, (wchar_t) character )
124 #endif
125
126 /* String sub-string search
127 */
128 #if defined( HAVE_WCSSTR ) || defined( WINAPI )
129 #define wide_string_search_string( string, substring, size ) \
130 wcsstr( string, substring )
131
132 #endif
133
134 /* String formatted print (snwprintf)
135 */
136 #if defined( _MSC_VER )
137 #define wide_string_snwprintf( target, size, ... ) \
138 swprintf_s( target, size, __VA_ARGS__ )
139
140 #elif defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )
141 #define wide_string_snwprintf \
142 snwprintf
143
144 #elif defined( WINAPI )
145 #define wide_string_snwprintf( target, size, ... ) \
146 snwprintf( target, size, __VA_ARGS__ )
147
148 #elif defined( HAVE_SWPRINTF )
149 #define wide_string_snwprintf( target, size, ... ) \
150 swprintf( target, size, __VA_ARGS__ )
151 #endif
152
153 /* Variable arguments formatted print to string function (vsnwprintf)
154 */
155 #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )
156 #define wide_string_vsnwprintf \
157 _vsnwprintf
158
159 #elif defined( WINAPI )
160 #define wide_string_vsnwprintf( string, size, format, ... ) \
161 _vsnwprintf( string, size, format, __VA_ARGS__ )
162
163 #elif defined( HAVE_VSWPRINTF )
164 #define wide_string_vsnwprintf( string, size, format, ... ) \
165 vswprintf( string, size, format, __VA_ARGS__ )
166 #endif
167
168 #if defined( __cplusplus )
169 }
170 #endif
171
172 #endif /* !defined( _WIDE_STRING_H ) */
173
+1846
-2149
configure less more
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for libesedb 20160622.
2 # Generated by GNU Autoconf 2.69 for libesedb 20170121.
33 #
44 # Report bugs to <joachim.metz@gmail.com>.
55 #
589589 # Identity of this package.
590590 PACKAGE_NAME='libesedb'
591591 PACKAGE_TARNAME='libesedb'
592 PACKAGE_VERSION='20160622'
593 PACKAGE_STRING='libesedb 20160622'
592 PACKAGE_VERSION='20170121'
593 PACKAGE_STRING='libesedb 20170121'
594594 PACKAGE_BUGREPORT='joachim.metz@gmail.com'
595595 PACKAGE_URL=''
596596
642642 libesedb_spec_tools_build_requires
643643 libesedb_spec_build_requires
644644 libesedb_spec_requires
645 LIBESEDB_DLL_IMPORT
646 HAVE_DLLMAIN
647645 HAVE_PYTHON_TESTS_FALSE
648646 HAVE_PYTHON_TESTS_TRUE
649647 HAVE_PYTHON3_FALSE
688686 PYTHON_PLATFORM
689687 PYTHON_VERSION
690688 PYTHON
689 LIBESEDB_DLL_IMPORT
691690 STATIC_LDFLAGS
692 ax_libcsystem_spec_build_requires
693 ax_libcsystem_spec_requires
694 ax_libcsystem_pc_libs_private
695 LIBCSYSTEM_LIBADD
696 LIBCSYSTEM_CPPFLAGS
697 HAVE_LOCAL_LIBCSYSTEM_FALSE
698 HAVE_LOCAL_LIBCSYSTEM_TRUE
699 HAVE_LOCAL_LIBCSYSTEM
700 HAVE_LIBCSYSTEM
701 libcsystem_LIBS
702 libcsystem_CFLAGS
703691 ax_libmapidb_spec_build_requires
704692 ax_libmapidb_spec_requires
705693 ax_libmapidb_pc_libs_private
733721 HAVE_LIBFWNT
734722 libfwnt_LIBS
735723 libfwnt_CFLAGS
724 HAVE_DLLMAIN
736725 ax_libfvalue_spec_build_requires
737726 ax_libfvalue_spec_requires
738727 ax_libfvalue_pc_libs_private
903892 HAVE_LIBCERROR
904893 libcerror_LIBS
905894 libcerror_CFLAGS
906 ax_libcstring_spec_build_requires
907 ax_libcstring_spec_requires
908 ax_libcstring_pc_libs_private
909 LIBCSTRING_LIBADD
910 LIBCSTRING_CPPFLAGS
911 HAVE_LOCAL_LIBCSTRING_FALSE
912 HAVE_LOCAL_LIBCSTRING_TRUE
913 HAVE_LOCAL_LIBCSTRING
914 HAVE_LIBCSTRING
915 libcstring_LIBS
916 libcstring_CFLAGS
917895 PKG_CONFIG_LIBDIR
918896 PKG_CONFIG_PATH
919897 PKG_CONFIG
922900 HAVE_SIZE64_T
923901 HAVE_SSIZE32_T
924902 HAVE_SIZE32_T
903 HAVE_WCHAR_H
925904 HAVE_STDINT_H
926905 HAVE_INTTYPES_H
927906 HAVE_SYS_TYPES_H
928 HAVE_WCHAR_H
929907 HAVE_WIDE_CHARACTER_TYPE
930908 POSUB
931909 LTLIBINTL
946924 USE_NLS
947925 PKGCONFIG
948926 LIBTOOL_DEPS
927 LT_SYS_LIBRARY_PATH
949928 OTOOL64
950929 OTOOL
951930 LIPO
10691048 enable_static
10701049 with_pic
10711050 enable_fast_install
1051 with_aix_soname
10721052 with_gnu_ld
10731053 with_sysroot
10741054 enable_libtool_lock
10781058 with_libintl_prefix
10791059 enable_winapi
10801060 enable_wide_character_type
1081 with_libcstring
10821061 with_libcerror
10831062 enable_multi_threading_support
10841063 with_libcthreads
10961075 with_libfdatetime
10971076 with_libfguid
10981077 with_libfvalue
1078 enable_verbose_output
1079 enable_debug_output
10991080 with_libfwnt
11001081 with_libfmapi
11011082 with_libmapidb
1102 with_libcsystem
11031083 enable_static_executables
1104 enable_verbose_output
1105 enable_debug_output
11061084 with_pyprefix
11071085 enable_python
11081086 with_pythondir
11201098 LIBS
11211099 CPPFLAGS
11221100 CPP
1101 LT_SYS_LIBRARY_PATH
11231102 PKG_CONFIG
11241103 PKG_CONFIG_PATH
11251104 PKG_CONFIG_LIBDIR
1126 libcstring_CFLAGS
1127 libcstring_LIBS
11281105 libcerror_CFLAGS
11291106 libcerror_LIBS
11301107 libcthreads_CFLAGS
11601137 libfmapi_CFLAGS
11611138 libfmapi_LIBS
11621139 libmapidb_CFLAGS
1163 libmapidb_LIBS
1164 libcsystem_CFLAGS
1165 libcsystem_LIBS'
1140 libmapidb_LIBS'
11661141
11671142
11681143 # Initialize some variables set by options.
17031678 # Omit some internal or obsolete options to make the list less imposing.
17041679 # This message is too long to be a string in the A/UX 3.1 sh.
17051680 cat <<_ACEOF
1706 \`configure' configures libesedb 20160622 to adapt to many kinds of systems.
1681 \`configure' configures libesedb 20170121 to adapt to many kinds of systems.
17071682
17081683 Usage: $0 [OPTION]... [VAR=VALUE]...
17091684
17731748
17741749 if test -n "$ac_init_help"; then
17751750 case $ac_init_help in
1776 short | recursive ) echo "Configuration of libesedb 20160622:";;
1751 short | recursive ) echo "Configuration of libesedb 20170121:";;
17771752 esac
17781753 cat <<\_ACEOF
17791754
18011776 enable wide character type support [default=no]
18021777 --enable-multi-threading-support
18031778 enable multi-threading support [default=yes]
1779 --enable-verbose-output enable verbose output [default=no]
1780 --enable-debug-output enable debug output [default=no]
18041781 --enable-static-executables
18051782 build static executables (binaries) [default=no]
1806 --enable-verbose-output enable verbose output [default=no]
1807 --enable-debug-output enable debug output [default=no]
18081783 --enable-python build Python bindings [default=no]
18091784 --enable-python2 build Python 2 bindings [default=no]
18101785 --enable-python3 build Python 3 bindings [default=no]
18141789 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
18151790 --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
18161791 both]
1792 --with-aix-soname=aix|svr4|both
1793 shared library versioning (aka "SONAME") variant to
1794 provide on AIX, [default=aix].
18171795 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1818 --with-sysroot=DIR Search for dependent libraries within DIR
1819 (or the compiler's sysroot if not specified).
1796 --with-sysroot[=DIR] Search for dependent libraries within DIR (or the
1797 compiler's sysroot if not specified).
18201798 --with-gnu-ld assume the C compiler uses GNU ld default=no
18211799 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
18221800 --without-libiconv-prefix don't search for libiconv in includedir and libdir
18231801 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
18241802 --without-libintl-prefix don't search for libintl in includedir and libdir
1825 --with-libcstring[=DIR] search for libcstring in includedir and libdir or in
1826 the specified DIR, or no if to use local version
1827 [default=auto-detect]
18281803 --with-libcerror[=DIR] search for libcerror in includedir and libdir or in
18291804 the specified DIR, or no if to use local version
18301805 [default=auto-detect]
18841859 --with-libmapidb[=DIR] search for libmapidb in includedir and libdir or in
18851860 the specified DIR, or no if to use local version
18861861 [default=auto-detect]
1887 --with-libcsystem[=DIR] search for libcsystem in includedir and libdir or in
1888 the specified DIR, or no if to use local version
1889 [default=auto-detect]
18901862 --with-pyprefix[=no] use `python-config --prefix' to determine the prefix
18911863 of pythondir instead of --prefix [default=no]
18921864 --with-pythondir[=no] use to specify the Python directory (pythondir)
19051877 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
19061878 you have headers in a nonstandard directory <include dir>
19071879 CPP C preprocessor
1880 LT_SYS_LIBRARY_PATH
1881 User-defined run-time library search path.
19081882 PKG_CONFIG path to pkg-config utility
19091883 PKG_CONFIG_PATH
19101884 directories to add to pkg-config's search path
19111885 PKG_CONFIG_LIBDIR
19121886 path overriding pkg-config's built-in search path
1913 libcstring_CFLAGS
1914 C compiler flags for libcstring, overriding pkg-config
1915 libcstring_LIBS
1916 linker flags for libcstring, overriding pkg-config
19171887 libcerror_CFLAGS
19181888 C compiler flags for libcerror, overriding pkg-config
19191889 libcerror_LIBS
19851955 C compiler flags for libmapidb, overriding pkg-config
19861956 libmapidb_LIBS
19871957 linker flags for libmapidb, overriding pkg-config
1988 libcsystem_CFLAGS
1989 C compiler flags for libcsystem, overriding pkg-config
1990 libcsystem_LIBS
1991 linker flags for libcsystem, overriding pkg-config
19921958
19931959 Use these variables to override the choices made by `configure' or to help
19941960 it to find libraries and programs with nonstandard names/locations.
20562022 test -n "$ac_init_help" && exit $ac_status
20572023 if $ac_init_version; then
20582024 cat <<\_ACEOF
2059 libesedb configure 20160622
2025 libesedb configure 20170121
20602026 generated by GNU Autoconf 2.69
20612027
20622028 Copyright (C) 2012 Free Software Foundation, Inc.
27082674 This file contains any messages produced by compilers while
27092675 running configure, to aid debugging if configure makes a mistake.
27102676
2711 It was created by libesedb $as_me 20160622, which was
2677 It was created by libesedb $as_me 20170121, which was
27122678 generated by GNU Autoconf 2.69. Invocation command line was
27132679
27142680 $ $0 $@
35753541
35763542 # Define the identity of the package.
35773543 PACKAGE='libesedb'
3578 VERSION='20160622'
3544 VERSION='20170121'
35793545
35803546
35813547 cat >>confdefs.h <<_ACEOF
64816447
64826448
64836449
6484 macro_version='2.4.2'
6485 macro_revision='1.3337'
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499 ltmain="$ac_aux_dir/ltmain.sh"
6450 macro_version='2.4.6'
6451 macro_revision='2.4.6'
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465 ltmain=$ac_aux_dir/ltmain.sh
65006466
65016467 # Backslashify metacharacters that are still active within
65026468 # double-quoted strings.
65456511 $ECHO ""
65466512 }
65476513
6548 case "$ECHO" in
6514 case $ECHO in
65496515 printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
65506516 $as_echo "printf" >&6; } ;;
65516517 print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
67386704
67396705 # Check whether --with-gnu-ld was given.
67406706 if test "${with_gnu_ld+set}" = set; then :
6741 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6707 withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
67426708 else
67436709 with_gnu_ld=no
67446710 fi
67456711
67466712 ac_prog=ld
6747 if test "$GCC" = yes; then
6713 if test yes = "$GCC"; then
67486714 # Check if gcc -print-prog-name=ld gives a path.
67496715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
67506716 $as_echo_n "checking for ld used by $CC... " >&6; }
67516717 case $host in
67526718 *-*-mingw*)
6753 # gcc leaves a trailing carriage return which upsets mingw
6719 # gcc leaves a trailing carriage return, which upsets mingw
67546720 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
67556721 *)
67566722 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
67646730 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
67656731 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
67666732 done
6767 test -z "$LD" && LD="$ac_prog"
6733 test -z "$LD" && LD=$ac_prog
67686734 ;;
67696735 "")
67706736 # If it fails, then pretend we aren't using GCC.
67756741 with_gnu_ld=unknown
67766742 ;;
67776743 esac
6778 elif test "$with_gnu_ld" = yes; then
6744 elif test yes = "$with_gnu_ld"; then
67796745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
67806746 $as_echo_n "checking for GNU ld... " >&6; }
67816747 else
67866752 $as_echo_n "(cached) " >&6
67876753 else
67886754 if test -z "$LD"; then
6789 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6755 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
67906756 for ac_dir in $PATH; do
6791 IFS="$lt_save_ifs"
6757 IFS=$lt_save_ifs
67926758 test -z "$ac_dir" && ac_dir=.
67936759 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6794 lt_cv_path_LD="$ac_dir/$ac_prog"
6760 lt_cv_path_LD=$ac_dir/$ac_prog
67956761 # Check to see if the program is GNU ld. I'd rather use --version,
67966762 # but apparently some variants of GNU ld only accept -v.
67976763 # Break only if it was the GNU/non-GNU ld that we prefer.
67986764 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
67996765 *GNU* | *'with BFD'*)
6800 test "$with_gnu_ld" != no && break
6766 test no != "$with_gnu_ld" && break
68016767 ;;
68026768 *)
6803 test "$with_gnu_ld" != yes && break
6769 test yes != "$with_gnu_ld" && break
68046770 ;;
68056771 esac
68066772 fi
68076773 done
6808 IFS="$lt_save_ifs"
6809 else
6810 lt_cv_path_LD="$LD" # Let the user override the test with a path.
6811 fi
6812 fi
6813
6814 LD="$lt_cv_path_LD"
6774 IFS=$lt_save_ifs
6775 else
6776 lt_cv_path_LD=$LD # Let the user override the test with a path.
6777 fi
6778 fi
6779
6780 LD=$lt_cv_path_LD
68156781 if test -n "$LD"; then
68166782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
68176783 $as_echo "$LD" >&6; }
68546820 else
68556821 if test -n "$NM"; then
68566822 # Let the user override the test.
6857 lt_cv_path_NM="$NM"
6858 else
6859 lt_nm_to_check="${ac_tool_prefix}nm"
6823 lt_cv_path_NM=$NM
6824 else
6825 lt_nm_to_check=${ac_tool_prefix}nm
68606826 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
68616827 lt_nm_to_check="$lt_nm_to_check nm"
68626828 fi
68636829 for lt_tmp_nm in $lt_nm_to_check; do
6864 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6830 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
68656831 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
6866 IFS="$lt_save_ifs"
6832 IFS=$lt_save_ifs
68676833 test -z "$ac_dir" && ac_dir=.
6868 tmp_nm="$ac_dir/$lt_tmp_nm"
6869 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
6834 tmp_nm=$ac_dir/$lt_tmp_nm
6835 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
68706836 # Check to see if the nm accepts a BSD-compat flag.
6871 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
6837 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
68726838 # nm: unknown option "B" ignored
68736839 # Tru64's nm complains that /dev/null is an invalid object file
6874 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
6875 */dev/null* | *'Invalid file or object type'*)
6840 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
6841 case $build_os in
6842 mingw*) lt_bad_file=conftest.nm/nofile ;;
6843 *) lt_bad_file=/dev/null ;;
6844 esac
6845 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
6846 *$lt_bad_file* | *'Invalid file or object type'*)
68766847 lt_cv_path_NM="$tmp_nm -B"
6877 break
6848 break 2
68786849 ;;
68796850 *)
68806851 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
68816852 */dev/null*)
68826853 lt_cv_path_NM="$tmp_nm -p"
6883 break
6854 break 2
68846855 ;;
68856856 *)
68866857 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
68916862 esac
68926863 fi
68936864 done
6894 IFS="$lt_save_ifs"
6865 IFS=$lt_save_ifs
68956866 done
68966867 : ${lt_cv_path_NM=no}
68976868 fi
68986869 fi
68996870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
69006871 $as_echo "$lt_cv_path_NM" >&6; }
6901 if test "$lt_cv_path_NM" != "no"; then
6902 NM="$lt_cv_path_NM"
6872 if test no != "$lt_cv_path_NM"; then
6873 NM=$lt_cv_path_NM
69036874 else
69046875 # Didn't find any BSD compatible name lister, look for dumpbin.
69056876 if test -n "$DUMPBIN"; then :
70056976 fi
70066977 fi
70076978
7008 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
6979 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
70096980 *COFF*)
7010 DUMPBIN="$DUMPBIN -symbols"
6981 DUMPBIN="$DUMPBIN -symbols -headers"
70116982 ;;
70126983 *)
70136984 DUMPBIN=:
70156986 esac
70166987 fi
70176988
7018 if test "$DUMPBIN" != ":"; then
7019 NM="$DUMPBIN"
6989 if test : != "$DUMPBIN"; then
6990 NM=$DUMPBIN
70206991 fi
70216992 fi
70226993 test -z "$NM" && NM=nm
70677038 $as_echo_n "(cached) " >&6
70687039 else
70697040 i=0
7070 teststring="ABCD"
7041 teststring=ABCD
70717042
70727043 case $build_os in
70737044 msdosdjgpp*)
71077078 lt_cv_sys_max_cmd_len=8192;
71087079 ;;
71097080
7110 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
7081 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
71117082 # This has been around since 386BSD, at least. Likely further.
71127083 if test -x /sbin/sysctl; then
71137084 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
71577128 ;;
71587129 *)
71597130 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
7160 if test -n "$lt_cv_sys_max_cmd_len"; then
7131 if test -n "$lt_cv_sys_max_cmd_len" && \
7132 test undefined != "$lt_cv_sys_max_cmd_len"; then
71617133 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
71627134 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
71637135 else
71647136 # Make teststring a little bigger before we do anything with it.
71657137 # a 1K string should be a reasonable start.
7166 for i in 1 2 3 4 5 6 7 8 ; do
7138 for i in 1 2 3 4 5 6 7 8; do
71677139 teststring=$teststring$teststring
71687140 done
71697141 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
71707142 # If test is not a shell built-in, we'll probably end up computing a
71717143 # maximum length that is only half of the actual maximum length, but
71727144 # we can't tell.
7173 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
7145 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
71747146 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
7175 test $i != 17 # 1/2 MB should be enough
7147 test 17 != "$i" # 1/2 MB should be enough
71767148 do
71777149 i=`expr $i + 1`
71787150 teststring=$teststring$teststring
71907162
71917163 fi
71927164
7193 if test -n $lt_cv_sys_max_cmd_len ; then
7165 if test -n "$lt_cv_sys_max_cmd_len"; then
71947166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
71957167 $as_echo "$lt_cv_sys_max_cmd_len" >&6; }
71967168 else
72077179 : ${CP="cp -f"}
72087180 : ${MV="mv -f"}
72097181 : ${RM="rm -f"}
7210
7211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
7212 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
7213 # Try some XSI features
7214 xsi_shell=no
7215 ( _lt_dummy="a/b/c"
7216 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7217 = c,a/b,b/c, \
7218 && eval 'test $(( 1 + 1 )) -eq 2 \
7219 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7220 && xsi_shell=yes
7221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
7222 $as_echo "$xsi_shell" >&6; }
7223
7224
7225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
7226 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
7227 lt_shell_append=no
7228 ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
7229 >/dev/null 2>&1 \
7230 && lt_shell_append=yes
7231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
7232 $as_echo "$lt_shell_append" >&6; }
7233
72347182
72357183 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
72367184 lt_unset=unset
73547302 reload_cmds='$LD$reload_flag -o $output$reload_objs'
73557303 case $host_os in
73567304 cygwin* | mingw* | pw32* | cegcc*)
7357 if test "$GCC" != yes; then
7305 if test yes != "$GCC"; then
73587306 reload_cmds=false
73597307 fi
73607308 ;;
73617309 darwin*)
7362 if test "$GCC" = yes; then
7363 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
7310 if test yes = "$GCC"; then
7311 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
73647312 else
73657313 reload_cmds='$LD$reload_flag -o $output$reload_objs'
73667314 fi
74857433 # Need to set the preceding variable on all platforms that support
74867434 # interlibrary dependencies.
74877435 # 'none' -- dependencies not supported.
7488 # `unknown' -- same as none, but documents that we really don't know.
7436 # 'unknown' -- same as none, but documents that we really don't know.
74897437 # 'pass_all' -- all dependencies passed with no checks.
74907438 # 'test_compile' -- check by making test program.
74917439 # 'file_magic [[regex]]' -- check by looking for files in library path
7492 # which responds to the $file_magic_cmd with a given extended regex.
7493 # If you have `file' or equivalent on your system and you're not sure
7494 # whether `pass_all' will *always* work, you probably want this one.
7440 # that responds to the $file_magic_cmd with a given extended regex.
7441 # If you have 'file' or equivalent on your system and you're not sure
7442 # whether 'pass_all' will *always* work, you probably want this one.
74957443
74967444 case $host_os in
74977445 aix[4-9]*)
75187466 # Base MSYS/MinGW do not provide the 'file' command needed by
75197467 # func_win32_libid shell function, so use a weaker test based on 'objdump',
75207468 # unless we find 'file', for example because we are cross-compiling.
7521 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
7522 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
7469 if ( file / ) >/dev/null 2>&1; then
75237470 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
75247471 lt_cv_file_magic_cmd='func_win32_libid'
75257472 else
75537500 else
75547501 lt_cv_deplibs_check_method=pass_all
75557502 fi
7556 ;;
7557
7558 gnu*)
7559 lt_cv_deplibs_check_method=pass_all
75607503 ;;
75617504
75627505 haiku*)
75977540 ;;
75987541
75997542 # This must be glibc/ELF.
7600 linux* | k*bsd*-gnu | kopensolaris*-gnu)
7543 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
76017544 lt_cv_deplibs_check_method=pass_all
76027545 ;;
76037546
76197562 lt_cv_deplibs_check_method=pass_all
76207563 ;;
76217564
7622 openbsd*)
7623 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7565 openbsd* | bitrig*)
7566 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
76247567 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
76257568 else
76267569 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
76737616 tpf*)
76747617 lt_cv_deplibs_check_method=pass_all
76757618 ;;
7619 os2*)
7620 lt_cv_deplibs_check_method=pass_all
7621 ;;
76767622 esac
76777623
76787624 fi
78277773
78287774 case $host_os in
78297775 cygwin* | mingw* | pw32* | cegcc*)
7830 # two different shell functions defined in ltmain.sh
7831 # decide which to use based on capabilities of $DLLTOOL
7776 # two different shell functions defined in ltmain.sh;
7777 # decide which one to use based on capabilities of $DLLTOOL
78327778 case `$DLLTOOL --help 2>&1` in
78337779 *--identify-strict*)
78347780 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
78407786 ;;
78417787 *)
78427788 # fallback: assume linklib IS sharedlib
7843 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
7789 lt_cv_sharedlib_from_linklib_cmd=$ECHO
78447790 ;;
78457791 esac
78467792
79947940 ac_status=$?
79957941 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
79967942 test $ac_status = 0; }
7997 if test "$ac_status" -eq 0; then
7943 if test 0 -eq "$ac_status"; then
79987944 # Ensure the archiver fails upon bogus file names.
79997945 rm -f conftest.$ac_objext libconftest.a
80007946 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
80027948 ac_status=$?
80037949 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
80047950 test $ac_status = 0; }
8005 if test "$ac_status" -ne 0; then
7951 if test 0 -ne "$ac_status"; then
80067952 lt_cv_ar_at_file=@
80077953 fi
80087954 fi
80157961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
80167962 $as_echo "$lt_cv_ar_at_file" >&6; }
80177963
8018 if test "x$lt_cv_ar_at_file" = xno; then
7964 if test no = "$lt_cv_ar_at_file"; then
80197965 archiver_list_spec=
80207966 else
80217967 archiver_list_spec=$lt_cv_ar_at_file
82328178
82338179 if test -n "$RANLIB"; then
82348180 case $host_os in
8235 openbsd*)
8181 bitrig* | openbsd*)
82368182 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
82378183 ;;
82388184 *)
83228268 symcode='[ABCDGISTW]'
83238269 ;;
83248270 hpux*)
8325 if test "$host_cpu" = ia64; then
8271 if test ia64 = "$host_cpu"; then
83268272 symcode='[ABCDEGRST]'
83278273 fi
83288274 ;;
83558301 symcode='[ABCDGIRSTW]' ;;
83568302 esac
83578303
8304 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8305 # Gets list of data symbols to import.
8306 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
8307 # Adjust the below global symbol transforms to fixup imported variables.
8308 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
8309 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
8310 lt_c_name_lib_hook="\
8311 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
8312 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
8313 else
8314 # Disable hooks by default.
8315 lt_cv_sys_global_symbol_to_import=
8316 lt_cdecl_hook=
8317 lt_c_name_hook=
8318 lt_c_name_lib_hook=
8319 fi
8320
83588321 # Transform an extracted symbol line into a proper C declaration.
83598322 # Some systems (esp. on ia64) link data and code symbols differently,
83608323 # so use this general approach.
8361 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
8324 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
8325 $lt_cdecl_hook\
8326 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
8327 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
83628328
83638329 # Transform an extracted symbol line into symbol name and symbol address
8364 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
8365 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
8330 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
8331 $lt_c_name_hook\
8332 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
8333 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
8334
8335 # Transform an extracted symbol line into symbol name with lib prefix and
8336 # symbol address.
8337 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
8338 $lt_c_name_lib_hook\
8339 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
8340 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
8341 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
83668342
83678343 # Handle CRLF in mingw tool chain
83688344 opt_cr=
83808356
83818357 # Write the raw and C identifiers.
83828358 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8383 # Fake it for dumpbin and say T for any non-static function
8384 # and D for any global variable.
8359 # Fake it for dumpbin and say T for any non-static function,
8360 # D for any global variable and I for any imported variable.
83858361 # Also find C++ and __fastcall symbols from MSVC++,
83868362 # which start with @ or ?.
83878363 lt_cv_sys_global_symbol_pipe="$AWK '"\
83888364 " {last_section=section; section=\$ 3};"\
83898365 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
83908366 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
8367 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
8368 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
8369 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
83918370 " \$ 0!~/External *\|/{next};"\
83928371 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
83938372 " {if(hide[section]) next};"\
8394 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
8395 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
8396 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
8397 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
8373 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
8374 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
8375 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
8376 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
83988377 " ' prfx=^$ac_symprfx"
83998378 else
84008379 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
84428421 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
84438422 cat <<_LT_EOF > conftest.$ac_ext
84448423 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
8445 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
8446 /* DATA imports from DLLs on WIN32 con't be const, because runtime
8424 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
8425 /* DATA imports from DLLs on WIN32 can't be const, because runtime
84478426 relocations are performed -- see ld's documentation on pseudo-relocs. */
84488427 # define LT_DLSYM_CONST
8449 #elif defined(__osf__)
8428 #elif defined __osf__
84508429 /* This system does not cope well with relocations in const data. */
84518430 # define LT_DLSYM_CONST
84528431 #else
84728451 {
84738452 { "@PROGRAM@", (void *) 0 },
84748453 _LT_EOF
8475 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
8454 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
84768455 cat <<\_LT_EOF >> conftest.$ac_ext
84778456 {0, (void *) 0}
84788457 };
84928471 mv conftest.$ac_objext conftstm.$ac_objext
84938472 lt_globsym_save_LIBS=$LIBS
84948473 lt_globsym_save_CFLAGS=$CFLAGS
8495 LIBS="conftstm.$ac_objext"
8474 LIBS=conftstm.$ac_objext
84968475 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
84978476 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
84988477 (eval $ac_link) 2>&5
84998478 ac_status=$?
85008479 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8501 test $ac_status = 0; } && test -s conftest${ac_exeext}; then
8480 test $ac_status = 0; } && test -s conftest$ac_exeext; then
85028481 pipe_works=yes
85038482 fi
85048483 LIBS=$lt_globsym_save_LIBS
85198498 rm -rf conftest* conftst*
85208499
85218500 # Do not use the global_symbol_pipe unless it works.
8522 if test "$pipe_works" = yes; then
8501 if test yes = "$pipe_works"; then
85238502 break
85248503 else
85258504 lt_cv_sys_global_symbol_pipe=
85728551
85738552
85748553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
85758564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
85768565 $as_echo_n "checking for sysroot... " >&6; }
85778566
85848573
85858574
85868575 lt_sysroot=
8587 case ${with_sysroot} in #(
8576 case $with_sysroot in #(
85888577 yes)
8589 if test "$GCC" = yes; then
8578 if test yes = "$GCC"; then
85908579 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
85918580 fi
85928581 ;; #(
85968585 no|'')
85978586 ;; #(
85988587 *)
8599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
8600 $as_echo "${with_sysroot}" >&6; }
8588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
8589 $as_echo "$with_sysroot" >&6; }
86018590 as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
86028591 ;;
86038592 esac
86098598
86108599
86118600
8601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
8602 $as_echo_n "checking for a working dd... " >&6; }
8603 if ${ac_cv_path_lt_DD+:} false; then :
8604 $as_echo_n "(cached) " >&6
8605 else
8606 printf 0123456789abcdef0123456789abcdef >conftest.i
8607 cat conftest.i conftest.i >conftest2.i
8608 : ${lt_DD:=$DD}
8609 if test -z "$lt_DD"; then
8610 ac_path_lt_DD_found=false
8611 # Loop through the user's path and test for each of PROGNAME-LIST
8612 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8613 for as_dir in $PATH
8614 do
8615 IFS=$as_save_IFS
8616 test -z "$as_dir" && as_dir=.
8617 for ac_prog in dd; do
8618 for ac_exec_ext in '' $ac_executable_extensions; do
8619 ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
8620 as_fn_executable_p "$ac_path_lt_DD" || continue
8621 if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
8622 cmp -s conftest.i conftest.out \
8623 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
8624 fi
8625 $ac_path_lt_DD_found && break 3
8626 done
8627 done
8628 done
8629 IFS=$as_save_IFS
8630 if test -z "$ac_cv_path_lt_DD"; then
8631 :
8632 fi
8633 else
8634 ac_cv_path_lt_DD=$lt_DD
8635 fi
8636
8637 rm -f conftest.i conftest2.i conftest.out
8638 fi
8639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
8640 $as_echo "$ac_cv_path_lt_DD" >&6; }
8641
8642
8643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
8644 $as_echo_n "checking how to truncate binary pipes... " >&6; }
8645 if ${lt_cv_truncate_bin+:} false; then :
8646 $as_echo_n "(cached) " >&6
8647 else
8648 printf 0123456789abcdef0123456789abcdef >conftest.i
8649 cat conftest.i conftest.i >conftest2.i
8650 lt_cv_truncate_bin=
8651 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
8652 cmp -s conftest.i conftest.out \
8653 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
8654 fi
8655 rm -f conftest.i conftest2.i conftest.out
8656 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
8657 fi
8658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
8659 $as_echo "$lt_cv_truncate_bin" >&6; }
8660
8661
8662
8663
8664
8665
8666
8667 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
8668 func_cc_basename ()
8669 {
8670 for cc_temp in $*""; do
8671 case $cc_temp in
8672 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8673 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8674 \-*) ;;
8675 *) break;;
8676 esac
8677 done
8678 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
8679 }
8680
86128681 # Check whether --enable-libtool-lock was given.
86138682 if test "${enable_libtool_lock+set}" = set; then :
86148683 enableval=$enable_libtool_lock;
86158684 fi
86168685
8617 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
8686 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
86188687
86198688 # Some flags need to be propagated to the compiler or linker for good
86208689 # libtool support.
86218690 case $host in
86228691 ia64-*-hpux*)
8623 # Find out which ABI we are using.
8692 # Find out what ABI is being produced by ac_compile, and set mode
8693 # options accordingly.
86248694 echo 'int i;' > conftest.$ac_ext
86258695 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
86268696 (eval $ac_compile) 2>&5
86298699 test $ac_status = 0; }; then
86308700 case `/usr/bin/file conftest.$ac_objext` in
86318701 *ELF-32*)
8632 HPUX_IA64_MODE="32"
8702 HPUX_IA64_MODE=32
86338703 ;;
86348704 *ELF-64*)
8635 HPUX_IA64_MODE="64"
8705 HPUX_IA64_MODE=64
86368706 ;;
86378707 esac
86388708 fi
86398709 rm -rf conftest*
86408710 ;;
86418711 *-*-irix6*)
8642 # Find out which ABI we are using.
8712 # Find out what ABI is being produced by ac_compile, and set linker
8713 # options accordingly.
86438714 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
86448715 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
86458716 (eval $ac_compile) 2>&5
86468717 ac_status=$?
86478718 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
86488719 test $ac_status = 0; }; then
8649 if test "$lt_cv_prog_gnu_ld" = yes; then
8720 if test yes = "$lt_cv_prog_gnu_ld"; then
86508721 case `/usr/bin/file conftest.$ac_objext` in
86518722 *32-bit*)
86528723 LD="${LD-ld} -melf32bsmip"
86758746 rm -rf conftest*
86768747 ;;
86778748
8749 mips64*-*linux*)
8750 # Find out what ABI is being produced by ac_compile, and set linker
8751 # options accordingly.
8752 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
8753 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8754 (eval $ac_compile) 2>&5
8755 ac_status=$?
8756 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8757 test $ac_status = 0; }; then
8758 emul=elf
8759 case `/usr/bin/file conftest.$ac_objext` in
8760 *32-bit*)
8761 emul="${emul}32"
8762 ;;
8763 *64-bit*)
8764 emul="${emul}64"
8765 ;;
8766 esac
8767 case `/usr/bin/file conftest.$ac_objext` in
8768 *MSB*)
8769 emul="${emul}btsmip"
8770 ;;
8771 *LSB*)
8772 emul="${emul}ltsmip"
8773 ;;
8774 esac
8775 case `/usr/bin/file conftest.$ac_objext` in
8776 *N32*)
8777 emul="${emul}n32"
8778 ;;
8779 esac
8780 LD="${LD-ld} -m $emul"
8781 fi
8782 rm -rf conftest*
8783 ;;
8784
86788785 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
86798786 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
8680 # Find out which ABI we are using.
8787 # Find out what ABI is being produced by ac_compile, and set linker
8788 # options accordingly. Note that the listed cases only cover the
8789 # situations where additional linker options are needed (such as when
8790 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
8791 # vice versa); the common cases where no linker options are needed do
8792 # not appear in the list.
86818793 echo 'int i;' > conftest.$ac_ext
86828794 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
86838795 (eval $ac_compile) 2>&5
86918803 LD="${LD-ld} -m elf_i386_fbsd"
86928804 ;;
86938805 x86_64-*linux*)
8694 LD="${LD-ld} -m elf_i386"
8806 case `/usr/bin/file conftest.o` in
8807 *x86-64*)
8808 LD="${LD-ld} -m elf32_x86_64"
8809 ;;
8810 *)
8811 LD="${LD-ld} -m elf_i386"
8812 ;;
8813 esac
86958814 ;;
86968815 powerpc64le-*linux*)
86978816 LD="${LD-ld} -m elf32lppclinux"
87368855
87378856 *-*-sco3.2v5*)
87388857 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
8739 SAVE_CFLAGS="$CFLAGS"
8858 SAVE_CFLAGS=$CFLAGS
87408859 CFLAGS="$CFLAGS -belf"
87418860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
87428861 $as_echo_n "checking whether the C compiler needs -belf... " >&6; }
87768895 fi
87778896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
87788897 $as_echo "$lt_cv_cc_needs_belf" >&6; }
8779 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
8898 if test yes != "$lt_cv_cc_needs_belf"; then
87808899 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
8781 CFLAGS="$SAVE_CFLAGS"
8900 CFLAGS=$SAVE_CFLAGS
87828901 fi
87838902 ;;
87848903 *-*solaris*)
8785 # Find out which ABI we are using.
8904 # Find out what ABI is being produced by ac_compile, and set linker
8905 # options accordingly.
87868906 echo 'int i;' > conftest.$ac_ext
87878907 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
87888908 (eval $ac_compile) 2>&5
87948914 case $lt_cv_prog_gnu_ld in
87958915 yes*)
87968916 case $host in
8797 i?86-*-solaris*)
8917 i?86-*-solaris*|x86_64-*-solaris*)
87988918 LD="${LD-ld} -m elf_x86_64"
87998919 ;;
88008920 sparc*-*-solaris*)
88038923 esac
88048924 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
88058925 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
8806 LD="${LD-ld}_sol2"
8926 LD=${LD-ld}_sol2
88078927 fi
88088928 ;;
88098929 *)
88198939 ;;
88208940 esac
88218941
8822 need_locks="$enable_libtool_lock"
8942 need_locks=$enable_libtool_lock
88238943
88248944 if test -n "$ac_tool_prefix"; then
88258945 # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
89309050 fi
89319051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
89329052 $as_echo "$lt_cv_path_mainfest_tool" >&6; }
8933 if test "x$lt_cv_path_mainfest_tool" != xyes; then
9053 if test yes != "$lt_cv_path_mainfest_tool"; then
89349054 MANIFEST_TOOL=:
89359055 fi
89369056
94339553 $as_echo_n "(cached) " >&6
94349554 else
94359555 lt_cv_apple_cc_single_mod=no
9436 if test -z "${LT_MULTI_MODULE}"; then
9556 if test -z "$LT_MULTI_MODULE"; then
94379557 # By default we will add the -single_module flag. You can override
94389558 # by either setting the environment variable LT_MULTI_MODULE
94399559 # non-empty at configure time, or by adding -multi_module to the
94519571 cat conftest.err >&5
94529572 # Otherwise, if the output was created with a 0 exit code from
94539573 # the compiler, it worked.
9454 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
9574 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
94559575 lt_cv_apple_cc_single_mod=yes
94569576 else
94579577 cat conftest.err >&5
94909610 fi
94919611 rm -f core conftest.err conftest.$ac_objext \
94929612 conftest$ac_exeext conftest.$ac_ext
9493 LDFLAGS="$save_LDFLAGS"
9613 LDFLAGS=$save_LDFLAGS
94949614
94959615 fi
94969616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
95199639 _lt_result=$?
95209640 if test -s conftest.err && $GREP force_load conftest.err; then
95219641 cat conftest.err >&5
9522 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
9642 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
95239643 lt_cv_ld_force_load=yes
95249644 else
95259645 cat conftest.err >&5
95329652 $as_echo "$lt_cv_ld_force_load" >&6; }
95339653 case $host_os in
95349654 rhapsody* | darwin1.[012])
9535 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
9655 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
95369656 darwin1.*)
9537 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
9657 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
95389658 darwin*) # darwin 5.x on
95399659 # if running on 10.5 or later, the deployment target defaults
95409660 # to the OS version, if on x86, and 10.4, the deployment
95419661 # target defaults to 10.4. Don't you love it?
95429662 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
95439663 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
9544 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
9545 10.[012]*)
9546 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
9664 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
9665 10.[012][,.]*)
9666 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
95479667 10.*)
9548 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
9668 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
95499669 esac
95509670 ;;
95519671 esac
9552 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
9672 if test yes = "$lt_cv_apple_cc_single_mod"; then
95539673 _lt_dar_single_mod='$single_module'
95549674 fi
9555 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
9556 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
9675 if test yes = "$lt_cv_ld_exported_symbols_list"; then
9676 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
95579677 else
9558 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
9678 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
95599679 fi
9560 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
9680 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
95619681 _lt_dsymutil='~$DSYMUTIL $lib || :'
95629682 else
95639683 _lt_dsymutil=
95649684 fi
95659685 ;;
95669686 esac
9687
9688 # func_munge_path_list VARIABLE PATH
9689 # -----------------------------------
9690 # VARIABLE is name of variable containing _space_ separated list of
9691 # directories to be munged by the contents of PATH, which is string
9692 # having a format:
9693 # "DIR[:DIR]:"
9694 # string "DIR[ DIR]" will be prepended to VARIABLE
9695 # ":DIR[:DIR]"
9696 # string "DIR[ DIR]" will be appended to VARIABLE
9697 # "DIRP[:DIRP]::[DIRA:]DIRA"
9698 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
9699 # "DIRA[ DIRA]" will be appended to VARIABLE
9700 # "DIR[:DIR]"
9701 # VARIABLE will be replaced by "DIR[ DIR]"
9702 func_munge_path_list ()
9703 {
9704 case x$2 in
9705 x)
9706 ;;
9707 *:)
9708 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
9709 ;;
9710 x:*)
9711 eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
9712 ;;
9713 *::*)
9714 eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
9715 eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
9716 ;;
9717 *)
9718 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
9719 ;;
9720 esac
9721 }
95679722
95689723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
95699724 $as_echo_n "checking for ANSI C header files... " >&6; }
97289883 *)
97299884 enable_shared=no
97309885 # Look at the argument we got. We use all the common list separators.
9731 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9886 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
97329887 for pkg in $enableval; do
9733 IFS="$lt_save_ifs"
9888 IFS=$lt_save_ifs
97349889 if test "X$pkg" = "X$p"; then
97359890 enable_shared=yes
97369891 fi
97379892 done
9738 IFS="$lt_save_ifs"
9893 IFS=$lt_save_ifs
97399894 ;;
97409895 esac
97419896 else
97599914 *)
97609915 enable_static=no
97619916 # Look at the argument we got. We use all the common list separators.
9762 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9917 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
97639918 for pkg in $enableval; do
9764 IFS="$lt_save_ifs"
9919 IFS=$lt_save_ifs
97659920 if test "X$pkg" = "X$p"; then
97669921 enable_static=yes
97679922 fi
97689923 done
9769 IFS="$lt_save_ifs"
9924 IFS=$lt_save_ifs
97709925 ;;
97719926 esac
97729927 else
97909945 *)
97919946 pic_mode=default
97929947 # Look at the argument we got. We use all the common list separators.
9793 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9948 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
97949949 for lt_pkg in $withval; do
9795 IFS="$lt_save_ifs"
9950 IFS=$lt_save_ifs
97969951 if test "X$lt_pkg" = "X$lt_p"; then
97979952 pic_mode=yes
97989953 fi
97999954 done
9800 IFS="$lt_save_ifs"
9955 IFS=$lt_save_ifs
98019956 ;;
98029957 esac
98039958 else
98049959 pic_mode=default
98059960 fi
98069961
9807
9808 test -z "$pic_mode" && pic_mode=default
98099962
98109963
98119964
98229975 *)
98239976 enable_fast_install=no
98249977 # Look at the argument we got. We use all the common list separators.
9825 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9978 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
98269979 for pkg in $enableval; do
9827 IFS="$lt_save_ifs"
9980 IFS=$lt_save_ifs
98289981 if test "X$pkg" = "X$p"; then
98299982 enable_fast_install=yes
98309983 fi
98319984 done
9832 IFS="$lt_save_ifs"
9985 IFS=$lt_save_ifs
98339986 ;;
98349987 esac
98359988 else
98439996
98449997
98459998
9999 shared_archive_member_spec=
10000 case $host,$enable_shared in
10001 power*-*-aix[5-9]*,yes)
10002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
10003 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
10004
10005 # Check whether --with-aix-soname was given.
10006 if test "${with_aix_soname+set}" = set; then :
10007 withval=$with_aix_soname; case $withval in
10008 aix|svr4|both)
10009 ;;
10010 *)
10011 as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
10012 ;;
10013 esac
10014 lt_cv_with_aix_soname=$with_aix_soname
10015 else
10016 if ${lt_cv_with_aix_soname+:} false; then :
10017 $as_echo_n "(cached) " >&6
10018 else
10019 lt_cv_with_aix_soname=aix
10020 fi
10021
10022 with_aix_soname=$lt_cv_with_aix_soname
10023 fi
10024
10025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
10026 $as_echo "$with_aix_soname" >&6; }
10027 if test aix != "$with_aix_soname"; then
10028 # For the AIX way of multilib, we name the shared archive member
10029 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
10030 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
10031 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
10032 # the AIX toolchain works better with OBJECT_MODE set (default 32).
10033 if test 64 = "${OBJECT_MODE-32}"; then
10034 shared_archive_member_spec=shr_64
10035 else
10036 shared_archive_member_spec=shr
10037 fi
10038 fi
10039 ;;
10040 *)
10041 with_aix_soname=aix
10042 ;;
10043 esac
10044
10045
10046
10047
10048
10049
10050
984610051
984710052
984810053
984910054 # This can be used to rebuild libtool when needed
9850 LIBTOOL_DEPS="$ltmain"
10055 LIBTOOL_DEPS=$ltmain
985110056
985210057 # Always use our own libtool.
985310058 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
989610101
989710102
989810103
9899 if test -n "${ZSH_VERSION+set}" ; then
10104 if test -n "${ZSH_VERSION+set}"; then
990010105 setopt NO_GLOB_SUBST
990110106 fi
990210107
993510140 # AIX sometimes has problems with the GCC collect2 program. For some
993610141 # reason, if we set the COLLECT_NAMES environment variable, the problems
993710142 # vanish in a puff of smoke.
9938 if test "X${COLLECT_NAMES+set}" != Xset; then
10143 if test set != "${COLLECT_NAMES+set}"; then
993910144 COLLECT_NAMES=
994010145 export COLLECT_NAMES
994110146 fi
994610151 ofile=libtool
994710152 can_build_shared=yes
994810153
9949 # All known linkers require a `.a' archive for static linking (except MSVC,
10154 # All known linkers require a '.a' archive for static linking (except MSVC,
995010155 # which needs '.lib').
995110156 libext=a
995210157
9953 with_gnu_ld="$lt_cv_prog_gnu_ld"
9954
9955 old_CC="$CC"
9956 old_CFLAGS="$CFLAGS"
10158 with_gnu_ld=$lt_cv_prog_gnu_ld
10159
10160 old_CC=$CC
10161 old_CFLAGS=$CFLAGS
995710162
995810163 # Set sane defaults for various variables
995910164 test -z "$CC" && CC=cc
996210167 test -z "$LD" && LD=ld
996310168 test -z "$ac_objext" && ac_objext=o
996410169
9965 for cc_temp in $compiler""; do
9966 case $cc_temp in
9967 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
9968 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
9969 \-*) ;;
9970 *) break;;
9971 esac
9972 done
9973 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
10170 func_cc_basename $compiler
10171 cc_basename=$func_cc_basename_result
997410172
997510173
997610174 # Only perform the check for file, if the check method requires it
998510183 else
998610184 case $MAGIC_CMD in
998710185 [\\/*] | ?:[\\/]*)
9988 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
10186 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
998910187 ;;
999010188 *)
9991 lt_save_MAGIC_CMD="$MAGIC_CMD"
9992 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
10189 lt_save_MAGIC_CMD=$MAGIC_CMD
10190 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
999310191 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
999410192 for ac_dir in $ac_dummy; do
9995 IFS="$lt_save_ifs"
10193 IFS=$lt_save_ifs
999610194 test -z "$ac_dir" && ac_dir=.
9997 if test -f $ac_dir/${ac_tool_prefix}file; then
9998 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
10195 if test -f "$ac_dir/${ac_tool_prefix}file"; then
10196 lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
999910197 if test -n "$file_magic_test_file"; then
1000010198 case $deplibs_check_method in
1000110199 "file_magic "*)
1000210200 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10003 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
10201 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
1000410202 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1000510203 $EGREP "$file_magic_regex" > /dev/null; then
1000610204 :
1002310221 break
1002410222 fi
1002510223 done
10026 IFS="$lt_save_ifs"
10027 MAGIC_CMD="$lt_save_MAGIC_CMD"
10224 IFS=$lt_save_ifs
10225 MAGIC_CMD=$lt_save_MAGIC_CMD
1002810226 ;;
1002910227 esac
1003010228 fi
1003110229
10032 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
10230 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
1003310231 if test -n "$MAGIC_CMD"; then
1003410232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
1003510233 $as_echo "$MAGIC_CMD" >&6; }
1005110249 else
1005210250 case $MAGIC_CMD in
1005310251 [\\/*] | ?:[\\/]*)
10054 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
10252 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
1005510253 ;;
1005610254 *)
10057 lt_save_MAGIC_CMD="$MAGIC_CMD"
10058 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
10255 lt_save_MAGIC_CMD=$MAGIC_CMD
10256 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
1005910257 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
1006010258 for ac_dir in $ac_dummy; do
10061 IFS="$lt_save_ifs"
10259 IFS=$lt_save_ifs
1006210260 test -z "$ac_dir" && ac_dir=.
10063 if test -f $ac_dir/file; then
10064 lt_cv_path_MAGIC_CMD="$ac_dir/file"
10261 if test -f "$ac_dir/file"; then
10262 lt_cv_path_MAGIC_CMD=$ac_dir/"file"
1006510263 if test -n "$file_magic_test_file"; then
1006610264 case $deplibs_check_method in
1006710265 "file_magic "*)
1006810266 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10069 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
10267 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
1007010268 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1007110269 $EGREP "$file_magic_regex" > /dev/null; then
1007210270 :
1008910287 break
1009010288 fi
1009110289 done
10092 IFS="$lt_save_ifs"
10093 MAGIC_CMD="$lt_save_MAGIC_CMD"
10290 IFS=$lt_save_ifs
10291 MAGIC_CMD=$lt_save_MAGIC_CMD
1009410292 ;;
1009510293 esac
1009610294 fi
1009710295
10098 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
10296 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
1009910297 if test -n "$MAGIC_CMD"; then
1010010298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
1010110299 $as_echo "$MAGIC_CMD" >&6; }
1011610314
1011710315 # Use C for the default configuration in the libtool script
1011810316
10119 lt_save_CC="$CC"
10317 lt_save_CC=$CC
1012010318 ac_ext=c
1012110319 ac_cpp='$CPP $CPPFLAGS'
1012210320 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1017810376
1017910377 lt_prog_compiler_no_builtin_flag=
1018010378
10181 if test "$GCC" = yes; then
10379 if test yes = "$GCC"; then
1018210380 case $cc_basename in
1018310381 nvcc*)
1018410382 lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
1019410392 lt_cv_prog_compiler_rtti_exceptions=no
1019510393 ac_outfile=conftest.$ac_objext
1019610394 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10197 lt_compiler_flag="-fno-rtti -fno-exceptions"
10395 lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment
1019810396 # Insert the option either (1) after the last *FLAGS variable, or
1019910397 # (2) before a word containing "conftest.", or (3) at the end.
1020010398 # Note that $ac_compile itself does not contain backslashes and begins
1022410422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
1022510423 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
1022610424
10227 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
10425 if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
1022810426 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
1022910427 else
1023010428 :
1024210440 lt_prog_compiler_static=
1024310441
1024410442
10245 if test "$GCC" = yes; then
10443 if test yes = "$GCC"; then
1024610444 lt_prog_compiler_wl='-Wl,'
1024710445 lt_prog_compiler_static='-static'
1024810446
1024910447 case $host_os in
1025010448 aix*)
1025110449 # All AIX code is PIC.
10252 if test "$host_cpu" = ia64; then
10450 if test ia64 = "$host_cpu"; then
1025310451 # AIX 5 now supports IA64 processor
1025410452 lt_prog_compiler_static='-Bstatic'
1025510453 fi
10454 lt_prog_compiler_pic='-fPIC'
1025610455 ;;
1025710456
1025810457 amigaos*)
1026310462 ;;
1026410463 m68k)
1026510464 # FIXME: we need at least 68020 code to build shared libraries, but
10266 # adding the `-m68020' flag to GCC prevents building anything better,
10267 # like `-m68040'.
10465 # adding the '-m68020' flag to GCC prevents building anything better,
10466 # like '-m68040'.
1026810467 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
1026910468 ;;
1027010469 esac
1028010479 # Although the cygwin gcc ignores -fPIC, still need this for old-style
1028110480 # (--disable-auto-import) libraries
1028210481 lt_prog_compiler_pic='-DDLL_EXPORT'
10482 case $host_os in
10483 os2*)
10484 lt_prog_compiler_static='$wl-static'
10485 ;;
10486 esac
1028310487 ;;
1028410488
1028510489 darwin* | rhapsody*)
1035010554 case $host_os in
1035110555 aix*)
1035210556 lt_prog_compiler_wl='-Wl,'
10353 if test "$host_cpu" = ia64; then
10557 if test ia64 = "$host_cpu"; then
1035410558 # AIX 5 now supports IA64 processor
1035510559 lt_prog_compiler_static='-Bstatic'
1035610560 else
1035810562 fi
1035910563 ;;
1036010564
10565 darwin* | rhapsody*)
10566 # PIC is the default on this platform
10567 # Common symbols not allowed in MH_DYLIB files
10568 lt_prog_compiler_pic='-fno-common'
10569 case $cc_basename in
10570 nagfor*)
10571 # NAG Fortran compiler
10572 lt_prog_compiler_wl='-Wl,-Wl,,'
10573 lt_prog_compiler_pic='-PIC'
10574 lt_prog_compiler_static='-Bstatic'
10575 ;;
10576 esac
10577 ;;
10578
1036110579 mingw* | cygwin* | pw32* | os2* | cegcc*)
1036210580 # This hack is so that the source file can tell whether it is being
1036310581 # built for inclusion in a dll (and should export symbols for example).
1036410582 lt_prog_compiler_pic='-DDLL_EXPORT'
10583 case $host_os in
10584 os2*)
10585 lt_prog_compiler_static='$wl-static'
10586 ;;
10587 esac
1036510588 ;;
1036610589
1036710590 hpux9* | hpux10* | hpux11*)
1037710600 ;;
1037810601 esac
1037910602 # Is there a better lt_prog_compiler_static that works with the bundled CC?
10380 lt_prog_compiler_static='${wl}-a ${wl}archive'
10603 lt_prog_compiler_static='$wl-a ${wl}archive'
1038110604 ;;
1038210605
1038310606 irix5* | irix6* | nonstopux*)
1038610609 lt_prog_compiler_static='-non_shared'
1038710610 ;;
1038810611
10389 linux* | k*bsd*-gnu | kopensolaris*-gnu)
10612 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
1039010613 case $cc_basename in
10391 # old Intel for x86_64 which still supported -KPIC.
10614 # old Intel for x86_64, which still supported -KPIC.
1039210615 ecc*)
1039310616 lt_prog_compiler_wl='-Wl,'
1039410617 lt_prog_compiler_pic='-KPIC'
1041210635 lt_prog_compiler_wl='-Wl,-Wl,,'
1041310636 lt_prog_compiler_pic='-PIC'
1041410637 lt_prog_compiler_static='-Bstatic'
10638 ;;
10639 tcc*)
10640 # Fabrice Bellard et al's Tiny C Compiler
10641 lt_prog_compiler_wl='-Wl,'
10642 lt_prog_compiler_pic='-fPIC'
10643 lt_prog_compiler_static='-static'
1041510644 ;;
1041610645 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
1041710646 # Portland Group compilers (*not* the Pentium gcc compiler,
1051010739 ;;
1051110740
1051210741 sysv4*MP*)
10513 if test -d /usr/nec ;then
10742 if test -d /usr/nec; then
1051410743 lt_prog_compiler_pic='-Kconform_pic'
1051510744 lt_prog_compiler_static='-Bstatic'
1051610745 fi
1053910768 fi
1054010769
1054110770 case $host_os in
10542 # For platforms which do not support PIC, -DPIC is meaningless:
10771 # For platforms that do not support PIC, -DPIC is meaningless:
1054310772 *djgpp*)
1054410773 lt_prog_compiler_pic=
1054510774 ;;
1057110800 lt_cv_prog_compiler_pic_works=no
1057210801 ac_outfile=conftest.$ac_objext
1057310802 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10574 lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
10803 lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
1057510804 # Insert the option either (1) after the last *FLAGS variable, or
1057610805 # (2) before a word containing "conftest.", or (3) at the end.
1057710806 # Note that $ac_compile itself does not contain backslashes and begins
1060110830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
1060210831 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
1060310832
10604 if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
10833 if test yes = "$lt_cv_prog_compiler_pic_works"; then
1060510834 case $lt_prog_compiler_pic in
1060610835 "" | " "*) ;;
1060710836 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
1063310862 $as_echo_n "(cached) " >&6
1063410863 else
1063510864 lt_cv_prog_compiler_static_works=no
10636 save_LDFLAGS="$LDFLAGS"
10865 save_LDFLAGS=$LDFLAGS
1063710866 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
1063810867 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1063910868 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1065210881 fi
1065310882 fi
1065410883 $RM -r conftest*
10655 LDFLAGS="$save_LDFLAGS"
10884 LDFLAGS=$save_LDFLAGS
1065610885
1065710886 fi
1065810887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
1065910888 $as_echo "$lt_cv_prog_compiler_static_works" >&6; }
1066010889
10661 if test x"$lt_cv_prog_compiler_static_works" = xyes; then
10890 if test yes = "$lt_cv_prog_compiler_static_works"; then
1066210891 :
1066310892 else
1066410893 lt_prog_compiler_static=
1077811007
1077911008
1078011009
10781 hard_links="nottested"
10782 if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
11010 hard_links=nottested
11011 if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
1078311012 # do not overwrite the value of need_locks provided by the user
1078411013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
1078511014 $as_echo_n "checking if we can lock with hard links... " >&6; }
1079111020 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1079211021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
1079311022 $as_echo "$hard_links" >&6; }
10794 if test "$hard_links" = no; then
10795 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
10796 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
11023 if test no = "$hard_links"; then
11024 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
11025 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
1079711026 need_locks=warn
1079811027 fi
1079911028 else
1083611065 # included in the symbol list
1083711066 include_expsyms=
1083811067 # exclude_expsyms can be an extended regexp of symbols to exclude
10839 # it will be wrapped by ` (' and `)$', so one must not match beginning or
10840 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
10841 # as well as any symbol that contains `d'.
11068 # it will be wrapped by ' (' and ')$', so one must not match beginning or
11069 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
11070 # as well as any symbol that contains 'd'.
1084211071 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
1084311072 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1084411073 # platforms (ab)use it in PIC code, but their linkers get confused if
1085311082 # FIXME: the MSVC++ port hasn't been tested in a loooong time
1085411083 # When not using gcc, we currently assume that we are using
1085511084 # Microsoft Visual C++.
10856 if test "$GCC" != yes; then
11085 if test yes != "$GCC"; then
1085711086 with_gnu_ld=no
1085811087 fi
1085911088 ;;
1086111090 # we just hope/assume this is gcc and not c89 (= MSVC++)
1086211091 with_gnu_ld=yes
1086311092 ;;
10864 openbsd*)
11093 openbsd* | bitrig*)
1086511094 with_gnu_ld=no
1086611095 ;;
1086711096 esac
1087111100 # On some targets, GNU ld is compatible enough with the native linker
1087211101 # that we're better off using the native interface for both.
1087311102 lt_use_gnu_ld_interface=no
10874 if test "$with_gnu_ld" = yes; then
11103 if test yes = "$with_gnu_ld"; then
1087511104 case $host_os in
1087611105 aix*)
1087711106 # The AIX port of GNU ld has always aspired to compatibility
1089311122 esac
1089411123 fi
1089511124
10896 if test "$lt_use_gnu_ld_interface" = yes; then
11125 if test yes = "$lt_use_gnu_ld_interface"; then
1089711126 # If archive_cmds runs LD, not CC, wlarc should be empty
10898 wlarc='${wl}'
11127 wlarc='$wl'
1089911128
1090011129 # Set some defaults for GNU ld with shared library support. These
1090111130 # are reset later if shared libraries are not supported. Putting them
1090211131 # here allows them to be overridden if necessary.
1090311132 runpath_var=LD_RUN_PATH
10904 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
10905 export_dynamic_flag_spec='${wl}--export-dynamic'
11133 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11134 export_dynamic_flag_spec='$wl--export-dynamic'
1090611135 # ancient GNU ld didn't support --whole-archive et. al.
1090711136 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
10908 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
11137 whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
1090911138 else
1091011139 whole_archive_flag_spec=
1091111140 fi
1091211141 supports_anon_versioning=no
10913 case `$LD -v 2>&1` in
11142 case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
1091411143 *GNU\ gold*) supports_anon_versioning=yes ;;
1091511144 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
1091611145 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
1092311152 case $host_os in
1092411153 aix[3-9]*)
1092511154 # On AIX/PPC, the GNU linker is very broken
10926 if test "$host_cpu" != ia64; then
11155 if test ia64 != "$host_cpu"; then
1092711156 ld_shlibs=no
1092811157 cat <<_LT_EOF 1>&2
1092911158
1094211171 case $host_cpu in
1094311172 powerpc)
1094411173 # see comment about AmigaOS4 .so support
10945 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11174 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
1094611175 archive_expsym_cmds=''
1094711176 ;;
1094811177 m68k)
1095811187 allow_undefined_flag=unsupported
1095911188 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1096011189 # support --undefined. This deserves some investigation. FIXME
10961 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11190 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
1096211191 else
1096311192 ld_shlibs=no
1096411193 fi
1096811197 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
1096911198 # as there is no search path for DLLs.
1097011199 hardcode_libdir_flag_spec='-L$libdir'
10971 export_dynamic_flag_spec='${wl}--export-all-symbols'
11200 export_dynamic_flag_spec='$wl--export-all-symbols'
1097211201 allow_undefined_flag=unsupported
1097311202 always_export_symbols=no
1097411203 enable_shared_with_static_runtimes=yes
1097611205 exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
1097711206
1097811207 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
10979 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
10980 # If the export-symbols file already is a .def file (1st line
10981 # is EXPORTS), use it as is; otherwise, prepend...
10982 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
10983 cp $export_symbols $output_objdir/$soname.def;
10984 else
10985 echo EXPORTS > $output_objdir/$soname.def;
10986 cat $export_symbols >> $output_objdir/$soname.def;
10987 fi~
10988 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11208 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11209 # If the export-symbols file already is a .def file, use it as
11210 # is; otherwise, prepend EXPORTS...
11211 archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
11212 cp $export_symbols $output_objdir/$soname.def;
11213 else
11214 echo EXPORTS > $output_objdir/$soname.def;
11215 cat $export_symbols >> $output_objdir/$soname.def;
11216 fi~
11217 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
1098911218 else
1099011219 ld_shlibs=no
1099111220 fi
1099211221 ;;
1099311222
1099411223 haiku*)
10995 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11224 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
1099611225 link_all_deplibs=yes
11226 ;;
11227
11228 os2*)
11229 hardcode_libdir_flag_spec='-L$libdir'
11230 hardcode_minus_L=yes
11231 allow_undefined_flag=unsupported
11232 shrext_cmds=.dll
11233 archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11234 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11235 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11236 $ECHO EXPORTS >> $output_objdir/$libname.def~
11237 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
11238 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11239 emximp -o $lib $output_objdir/$libname.def'
11240 archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11241 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11242 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11243 $ECHO EXPORTS >> $output_objdir/$libname.def~
11244 prefix_cmds="$SED"~
11245 if test EXPORTS = "`$SED 1q $export_symbols`"; then
11246 prefix_cmds="$prefix_cmds -e 1d";
11247 fi~
11248 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
11249 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
11250 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11251 emximp -o $lib $output_objdir/$libname.def'
11252 old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
11253 enable_shared_with_static_runtimes=yes
1099711254 ;;
1099811255
1099911256 interix[3-9]*)
1100011257 hardcode_direct=no
1100111258 hardcode_shlibpath_var=no
11002 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
11003 export_dynamic_flag_spec='${wl}-E'
11259 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11260 export_dynamic_flag_spec='$wl-E'
1100411261 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
1100511262 # Instead, shared libraries are loaded at an image base (0x10000000 by
1100611263 # default) and relocated if they conflict, which is a slow very memory
1100711264 # consuming and fragmenting process. To avoid this, we pick a random,
1100811265 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
1100911266 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
11010 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11011 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'
11267 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11268 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'
1101211269 ;;
1101311270
1101411271 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
1101511272 tmp_diet=no
11016 if test "$host_os" = linux-dietlibc; then
11273 if test linux-dietlibc = "$host_os"; then
1101711274 case $cc_basename in
1101811275 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
1101911276 esac
1102011277 fi
1102111278 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
11022 && test "$tmp_diet" = no
11279 && test no = "$tmp_diet"
1102311280 then
1102411281 tmp_addflag=' $pic_flag'
1102511282 tmp_sharedflag='-shared'
1102611283 case $cc_basename,$host_cpu in
1102711284 pgcc*) # Portland Group C compiler
11028 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
11285 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
1102911286 tmp_addflag=' $pic_flag'
1103011287 ;;
1103111288 pgf77* | pgf90* | pgf95* | pgfortran*)
1103211289 # Portland Group f77 and f90 compilers
11033 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
11290 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
1103411291 tmp_addflag=' $pic_flag -Mnomain' ;;
1103511292 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
1103611293 tmp_addflag=' -i_dynamic' ;;
1104111298 lf95*) # Lahey Fortran 8.1
1104211299 whole_archive_flag_spec=
1104311300 tmp_sharedflag='--shared' ;;
11301 nagfor*) # NAGFOR 5.3
11302 tmp_sharedflag='-Wl,-shared' ;;
1104411303 xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
1104511304 tmp_sharedflag='-qmkshrobj'
1104611305 tmp_addflag= ;;
1104711306 nvcc*) # Cuda Compiler Driver 2.2
11048 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
11307 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
1104911308 compiler_needs_object=yes
1105011309 ;;
1105111310 esac
1105211311 case `$CC -V 2>&1 | sed 5q` in
1105311312 *Sun\ C*) # Sun C 5.9
11054 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'
11313 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'
1105511314 compiler_needs_object=yes
1105611315 tmp_sharedflag='-G' ;;
1105711316 *Sun\ F*) # Sun Fortran 8.3
1105811317 tmp_sharedflag='-G' ;;
1105911318 esac
11060 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11061
11062 if test "x$supports_anon_versioning" = xyes; then
11319 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11320
11321 if test yes = "$supports_anon_versioning"; then
1106311322 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11064 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11065 echo "local: *; };" >> $output_objdir/$libname.ver~
11066 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
11323 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11324 echo "local: *; };" >> $output_objdir/$libname.ver~
11325 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
1106711326 fi
1106811327
1106911328 case $cc_basename in
11329 tcc*)
11330 export_dynamic_flag_spec='-rdynamic'
11331 ;;
1107011332 xlf* | bgf* | bgxlf* | mpixlf*)
1107111333 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
1107211334 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
11073 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
11335 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
1107411336 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
11075 if test "x$supports_anon_versioning" = xyes; then
11337 if test yes = "$supports_anon_versioning"; then
1107611338 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11077 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11078 echo "local: *; };" >> $output_objdir/$libname.ver~
11079 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
11339 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11340 echo "local: *; };" >> $output_objdir/$libname.ver~
11341 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
1108011342 fi
1108111343 ;;
1108211344 esac
1109011352 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1109111353 wlarc=
1109211354 else
11093 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11094 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11355 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11356 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
1109511357 fi
1109611358 ;;
1109711359
1110911371
1111011372 _LT_EOF
1111111373 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11112 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11113 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11374 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11375 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
1111411376 else
1111511377 ld_shlibs=no
1111611378 fi
1112211384 ld_shlibs=no
1112311385 cat <<_LT_EOF 1>&2
1112411386
11125 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
11387 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
1112611388 *** reliably create shared libraries on SCO systems. Therefore, libtool
1112711389 *** is disabling shared libraries support. We urge you to upgrade GNU
1112811390 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
1113711399 # DT_RUNPATH tag from executables and libraries. But doing so
1113811400 # requires that you compile everything twice, which is a pain.
1113911401 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11140 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
11141 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11142 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11402 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11403 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11404 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
1114311405 else
1114411406 ld_shlibs=no
1114511407 fi
1115611418
1115711419 *)
1115811420 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11159 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11160 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
11421 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11422 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
1116111423 else
1116211424 ld_shlibs=no
1116311425 fi
1116411426 ;;
1116511427 esac
1116611428
11167 if test "$ld_shlibs" = no; then
11429 if test no = "$ld_shlibs"; then
1116811430 runpath_var=
1116911431 hardcode_libdir_flag_spec=
1117011432 export_dynamic_flag_spec=
1118011442 # Note: this linker hardcodes the directories in LIBPATH if there
1118111443 # are no directories specified by -L.
1118211444 hardcode_minus_L=yes
11183 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
11445 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
1118411446 # Neither direct hardcoding nor static linking is supported with a
1118511447 # broken collect2.
1118611448 hardcode_direct=unsupported
1118811450 ;;
1118911451
1119011452 aix[4-9]*)
11191 if test "$host_cpu" = ia64; then
11453 if test ia64 = "$host_cpu"; then
1119211454 # On IA64, the linker does run time linking by default, so we don't
1119311455 # have to do anything special.
1119411456 aix_use_runtimelinking=no
1119511457 exp_sym_flag='-Bexport'
11196 no_entry_flag=""
11458 no_entry_flag=
1119711459 else
1119811460 # If we're using GNU nm, then we don't want the "-C" option.
11199 # -C means demangle to AIX nm, but means don't demangle with GNU nm
11200 # Also, AIX nm treats weak defined symbols like other global
11201 # defined symbols, whereas GNU nm marks them as "W".
11461 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
11462 # Without the "-l" option, or with the "-B" option, AIX nm treats
11463 # weak defined symbols like other global defined symbols, whereas
11464 # GNU nm marks them as "W".
11465 # While the 'weak' keyword is ignored in the Export File, we need
11466 # it in the Import File for the 'aix-soname' feature, so we have
11467 # to replace the "-B" option with "-P" for AIX nm.
1120211468 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
11203 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
11469 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'
1120411470 else
11205 export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
11471 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'
1120611472 fi
1120711473 aix_use_runtimelinking=no
1120811474
1120911475 # Test if we are trying to use run time linking or normal
1121011476 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
11211 # need to do runtime linking.
11477 # have runtime linking enabled, and use it for executables.
11478 # For shared libraries, we enable/disable runtime linking
11479 # depending on the kind of the shared library created -
11480 # when "with_aix_soname,aix_use_runtimelinking" is:
11481 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
11482 # "aix,yes" lib.so shared, rtl:yes, for executables
11483 # lib.a static archive
11484 # "both,no" lib.so.V(shr.o) shared, rtl:yes
11485 # lib.a(lib.so.V) shared, rtl:no, for executables
11486 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
11487 # lib.a(lib.so.V) shared, rtl:no
11488 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
11489 # lib.a static archive
1121211490 case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
1121311491 for ld_flag in $LDFLAGS; do
11214 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
11492 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
1121511493 aix_use_runtimelinking=yes
1121611494 break
1121711495 fi
1121811496 done
11497 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
11498 # With aix-soname=svr4, we create the lib.so.V shared archives only,
11499 # so we don't have lib.a shared libs to link our executables.
11500 # We have to force runtime linking in this case.
11501 aix_use_runtimelinking=yes
11502 LDFLAGS="$LDFLAGS -Wl,-brtl"
11503 fi
1121911504 ;;
1122011505 esac
1122111506
1123411519 hardcode_direct_absolute=yes
1123511520 hardcode_libdir_separator=':'
1123611521 link_all_deplibs=yes
11237 file_list_spec='${wl}-f,'
11238
11239 if test "$GCC" = yes; then
11522 file_list_spec='$wl-f,'
11523 case $with_aix_soname,$aix_use_runtimelinking in
11524 aix,*) ;; # traditional, no import file
11525 svr4,* | *,yes) # use import file
11526 # The Import File defines what to hardcode.
11527 hardcode_direct=no
11528 hardcode_direct_absolute=no
11529 ;;
11530 esac
11531
11532 if test yes = "$GCC"; then
1124011533 case $host_os in aix4.[012]|aix4.[012].*)
1124111534 # We only want to do this on AIX 4.2 and lower, the check
1124211535 # below for broken collect2 doesn't work under 4.3+
11243 collect2name=`${CC} -print-prog-name=collect2`
11536 collect2name=`$CC -print-prog-name=collect2`
1124411537 if test -f "$collect2name" &&
1124511538 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
1124611539 then
1125911552 ;;
1126011553 esac
1126111554 shared_flag='-shared'
11262 if test "$aix_use_runtimelinking" = yes; then
11263 shared_flag="$shared_flag "'${wl}-G'
11555 if test yes = "$aix_use_runtimelinking"; then
11556 shared_flag="$shared_flag "'$wl-G'
1126411557 fi
11558 # Need to ensure runtime linking is disabled for the traditional
11559 # shared library, or the linker may eventually find shared libraries
11560 # /with/ Import File - we do not want to mix them.
11561 shared_flag_aix='-shared'
11562 shared_flag_svr4='-shared $wl-G'
1126511563 else
1126611564 # not using gcc
11267 if test "$host_cpu" = ia64; then
11565 if test ia64 = "$host_cpu"; then
1126811566 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
1126911567 # chokes on -Wl,-G. The following line is correct:
1127011568 shared_flag='-G'
1127111569 else
11272 if test "$aix_use_runtimelinking" = yes; then
11273 shared_flag='${wl}-G'
11570 if test yes = "$aix_use_runtimelinking"; then
11571 shared_flag='$wl-G'
1127411572 else
11275 shared_flag='${wl}-bM:SRE'
11573 shared_flag='$wl-bM:SRE'
1127611574 fi
11575 shared_flag_aix='$wl-bM:SRE'
11576 shared_flag_svr4='$wl-G'
1127711577 fi
1127811578 fi
1127911579
11280 export_dynamic_flag_spec='${wl}-bexpall'
11580 export_dynamic_flag_spec='$wl-bexpall'
1128111581 # It seems that -bexpall does not export symbols beginning with
1128211582 # underscore (_), so it is better to generate a list of symbols to export.
1128311583 always_export_symbols=yes
11284 if test "$aix_use_runtimelinking" = yes; then
11584 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
1128511585 # Warning - without using the other runtime loading flags (-brtl),
1128611586 # -berok will link without error, but may produce a broken library.
1128711587 allow_undefined_flag='-berok'
1128811588 # Determine the default libpath from the value encoded in an
1128911589 # empty executable.
11290 if test "${lt_cv_aix_libpath+set}" = set; then
11590 if test set = "${lt_cv_aix_libpath+set}"; then
1129111591 aix_libpath=$lt_cv_aix_libpath
1129211592 else
1129311593 if ${lt_cv_aix_libpath_+:} false; then :
1132211622 rm -f core conftest.err conftest.$ac_objext \
1132311623 conftest$ac_exeext conftest.$ac_ext
1132411624 if test -z "$lt_cv_aix_libpath_"; then
11325 lt_cv_aix_libpath_="/usr/lib:/lib"
11625 lt_cv_aix_libpath_=/usr/lib:/lib
1132611626 fi
1132711627
1132811628 fi
1133011630 aix_libpath=$lt_cv_aix_libpath_
1133111631 fi
1133211632
11333 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
11334 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
11633 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
11634 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
1133511635 else
11336 if test "$host_cpu" = ia64; then
11337 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
11636 if test ia64 = "$host_cpu"; then
11637 hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
1133811638 allow_undefined_flag="-z nodefs"
11339 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
11639 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
1134011640 else
1134111641 # Determine the default libpath from the value encoded in an
1134211642 # empty executable.
11343 if test "${lt_cv_aix_libpath+set}" = set; then
11643 if test set = "${lt_cv_aix_libpath+set}"; then
1134411644 aix_libpath=$lt_cv_aix_libpath
1134511645 else
1134611646 if ${lt_cv_aix_libpath_+:} false; then :
1137511675 rm -f core conftest.err conftest.$ac_objext \
1137611676 conftest$ac_exeext conftest.$ac_ext
1137711677 if test -z "$lt_cv_aix_libpath_"; then
11378 lt_cv_aix_libpath_="/usr/lib:/lib"
11678 lt_cv_aix_libpath_=/usr/lib:/lib
1137911679 fi
1138011680
1138111681 fi
1138311683 aix_libpath=$lt_cv_aix_libpath_
1138411684 fi
1138511685
11386 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
11686 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
1138711687 # Warning - without using the other run time loading flags,
1138811688 # -berok will link without error, but may produce a broken library.
11389 no_undefined_flag=' ${wl}-bernotok'
11390 allow_undefined_flag=' ${wl}-berok'
11391 if test "$with_gnu_ld" = yes; then
11689 no_undefined_flag=' $wl-bernotok'
11690 allow_undefined_flag=' $wl-berok'
11691 if test yes = "$with_gnu_ld"; then
1139211692 # We only use this code for GNU lds that support --whole-archive.
11393 whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
11693 whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
1139411694 else
1139511695 # Exported symbols can be pulled into shared objects from archives
1139611696 whole_archive_flag_spec='$convenience'
1139711697 fi
1139811698 archive_cmds_need_lc=yes
11399 # This is similar to how AIX traditionally builds its shared libraries.
11400 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
11699 archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
11700 # -brtl affects multiple linker settings, -berok does not and is overridden later
11701 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
11702 if test svr4 != "$with_aix_soname"; then
11703 # This is similar to how AIX traditionally builds its shared libraries.
11704 archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
11705 fi
11706 if test aix != "$with_aix_soname"; then
11707 archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
11708 else
11709 # used by -dlpreopen to get the symbols
11710 archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
11711 fi
11712 archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
1140111713 fi
1140211714 fi
1140311715 ;;
1140611718 case $host_cpu in
1140711719 powerpc)
1140811720 # see comment about AmigaOS4 .so support
11409 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
11721 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
1141011722 archive_expsym_cmds=''
1141111723 ;;
1141211724 m68k)
1143611748 # Tell ltmain to make .lib files, not .a files.
1143711749 libext=lib
1143811750 # Tell ltmain to make .dll files, not .so files.
11439 shrext_cmds=".dll"
11751 shrext_cmds=.dll
1144011752 # FIXME: Setting linknames here is a bad hack.
11441 archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
11442 archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
11443 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
11444 else
11445 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
11446 fi~
11447 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
11448 linknames='
11753 archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
11754 archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
11755 cp "$export_symbols" "$output_objdir/$soname.def";
11756 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
11757 else
11758 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
11759 fi~
11760 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
11761 linknames='
1144911762 # The linker will not automatically build a static lib if we build a DLL.
1145011763 # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
1145111764 enable_shared_with_static_runtimes=yes
1145411767 # Don't use ranlib
1145511768 old_postinstall_cmds='chmod 644 $oldlib'
1145611769 postlink_cmds='lt_outputfile="@OUTPUT@"~
11457 lt_tool_outputfile="@TOOL_OUTPUT@"~
11458 case $lt_outputfile in
11459 *.exe|*.EXE) ;;
11460 *)
11461 lt_outputfile="$lt_outputfile.exe"
11462 lt_tool_outputfile="$lt_tool_outputfile.exe"
11463 ;;
11464 esac~
11465 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
11466 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
11467 $RM "$lt_outputfile.manifest";
11468 fi'
11770 lt_tool_outputfile="@TOOL_OUTPUT@"~
11771 case $lt_outputfile in
11772 *.exe|*.EXE) ;;
11773 *)
11774 lt_outputfile=$lt_outputfile.exe
11775 lt_tool_outputfile=$lt_tool_outputfile.exe
11776 ;;
11777 esac~
11778 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
11779 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
11780 $RM "$lt_outputfile.manifest";
11781 fi'
1146911782 ;;
1147011783 *)
1147111784 # Assume MSVC wrapper
1147411787 # Tell ltmain to make .lib files, not .a files.
1147511788 libext=lib
1147611789 # Tell ltmain to make .dll files, not .so files.
11477 shrext_cmds=".dll"
11790 shrext_cmds=.dll
1147811791 # FIXME: Setting linknames here is a bad hack.
1147911792 archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
1148011793 # The linker will automatically build a .lib file if we build a DLL.
1149311806 hardcode_direct=no
1149411807 hardcode_automatic=yes
1149511808 hardcode_shlibpath_var=unsupported
11496 if test "$lt_cv_ld_force_load" = "yes"; then
11497 whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
11809 if test yes = "$lt_cv_ld_force_load"; then
11810 whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1149811811
1149911812 else
1150011813 whole_archive_flag_spec=''
1150111814 fi
1150211815 link_all_deplibs=yes
11503 allow_undefined_flag="$_lt_dar_allow_undefined"
11816 allow_undefined_flag=$_lt_dar_allow_undefined
1150411817 case $cc_basename in
11505 ifort*) _lt_dar_can_shared=yes ;;
11818 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
1150611819 *) _lt_dar_can_shared=$GCC ;;
1150711820 esac
11508 if test "$_lt_dar_can_shared" = "yes"; then
11821 if test yes = "$_lt_dar_can_shared"; then
1150911822 output_verbose_link_cmd=func_echo_all
11510 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
11511 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
11512 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}"
11513 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}"
11823 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
11824 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
11825 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"
11826 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"
1151411827
1151511828 else
1151611829 ld_shlibs=no
1155211865 ;;
1155311866
1155411867 hpux9*)
11555 if test "$GCC" = yes; then
11556 archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
11868 if test yes = "$GCC"; then
11869 archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
1155711870 else
11558 archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
11871 archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
1155911872 fi
11560 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
11873 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
1156111874 hardcode_libdir_separator=:
1156211875 hardcode_direct=yes
1156311876
1156411877 # hardcode_minus_L: Not really in the search PATH,
1156511878 # but as the default location of the library.
1156611879 hardcode_minus_L=yes
11567 export_dynamic_flag_spec='${wl}-E'
11880 export_dynamic_flag_spec='$wl-E'
1156811881 ;;
1156911882
1157011883 hpux10*)
11571 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
11572 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11884 if test yes,no = "$GCC,$with_gnu_ld"; then
11885 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
1157311886 else
1157411887 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
1157511888 fi
11576 if test "$with_gnu_ld" = no; then
11577 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
11889 if test no = "$with_gnu_ld"; then
11890 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
1157811891 hardcode_libdir_separator=:
1157911892 hardcode_direct=yes
1158011893 hardcode_direct_absolute=yes
11581 export_dynamic_flag_spec='${wl}-E'
11894 export_dynamic_flag_spec='$wl-E'
1158211895 # hardcode_minus_L: Not really in the search PATH,
1158311896 # but as the default location of the library.
1158411897 hardcode_minus_L=yes
1158611899 ;;
1158711900
1158811901 hpux11*)
11589 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
11902 if test yes,no = "$GCC,$with_gnu_ld"; then
1159011903 case $host_cpu in
1159111904 hppa*64*)
11592 archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
11905 archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
1159311906 ;;
1159411907 ia64*)
11595 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
11908 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
1159611909 ;;
1159711910 *)
11598 archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11911 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
1159911912 ;;
1160011913 esac
1160111914 else
1160211915 case $host_cpu in
1160311916 hppa*64*)
11604 archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
11917 archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
1160511918 ;;
1160611919 ia64*)
11607 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
11920 archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
1160811921 ;;
1160911922 *)
1161011923
1161611929 $as_echo_n "(cached) " >&6
1161711930 else
1161811931 lt_cv_prog_compiler__b=no
11619 save_LDFLAGS="$LDFLAGS"
11932 save_LDFLAGS=$LDFLAGS
1162011933 LDFLAGS="$LDFLAGS -b"
1162111934 echo "$lt_simple_link_test_code" > conftest.$ac_ext
1162211935 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1163511948 fi
1163611949 fi
1163711950 $RM -r conftest*
11638 LDFLAGS="$save_LDFLAGS"
11951 LDFLAGS=$save_LDFLAGS
1163911952
1164011953 fi
1164111954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
1164211955 $as_echo "$lt_cv_prog_compiler__b" >&6; }
1164311956
11644 if test x"$lt_cv_prog_compiler__b" = xyes; then
11645 archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11957 if test yes = "$lt_cv_prog_compiler__b"; then
11958 archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
1164611959 else
1164711960 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
1164811961 fi
1165011963 ;;
1165111964 esac
1165211965 fi
11653 if test "$with_gnu_ld" = no; then
11654 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
11966 if test no = "$with_gnu_ld"; then
11967 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
1165511968 hardcode_libdir_separator=:
1165611969
1165711970 case $host_cpu in
1166211975 *)
1166311976 hardcode_direct=yes
1166411977 hardcode_direct_absolute=yes
11665 export_dynamic_flag_spec='${wl}-E'
11978 export_dynamic_flag_spec='$wl-E'
1166611979
1166711980 # hardcode_minus_L: Not really in the search PATH,
1166811981 # but as the default location of the library.
1167311986 ;;
1167411987
1167511988 irix5* | irix6* | nonstopux*)
11676 if test "$GCC" = yes; then
11677 archive_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 -o $lib'
11989 if test yes = "$GCC"; then
11990 archive_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 -o $lib'
1167811991 # Try to use the -exported_symbol ld option, if it does not
1167911992 # work, assume that -exports_file does not work either and
1168011993 # implicitly export all symbols.
1168411997 if ${lt_cv_irix_exported_symbol+:} false; then :
1168511998 $as_echo_n "(cached) " >&6
1168611999 else
11687 save_LDFLAGS="$LDFLAGS"
11688 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
12000 save_LDFLAGS=$LDFLAGS
12001 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
1168912002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1169012003 /* end confdefs.h. */
1169112004 int foo (void) { return 0; }
1169712010 fi
1169812011 rm -f core conftest.err conftest.$ac_objext \
1169912012 conftest$ac_exeext conftest.$ac_ext
11700 LDFLAGS="$save_LDFLAGS"
12013 LDFLAGS=$save_LDFLAGS
1170112014 fi
1170212015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
1170312016 $as_echo "$lt_cv_irix_exported_symbol" >&6; }
11704 if test "$lt_cv_irix_exported_symbol" = yes; then
11705 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'
12017 if test yes = "$lt_cv_irix_exported_symbol"; then
12018 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'
1170612019 fi
1170712020 else
11708 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
11709 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
12021 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
12022 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
1171012023 fi
1171112024 archive_cmds_need_lc='no'
11712 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
12025 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
1171312026 hardcode_libdir_separator=:
1171412027 inherit_rpath=yes
1171512028 link_all_deplibs=yes
12029 ;;
12030
12031 linux*)
12032 case $cc_basename in
12033 tcc*)
12034 # Fabrice Bellard et al's Tiny C Compiler
12035 ld_shlibs=yes
12036 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12037 ;;
12038 esac
1171612039 ;;
1171712040
1171812041 netbsd*)
1172912052 newsos6)
1173012053 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1173112054 hardcode_direct=yes
11732 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
12055 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
1173312056 hardcode_libdir_separator=:
1173412057 hardcode_shlibpath_var=no
1173512058 ;;
1173712060 *nto* | *qnx*)
1173812061 ;;
1173912062
11740 openbsd*)
12063 openbsd* | bitrig*)
1174112064 if test -f /usr/libexec/ld.so; then
1174212065 hardcode_direct=yes
1174312066 hardcode_shlibpath_var=no
1174412067 hardcode_direct_absolute=yes
11745 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
12068 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
1174612069 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11747 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
11748 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
11749 export_dynamic_flag_spec='${wl}-E'
12070 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
12071 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12072 export_dynamic_flag_spec='$wl-E'
1175012073 else
11751 case $host_os in
11752 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
11753 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11754 hardcode_libdir_flag_spec='-R$libdir'
11755 ;;
11756 *)
11757 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11758 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
11759 ;;
11760 esac
12074 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12075 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
1176112076 fi
1176212077 else
1176312078 ld_shlibs=no
1176812083 hardcode_libdir_flag_spec='-L$libdir'
1176912084 hardcode_minus_L=yes
1177012085 allow_undefined_flag=unsupported
11771 archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
11772 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
12086 shrext_cmds=.dll
12087 archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12088 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12089 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12090 $ECHO EXPORTS >> $output_objdir/$libname.def~
12091 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12092 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12093 emximp -o $lib $output_objdir/$libname.def'
12094 archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12095 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12096 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12097 $ECHO EXPORTS >> $output_objdir/$libname.def~
12098 prefix_cmds="$SED"~
12099 if test EXPORTS = "`$SED 1q $export_symbols`"; then
12100 prefix_cmds="$prefix_cmds -e 1d";
12101 fi~
12102 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12103 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12104 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12105 emximp -o $lib $output_objdir/$libname.def'
12106 old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12107 enable_shared_with_static_runtimes=yes
1177312108 ;;
1177412109
1177512110 osf3*)
11776 if test "$GCC" = yes; then
11777 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
11778 archive_cmds='$CC -shared${allow_undefined_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 -o $lib'
12111 if test yes = "$GCC"; then
12112 allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12113 archive_cmds='$CC -shared$allow_undefined_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 -o $lib'
1177912114 else
1178012115 allow_undefined_flag=' -expect_unresolved \*'
11781 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
12116 archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
1178212117 fi
1178312118 archive_cmds_need_lc='no'
11784 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
12119 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
1178512120 hardcode_libdir_separator=:
1178612121 ;;
1178712122
1178812123 osf4* | osf5*) # as osf3* with the addition of -msym flag
11789 if test "$GCC" = yes; then
11790 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
11791 archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
11792 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
12124 if test yes = "$GCC"; then
12125 allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12126 archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
12127 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
1179312128 else
1179412129 allow_undefined_flag=' -expect_unresolved \*'
11795 archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
12130 archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
1179612131 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
11797 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
12132 $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
1179812133
1179912134 # Both c and cxx compiler support -rpath directly
1180012135 hardcode_libdir_flag_spec='-rpath $libdir'
1180512140
1180612141 solaris*)
1180712142 no_undefined_flag=' -z defs'
11808 if test "$GCC" = yes; then
11809 wlarc='${wl}'
11810 archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
12143 if test yes = "$GCC"; then
12144 wlarc='$wl'
12145 archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
1181112146 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11812 $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
12147 $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
1181312148 else
1181412149 case `$CC -V 2>&1` in
1181512150 *"Compilers 5.0"*)
1181612151 wlarc=''
11817 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
12152 archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
1181812153 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11819 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
12154 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
1182012155 ;;
1182112156 *)
11822 wlarc='${wl}'
11823 archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
12157 wlarc='$wl'
12158 archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
1182412159 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11825 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
12160 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
1182612161 ;;
1182712162 esac
1182812163 fi
1183212167 solaris2.[0-5] | solaris2.[0-5].*) ;;
1183312168 *)
1183412169 # The compiler driver will combine and reorder linker options,
11835 # but understands `-z linker_flag'. GCC discards it without `$wl',
12170 # but understands '-z linker_flag'. GCC discards it without '$wl',
1183612171 # but is careful enough not to reorder.
1183712172 # Supported since Solaris 2.6 (maybe 2.5.1?)
11838 if test "$GCC" = yes; then
11839 whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
12173 if test yes = "$GCC"; then
12174 whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
1184012175 else
1184112176 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
1184212177 fi
1184612181 ;;
1184712182
1184812183 sunos4*)
11849 if test "x$host_vendor" = xsequent; then
12184 if test sequent = "$host_vendor"; then
1185012185 # Use $CC to link under sequent, because it throws in some extra .o
1185112186 # files that make .init and .fini sections work.
11852 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
12187 archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
1185312188 else
1185412189 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
1185512190 fi
1189812233 ;;
1189912234
1190012235 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
11901 no_undefined_flag='${wl}-z,text'
12236 no_undefined_flag='$wl-z,text'
1190212237 archive_cmds_need_lc=no
1190312238 hardcode_shlibpath_var=no
1190412239 runpath_var='LD_RUN_PATH'
1190512240
11906 if test "$GCC" = yes; then
11907 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11908 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12241 if test yes = "$GCC"; then
12242 archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12243 archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
1190912244 else
11910 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11911 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12245 archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12246 archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
1191212247 fi
1191312248 ;;
1191412249
1191512250 sysv5* | sco3.2v5* | sco5v6*)
11916 # Note: We can NOT use -z defs as we might desire, because we do not
12251 # Note: We CANNOT use -z defs as we might desire, because we do not
1191712252 # link with -lc, and that would cause any symbols used from libc to
1191812253 # always be unresolved, which means just about no library would
1191912254 # ever link correctly. If we're not using GNU ld we use -z text
1192012255 # though, which does catch some bad symbols but isn't as heavy-handed
1192112256 # as -z defs.
11922 no_undefined_flag='${wl}-z,text'
11923 allow_undefined_flag='${wl}-z,nodefs'
12257 no_undefined_flag='$wl-z,text'
12258 allow_undefined_flag='$wl-z,nodefs'
1192412259 archive_cmds_need_lc=no
1192512260 hardcode_shlibpath_var=no
11926 hardcode_libdir_flag_spec='${wl}-R,$libdir'
12261 hardcode_libdir_flag_spec='$wl-R,$libdir'
1192712262 hardcode_libdir_separator=':'
1192812263 link_all_deplibs=yes
11929 export_dynamic_flag_spec='${wl}-Bexport'
12264 export_dynamic_flag_spec='$wl-Bexport'
1193012265 runpath_var='LD_RUN_PATH'
1193112266
11932 if test "$GCC" = yes; then
11933 archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11934 archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12267 if test yes = "$GCC"; then
12268 archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12269 archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
1193512270 else
11936 archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11937 archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12271 archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12272 archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
1193812273 fi
1193912274 ;;
1194012275
1194912284 ;;
1195012285 esac
1195112286
11952 if test x$host_vendor = xsni; then
12287 if test sni = "$host_vendor"; then
1195312288 case $host in
1195412289 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
11955 export_dynamic_flag_spec='${wl}-Blargedynsym'
12290 export_dynamic_flag_spec='$wl-Blargedynsym'
1195612291 ;;
1195712292 esac
1195812293 fi
1196012295
1196112296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
1196212297 $as_echo "$ld_shlibs" >&6; }
11963 test "$ld_shlibs" = no && can_build_shared=no
12298 test no = "$ld_shlibs" && can_build_shared=no
1196412299
1196512300 with_gnu_ld=$with_gnu_ld
1196612301
1198612321 # Assume -lc should be added
1198712322 archive_cmds_need_lc=yes
1198812323
11989 if test "$enable_shared" = yes && test "$GCC" = yes; then
12324 if test yes,yes = "$GCC,$enable_shared"; then
1199012325 case $archive_cmds in
1199112326 *'~'*)
1199212327 # FIXME: we may have to deal with multi-command sequences.
1220112536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
1220212537 $as_echo_n "checking dynamic linker characteristics... " >&6; }
1220312538
12204 if test "$GCC" = yes; then
12539 if test yes = "$GCC"; then
1220512540 case $host_os in
12206 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
12207 *) lt_awk_arg="/^libraries:/" ;;
12541 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
12542 *) lt_awk_arg='/^libraries:/' ;;
1220812543 esac
1220912544 case $host_os in
12210 mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
12211 *) lt_sed_strip_eq="s,=/,/,g" ;;
12545 mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
12546 *) lt_sed_strip_eq='s|=/|/|g' ;;
1221212547 esac
1221312548 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
1221412549 case $lt_search_path_spec in
1222412559 ;;
1222512560 esac
1222612561 # Ok, now we have the path, separated by spaces, we can step through it
12227 # and add multilib dir if necessary.
12562 # and add multilib dir if necessary...
1222812563 lt_tmp_lt_search_path_spec=
12229 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
12564 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
12565 # ...but if some path component already ends with the multilib dir we assume
12566 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
12567 case "$lt_multi_os_dir; $lt_search_path_spec " in
12568 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
12569 lt_multi_os_dir=
12570 ;;
12571 esac
1223012572 for lt_sys_path in $lt_search_path_spec; do
12231 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
12232 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
12233 else
12573 if test -d "$lt_sys_path$lt_multi_os_dir"; then
12574 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
12575 elif test -n "$lt_multi_os_dir"; then
1223412576 test -d "$lt_sys_path" && \
1223512577 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
1223612578 fi
1223712579 done
1223812580 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
12239 BEGIN {RS=" "; FS="/|\n";} {
12240 lt_foo="";
12241 lt_count=0;
12581 BEGIN {RS = " "; FS = "/|\n";} {
12582 lt_foo = "";
12583 lt_count = 0;
1224212584 for (lt_i = NF; lt_i > 0; lt_i--) {
1224312585 if ($lt_i != "" && $lt_i != ".") {
1224412586 if ($lt_i == "..") {
1224512587 lt_count++;
1224612588 } else {
1224712589 if (lt_count == 0) {
12248 lt_foo="/" $lt_i lt_foo;
12590 lt_foo = "/" $lt_i lt_foo;
1224912591 } else {
1225012592 lt_count--;
1225112593 }
1225912601 # for these hosts.
1226012602 case $host_os in
1226112603 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
12262 $SED 's,/\([A-Za-z]:\),\1,g'` ;;
12604 $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
1226312605 esac
1226412606 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
1226512607 else
1226812610 library_names_spec=
1226912611 libname_spec='lib$name'
1227012612 soname_spec=
12271 shrext_cmds=".so"
12613 shrext_cmds=.so
1227212614 postinstall_cmds=
1227312615 postuninstall_cmds=
1227412616 finish_cmds=
1228512627 # flags to be left without arguments
1228612628 need_version=unknown
1228712629
12630
12631
1228812632 case $host_os in
1228912633 aix3*)
1229012634 version_type=linux # correct to gnu/linux during the next big refactor
12291 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
12635 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
1229212636 shlibpath_var=LIBPATH
1229312637
1229412638 # AIX 3 has no versioning support, so we append a major version to the name.
12295 soname_spec='${libname}${release}${shared_ext}$major'
12639 soname_spec='$libname$release$shared_ext$major'
1229612640 ;;
1229712641
1229812642 aix[4-9]*)
1230012644 need_lib_prefix=no
1230112645 need_version=no
1230212646 hardcode_into_libs=yes
12303 if test "$host_cpu" = ia64; then
12647 if test ia64 = "$host_cpu"; then
1230412648 # AIX 5 supports IA64
12305 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
12649 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
1230612650 shlibpath_var=LD_LIBRARY_PATH
1230712651 else
1230812652 # With GCC up to 2.95.x, collect2 would create an import file
1230912653 # for dependence libraries. The import file would start with
12310 # the line `#! .'. This would cause the generated library to
12311 # depend on `.', always an invalid library. This was fixed in
12654 # the line '#! .'. This would cause the generated library to
12655 # depend on '.', always an invalid library. This was fixed in
1231212656 # development snapshots of GCC prior to 3.0.
1231312657 case $host_os in
1231412658 aix4 | aix4.[01] | aix4.[01].*)
1231512659 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1231612660 echo ' yes '
12317 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
12661 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
1231812662 :
1231912663 else
1232012664 can_build_shared=no
1232112665 fi
1232212666 ;;
1232312667 esac
12324 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
12668 # Using Import Files as archive members, it is possible to support
12669 # filename-based versioning of shared library archives on AIX. While
12670 # this would work for both with and without runtime linking, it will
12671 # prevent static linking of such archives. So we do filename-based
12672 # shared library versioning with .so extension only, which is used
12673 # when both runtime linking and shared linking is enabled.
12674 # Unfortunately, runtime linking may impact performance, so we do
12675 # not want this to be the default eventually. Also, we use the
12676 # versioned .so libs for executables only if there is the -brtl
12677 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
12678 # To allow for filename-based versioning support, we need to create
12679 # libNAME.so.V as an archive file, containing:
12680 # *) an Import File, referring to the versioned filename of the
12681 # archive as well as the shared archive member, telling the
12682 # bitwidth (32 or 64) of that shared object, and providing the
12683 # list of exported symbols of that shared object, eventually
12684 # decorated with the 'weak' keyword
12685 # *) the shared object with the F_LOADONLY flag set, to really avoid
12686 # it being seen by the linker.
12687 # At run time we better use the real file rather than another symlink,
12688 # but for link time we create the symlink libNAME.so -> libNAME.so.V
12689
12690 case $with_aix_soname,$aix_use_runtimelinking in
12691 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
1232512692 # soname into executable. Probably we can add versioning support to
1232612693 # collect2, so additional links can be useful in future.
12327 if test "$aix_use_runtimelinking" = yes; then
12694 aix,yes) # traditional libtool
12695 dynamic_linker='AIX unversionable lib.so'
1232812696 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1232912697 # instead of lib<name>.a to let people know that these are not
1233012698 # typical AIX shared libraries.
12331 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12332 else
12699 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12700 ;;
12701 aix,no) # traditional AIX only
12702 dynamic_linker='AIX lib.a(lib.so.V)'
1233312703 # We preserve .a as extension for shared libraries through AIX4.2
1233412704 # and later when we are not doing run time linking.
12335 library_names_spec='${libname}${release}.a $libname.a'
12336 soname_spec='${libname}${release}${shared_ext}$major'
12337 fi
12705 library_names_spec='$libname$release.a $libname.a'
12706 soname_spec='$libname$release$shared_ext$major'
12707 ;;
12708 svr4,*) # full svr4 only
12709 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
12710 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
12711 # We do not specify a path in Import Files, so LIBPATH fires.
12712 shlibpath_overrides_runpath=yes
12713 ;;
12714 *,yes) # both, prefer svr4
12715 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
12716 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
12717 # unpreferred sharedlib libNAME.a needs extra handling
12718 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
12719 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
12720 # We do not specify a path in Import Files, so LIBPATH fires.
12721 shlibpath_overrides_runpath=yes
12722 ;;
12723 *,no) # both, prefer aix
12724 dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
12725 library_names_spec='$libname$release.a $libname.a'
12726 soname_spec='$libname$release$shared_ext$major'
12727 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
12728 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
12729 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
12730 ;;
12731 esac
1233812732 shlibpath_var=LIBPATH
1233912733 fi
1234012734 ;;
1234412738 powerpc)
1234512739 # Since July 2007 AmigaOS4 officially supports .so libraries.
1234612740 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
12347 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12741 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
1234812742 ;;
1234912743 m68k)
1235012744 library_names_spec='$libname.ixlibrary $libname.a'
1235112745 # Create ${libname}_ixlibrary.a entries in /sys/libs.
12352 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
12746 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
1235312747 ;;
1235412748 esac
1235512749 ;;
1235612750
1235712751 beos*)
12358 library_names_spec='${libname}${shared_ext}'
12752 library_names_spec='$libname$shared_ext'
1235912753 dynamic_linker="$host_os ld.so"
1236012754 shlibpath_var=LIBRARY_PATH
1236112755 ;;
1236312757 bsdi[45]*)
1236412758 version_type=linux # correct to gnu/linux during the next big refactor
1236512759 need_version=no
12366 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12367 soname_spec='${libname}${release}${shared_ext}$major'
12760 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12761 soname_spec='$libname$release$shared_ext$major'
1236812762 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1236912763 shlibpath_var=LD_LIBRARY_PATH
1237012764 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1237612770
1237712771 cygwin* | mingw* | pw32* | cegcc*)
1237812772 version_type=windows
12379 shrext_cmds=".dll"
12773 shrext_cmds=.dll
1238012774 need_version=no
1238112775 need_lib_prefix=no
1238212776
1238512779 # gcc
1238612780 library_names_spec='$libname.dll.a'
1238712781 # DLL is installed to $(libdir)/../bin by postinstall_cmds
12388 postinstall_cmds='base_file=`basename \${file}`~
12389 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
12782 postinstall_cmds='base_file=`basename \$file`~
12783 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
1239012784 dldir=$destdir/`dirname \$dlpath`~
1239112785 test -d \$dldir || mkdir -p \$dldir~
1239212786 $install_prog $dir/$dlname \$dldir/$dlname~
1240212796 case $host_os in
1240312797 cygwin*)
1240412798 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
12405 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12799 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
1240612800
1240712801 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
1240812802 ;;
1240912803 mingw* | cegcc*)
1241012804 # MinGW DLLs use traditional 'lib' prefix
12411 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12805 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
1241212806 ;;
1241312807 pw32*)
1241412808 # pw32 DLLs use 'pw' prefix rather than 'lib'
12415 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12809 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
1241612810 ;;
1241712811 esac
1241812812 dynamic_linker='Win32 ld.exe'
1242112815 *,cl*)
1242212816 # Native MSVC
1242312817 libname_spec='$name'
12424 soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
12425 library_names_spec='${libname}.dll.lib'
12818 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
12819 library_names_spec='$libname.dll.lib'
1242612820
1242712821 case $build_os in
1242812822 mingw*)
1244912843 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1245012844 ;;
1245112845 *)
12452 sys_lib_search_path_spec="$LIB"
12846 sys_lib_search_path_spec=$LIB
1245312847 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
1245412848 # It is most probably a Windows format PATH.
1245512849 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1246212856 esac
1246312857
1246412858 # DLL is installed to $(libdir)/../bin by postinstall_cmds
12465 postinstall_cmds='base_file=`basename \${file}`~
12466 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
12859 postinstall_cmds='base_file=`basename \$file`~
12860 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
1246712861 dldir=$destdir/`dirname \$dlpath`~
1246812862 test -d \$dldir || mkdir -p \$dldir~
1246912863 $install_prog $dir/$dlname \$dldir/$dlname'
1247612870
1247712871 *)
1247812872 # Assume MSVC wrapper
12479 library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
12873 library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
1248012874 dynamic_linker='Win32 ld.exe'
1248112875 ;;
1248212876 esac
1248912883 version_type=darwin
1249012884 need_lib_prefix=no
1249112885 need_version=no
12492 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
12493 soname_spec='${libname}${release}${major}$shared_ext'
12886 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
12887 soname_spec='$libname$release$major$shared_ext'
1249412888 shlibpath_overrides_runpath=yes
1249512889 shlibpath_var=DYLD_LIBRARY_PATH
1249612890 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1250312897 version_type=linux # correct to gnu/linux during the next big refactor
1250412898 need_lib_prefix=no
1250512899 need_version=no
12506 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
12507 soname_spec='${libname}${release}${shared_ext}$major'
12900 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12901 soname_spec='$libname$release$shared_ext$major'
1250812902 shlibpath_var=LD_LIBRARY_PATH
1250912903 ;;
1251012904
1252212916 version_type=freebsd-$objformat
1252312917 case $version_type in
1252412918 freebsd-elf*)
12525 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
12919 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12920 soname_spec='$libname$release$shared_ext$major'
1252612921 need_version=no
1252712922 need_lib_prefix=no
1252812923 ;;
1252912924 freebsd-*)
12530 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
12925 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
1253112926 need_version=yes
1253212927 ;;
1253312928 esac
1255212947 esac
1255312948 ;;
1255412949
12555 gnu*)
12556 version_type=linux # correct to gnu/linux during the next big refactor
12557 need_lib_prefix=no
12558 need_version=no
12559 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
12560 soname_spec='${libname}${release}${shared_ext}$major'
12561 shlibpath_var=LD_LIBRARY_PATH
12562 shlibpath_overrides_runpath=no
12563 hardcode_into_libs=yes
12564 ;;
12565
1256612950 haiku*)
1256712951 version_type=linux # correct to gnu/linux during the next big refactor
1256812952 need_lib_prefix=no
1256912953 need_version=no
1257012954 dynamic_linker="$host_os runtime_loader"
12571 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
12572 soname_spec='${libname}${release}${shared_ext}$major'
12955 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12956 soname_spec='$libname$release$shared_ext$major'
1257312957 shlibpath_var=LIBRARY_PATH
12574 shlibpath_overrides_runpath=yes
12958 shlibpath_overrides_runpath=no
1257512959 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
1257612960 hardcode_into_libs=yes
1257712961 ;;
1258912973 dynamic_linker="$host_os dld.so"
1259012974 shlibpath_var=LD_LIBRARY_PATH
1259112975 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
12592 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12593 soname_spec='${libname}${release}${shared_ext}$major'
12594 if test "X$HPUX_IA64_MODE" = X32; then
12976 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12977 soname_spec='$libname$release$shared_ext$major'
12978 if test 32 = "$HPUX_IA64_MODE"; then
1259512979 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
12980 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
1259612981 else
1259712982 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
12983 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
1259812984 fi
12599 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1260012985 ;;
1260112986 hppa*64*)
1260212987 shrext_cmds='.sl'
1260412989 dynamic_linker="$host_os dld.sl"
1260512990 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1260612991 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
12607 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12608 soname_spec='${libname}${release}${shared_ext}$major'
12992 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12993 soname_spec='$libname$release$shared_ext$major'
1260912994 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1261012995 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1261112996 ;;
1261412999 dynamic_linker="$host_os dld.sl"
1261513000 shlibpath_var=SHLIB_PATH
1261613001 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
12617 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12618 soname_spec='${libname}${release}${shared_ext}$major'
13002 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13003 soname_spec='$libname$release$shared_ext$major'
1261913004 ;;
1262013005 esac
1262113006 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
1262813013 version_type=linux # correct to gnu/linux during the next big refactor
1262913014 need_lib_prefix=no
1263013015 need_version=no
12631 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
12632 soname_spec='${libname}${release}${shared_ext}$major'
13016 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13017 soname_spec='$libname$release$shared_ext$major'
1263313018 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1263413019 shlibpath_var=LD_LIBRARY_PATH
1263513020 shlibpath_overrides_runpath=no
1264013025 case $host_os in
1264113026 nonstopux*) version_type=nonstopux ;;
1264213027 *)
12643 if test "$lt_cv_prog_gnu_ld" = yes; then
13028 if test yes = "$lt_cv_prog_gnu_ld"; then
1264413029 version_type=linux # correct to gnu/linux during the next big refactor
1264513030 else
1264613031 version_type=irix
1264813033 esac
1264913034 need_lib_prefix=no
1265013035 need_version=no
12651 soname_spec='${libname}${release}${shared_ext}$major'
12652 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
13036 soname_spec='$libname$release$shared_ext$major'
13037 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
1265313038 case $host_os in
1265413039 irix5* | nonstopux*)
1265513040 libsuff= shlibsuff=
1266813053 esac
1266913054 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1267013055 shlibpath_overrides_runpath=no
12671 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
12672 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
13056 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
13057 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
1267313058 hardcode_into_libs=yes
1267413059 ;;
1267513060
1267813063 dynamic_linker=no
1267913064 ;;
1268013065
13066 linux*android*)
13067 version_type=none # Android doesn't support versioned libraries.
13068 need_lib_prefix=no
13069 need_version=no
13070 library_names_spec='$libname$release$shared_ext'
13071 soname_spec='$libname$release$shared_ext'
13072 finish_cmds=
13073 shlibpath_var=LD_LIBRARY_PATH
13074 shlibpath_overrides_runpath=yes
13075
13076 # This implies no fast_install, which is unacceptable.
13077 # Some rework will be needed to allow for fast_install
13078 # before this can be enabled.
13079 hardcode_into_libs=yes
13080
13081 dynamic_linker='Android linker'
13082 # Don't embed -rpath directories since the linker doesn't support them.
13083 hardcode_libdir_flag_spec='-L$libdir'
13084 ;;
13085
1268113086 # This must be glibc/ELF.
12682 linux* | k*bsd*-gnu | kopensolaris*-gnu)
13087 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
1268313088 version_type=linux # correct to gnu/linux during the next big refactor
1268413089 need_lib_prefix=no
1268513090 need_version=no
12686 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12687 soname_spec='${libname}${release}${shared_ext}$major'
13091 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13092 soname_spec='$libname$release$shared_ext$major'
1268813093 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1268913094 shlibpath_var=LD_LIBRARY_PATH
1269013095 shlibpath_overrides_runpath=no
1273113136 # Add ABI-specific directories to the system library path.
1273213137 sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
1273313138
12734 # Append ld.so.conf contents to the search path
13139 # Ideally, we could use ldconfig to report *all* directores which are
13140 # searched for libraries, however this is still not possible. Aside from not
13141 # being certain /sbin/ldconfig is available, command
13142 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
13143 # even though it is searched at run-time. Try to do the best guess by
13144 # appending ld.so.conf contents (and includes) to the search path.
1273513145 if test -f /etc/ld.so.conf; then
1273613146 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
1273713147 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
12738
1273913148 fi
1274013149
1274113150 # We used to test for /lib/ld.so.1 and disable shared libraries on
1275213161 need_lib_prefix=no
1275313162 need_version=no
1275413163 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12755 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
13164 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
1275613165 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1275713166 dynamic_linker='NetBSD (a.out) ld.so'
1275813167 else
12759 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
12760 soname_spec='${libname}${release}${shared_ext}$major'
13168 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13169 soname_spec='$libname$release$shared_ext$major'
1276113170 dynamic_linker='NetBSD ld.elf_so'
1276213171 fi
1276313172 shlibpath_var=LD_LIBRARY_PATH
1276713176
1276813177 newsos6)
1276913178 version_type=linux # correct to gnu/linux during the next big refactor
12770 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13179 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
1277113180 shlibpath_var=LD_LIBRARY_PATH
1277213181 shlibpath_overrides_runpath=yes
1277313182 ;;
1277613185 version_type=qnx
1277713186 need_lib_prefix=no
1277813187 need_version=no
12779 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12780 soname_spec='${libname}${release}${shared_ext}$major'
13188 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13189 soname_spec='$libname$release$shared_ext$major'
1278113190 shlibpath_var=LD_LIBRARY_PATH
1278213191 shlibpath_overrides_runpath=no
1278313192 hardcode_into_libs=yes
1278413193 dynamic_linker='ldqnx.so'
1278513194 ;;
1278613195
12787 openbsd*)
13196 openbsd* | bitrig*)
1278813197 version_type=sunos
12789 sys_lib_dlsearch_path_spec="/usr/lib"
13198 sys_lib_dlsearch_path_spec=/usr/lib
1279013199 need_lib_prefix=no
12791 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
12792 case $host_os in
12793 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
12794 *) need_version=no ;;
12795 esac
12796 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
13200 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13201 need_version=no
13202 else
13203 need_version=yes
13204 fi
13205 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
1279713206 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1279813207 shlibpath_var=LD_LIBRARY_PATH
12799 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
12800 case $host_os in
12801 openbsd2.[89] | openbsd2.[89].*)
12802 shlibpath_overrides_runpath=no
12803 ;;
12804 *)
12805 shlibpath_overrides_runpath=yes
12806 ;;
12807 esac
12808 else
12809 shlibpath_overrides_runpath=yes
12810 fi
13208 shlibpath_overrides_runpath=yes
1281113209 ;;
1281213210
1281313211 os2*)
1281413212 libname_spec='$name'
12815 shrext_cmds=".dll"
13213 version_type=windows
13214 shrext_cmds=.dll
13215 need_version=no
1281613216 need_lib_prefix=no
12817 library_names_spec='$libname${shared_ext} $libname.a'
13217 # OS/2 can only load a DLL with a base name of 8 characters or less.
13218 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
13219 v=$($ECHO $release$versuffix | tr -d .-);
13220 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
13221 $ECHO $n$v`$shared_ext'
13222 library_names_spec='${libname}_dll.$libext'
1281813223 dynamic_linker='OS/2 ld.exe'
12819 shlibpath_var=LIBPATH
13224 shlibpath_var=BEGINLIBPATH
13225 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13226 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13227 postinstall_cmds='base_file=`basename \$file`~
13228 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
13229 dldir=$destdir/`dirname \$dlpath`~
13230 test -d \$dldir || mkdir -p \$dldir~
13231 $install_prog $dir/$dlname \$dldir/$dlname~
13232 chmod a+x \$dldir/$dlname~
13233 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13234 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13235 fi'
13236 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
13237 dlpath=$dir/\$dldll~
13238 $RM \$dlpath'
1282013239 ;;
1282113240
1282213241 osf3* | osf4* | osf5*)
1282313242 version_type=osf
1282413243 need_lib_prefix=no
1282513244 need_version=no
12826 soname_spec='${libname}${release}${shared_ext}$major'
12827 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13245 soname_spec='$libname$release$shared_ext$major'
13246 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
1282813247 shlibpath_var=LD_LIBRARY_PATH
1282913248 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
12830 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
13249 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1283113250 ;;
1283213251
1283313252 rdos*)
1283813257 version_type=linux # correct to gnu/linux during the next big refactor
1283913258 need_lib_prefix=no
1284013259 need_version=no
12841 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12842 soname_spec='${libname}${release}${shared_ext}$major'
13260 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13261 soname_spec='$libname$release$shared_ext$major'
1284313262 shlibpath_var=LD_LIBRARY_PATH
1284413263 shlibpath_overrides_runpath=yes
1284513264 hardcode_into_libs=yes
1284913268
1285013269 sunos4*)
1285113270 version_type=sunos
12852 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
13271 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
1285313272 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1285413273 shlibpath_var=LD_LIBRARY_PATH
1285513274 shlibpath_overrides_runpath=yes
12856 if test "$with_gnu_ld" = yes; then
13275 if test yes = "$with_gnu_ld"; then
1285713276 need_lib_prefix=no
1285813277 fi
1285913278 need_version=yes
1286113280
1286213281 sysv4 | sysv4.3*)
1286313282 version_type=linux # correct to gnu/linux during the next big refactor
12864 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12865 soname_spec='${libname}${release}${shared_ext}$major'
13283 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13284 soname_spec='$libname$release$shared_ext$major'
1286613285 shlibpath_var=LD_LIBRARY_PATH
1286713286 case $host_vendor in
1286813287 sni)
1288313302 ;;
1288413303
1288513304 sysv4*MP*)
12886 if test -d /usr/nec ;then
13305 if test -d /usr/nec; then
1288713306 version_type=linux # correct to gnu/linux during the next big refactor
12888 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
12889 soname_spec='$libname${shared_ext}.$major'
13307 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
13308 soname_spec='$libname$shared_ext.$major'
1289013309 shlibpath_var=LD_LIBRARY_PATH
1289113310 fi
1289213311 ;;
1289313312
1289413313 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
12895 version_type=freebsd-elf
13314 version_type=sco
1289613315 need_lib_prefix=no
1289713316 need_version=no
12898 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
12899 soname_spec='${libname}${release}${shared_ext}$major'
13317 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
13318 soname_spec='$libname$release$shared_ext$major'
1290013319 shlibpath_var=LD_LIBRARY_PATH
1290113320 shlibpath_overrides_runpath=yes
1290213321 hardcode_into_libs=yes
12903 if test "$with_gnu_ld" = yes; then
13322 if test yes = "$with_gnu_ld"; then
1290413323 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1290513324 else
1290613325 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1291813337 version_type=linux # correct to gnu/linux during the next big refactor
1291913338 need_lib_prefix=no
1292013339 need_version=no
12921 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
13340 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
1292213341 shlibpath_var=LD_LIBRARY_PATH
1292313342 shlibpath_overrides_runpath=no
1292413343 hardcode_into_libs=yes
1292613345
1292713346 uts4*)
1292813347 version_type=linux # correct to gnu/linux during the next big refactor
12929 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
12930 soname_spec='${libname}${release}${shared_ext}$major'
13348 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13349 soname_spec='$libname$release$shared_ext$major'
1293113350 shlibpath_var=LD_LIBRARY_PATH
1293213351 ;;
1293313352
1293713356 esac
1293813357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
1293913358 $as_echo "$dynamic_linker" >&6; }
12940 test "$dynamic_linker" = no && can_build_shared=no
13359 test no = "$dynamic_linker" && can_build_shared=no
1294113360
1294213361 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
12943 if test "$GCC" = yes; then
13362 if test yes = "$GCC"; then
1294413363 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1294513364 fi
1294613365
12947 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
12948 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
12949 fi
12950 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
12951 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
12952 fi
13366 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
13367 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
13368 fi
13369
13370 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
13371 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
13372 fi
13373
13374 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
13375 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
13376
13377 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
13378 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
13379
13380 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
13381 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
13382
13383
13384
13385
13386
1295313387
1295413388
1295513389
1304713481 hardcode_action=
1304813482 if test -n "$hardcode_libdir_flag_spec" ||
1304913483 test -n "$runpath_var" ||
13050 test "X$hardcode_automatic" = "Xyes" ; then
13484 test yes = "$hardcode_automatic"; then
1305113485
1305213486 # We can hardcode non-existent directories.
13053 if test "$hardcode_direct" != no &&
13487 if test no != "$hardcode_direct" &&
1305413488 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1305513489 # have to relink, otherwise we might link with an installed library
1305613490 # when we should be linking with a yet-to-be-installed one
13057 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
13058 test "$hardcode_minus_L" != no; then
13491 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
13492 test no != "$hardcode_minus_L"; then
1305913493 # Linking always hardcodes the temporary library directory.
1306013494 hardcode_action=relink
1306113495 else
1307013504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
1307113505 $as_echo "$hardcode_action" >&6; }
1307213506
13073 if test "$hardcode_action" = relink ||
13074 test "$inherit_rpath" = yes; then
13507 if test relink = "$hardcode_action" ||
13508 test yes = "$inherit_rpath"; then
1307513509 # Fast installation is not supported
1307613510 enable_fast_install=no
13077 elif test "$shlibpath_overrides_runpath" = yes ||
13078 test "$enable_shared" = no; then
13511 elif test yes = "$shlibpath_overrides_runpath" ||
13512 test no = "$enable_shared"; then
1307913513 # Fast installation is not necessary
1308013514 enable_fast_install=needless
1308113515 fi
1308513519
1308613520
1308713521
13088 if test "x$enable_dlopen" != xyes; then
13522 if test yes != "$enable_dlopen"; then
1308913523 enable_dlopen=unknown
1309013524 enable_dlopen_self=unknown
1309113525 enable_dlopen_self_static=unknown
1309513529
1309613530 case $host_os in
1309713531 beos*)
13098 lt_cv_dlopen="load_add_on"
13532 lt_cv_dlopen=load_add_on
1309913533 lt_cv_dlopen_libs=
1310013534 lt_cv_dlopen_self=yes
1310113535 ;;
1310213536
1310313537 mingw* | pw32* | cegcc*)
13104 lt_cv_dlopen="LoadLibrary"
13538 lt_cv_dlopen=LoadLibrary
1310513539 lt_cv_dlopen_libs=
1310613540 ;;
1310713541
1310813542 cygwin*)
13109 lt_cv_dlopen="dlopen"
13543 lt_cv_dlopen=dlopen
1311013544 lt_cv_dlopen_libs=
1311113545 ;;
1311213546
1311313547 darwin*)
13114 # if libdl is installed we need to link against it
13548 # if libdl is installed we need to link against it
1311513549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
1311613550 $as_echo_n "checking for dlopen in -ldl... " >&6; }
1311713551 if ${ac_cv_lib_dl_dlopen+:} false; then :
1314913583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
1315013584 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
1315113585 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
13152 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
13153 else
13154
13155 lt_cv_dlopen="dyld"
13586 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
13587 else
13588
13589 lt_cv_dlopen=dyld
1315613590 lt_cv_dlopen_libs=
1315713591 lt_cv_dlopen_self=yes
1315813592
1315913593 fi
1316013594
13595 ;;
13596
13597 tpf*)
13598 # Don't try to run any link tests for TPF. We know it's impossible
13599 # because TPF is a cross-compiler, and we know how we open DSOs.
13600 lt_cv_dlopen=dlopen
13601 lt_cv_dlopen_libs=
13602 lt_cv_dlopen_self=no
1316113603 ;;
1316213604
1316313605 *)
1316413606 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
1316513607 if test "x$ac_cv_func_shl_load" = xyes; then :
13166 lt_cv_dlopen="shl_load"
13608 lt_cv_dlopen=shl_load
1316713609 else
1316813610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
1316913611 $as_echo_n "checking for shl_load in -ldld... " >&6; }
1320213644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
1320313645 $as_echo "$ac_cv_lib_dld_shl_load" >&6; }
1320413646 if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
13205 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
13647 lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
1320613648 else
1320713649 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
1320813650 if test "x$ac_cv_func_dlopen" = xyes; then :
13209 lt_cv_dlopen="dlopen"
13651 lt_cv_dlopen=dlopen
1321013652 else
1321113653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
1321213654 $as_echo_n "checking for dlopen in -ldl... " >&6; }
1324513687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
1324613688 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
1324713689 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
13248 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
13690 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
1324913691 else
1325013692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
1325113693 $as_echo_n "checking for dlopen in -lsvld... " >&6; }
1328413726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
1328513727 $as_echo "$ac_cv_lib_svld_dlopen" >&6; }
1328613728 if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
13287 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
13729 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
1328813730 else
1328913731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
1329013732 $as_echo_n "checking for dld_link in -ldld... " >&6; }
1332313765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
1332413766 $as_echo "$ac_cv_lib_dld_dld_link" >&6; }
1332513767 if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
13326 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
13768 lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
1332713769 fi
1332813770
1332913771
1334413786 ;;
1334513787 esac
1334613788
13347 if test "x$lt_cv_dlopen" != xno; then
13789 if test no = "$lt_cv_dlopen"; then
13790 enable_dlopen=no
13791 else
1334813792 enable_dlopen=yes
13349 else
13350 enable_dlopen=no
1335113793 fi
1335213794
1335313795 case $lt_cv_dlopen in
1335413796 dlopen)
13355 save_CPPFLAGS="$CPPFLAGS"
13356 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
13357
13358 save_LDFLAGS="$LDFLAGS"
13797 save_CPPFLAGS=$CPPFLAGS
13798 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
13799
13800 save_LDFLAGS=$LDFLAGS
1335913801 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1336013802
13361 save_LIBS="$LIBS"
13803 save_LIBS=$LIBS
1336213804 LIBS="$lt_cv_dlopen_libs $LIBS"
1336313805
1336413806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
1336613808 if ${lt_cv_dlopen_self+:} false; then :
1336713809 $as_echo_n "(cached) " >&6
1336813810 else
13369 if test "$cross_compiling" = yes; then :
13811 if test yes = "$cross_compiling"; then :
1337013812 lt_cv_dlopen_self=cross
1337113813 else
1337213814 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1341313855 # endif
1341413856 #endif
1341513857
13416 /* When -fvisbility=hidden is used, assume the code has been annotated
13858 /* When -fvisibility=hidden is used, assume the code has been annotated
1341713859 correspondingly for the symbols needed. */
13418 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
13860 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1341913861 int fnord () __attribute__((visibility("default")));
1342013862 #endif
1342113863
1344513887 (eval $ac_link) 2>&5
1344613888 ac_status=$?
1344713889 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13448 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
13890 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
1344913891 (./conftest; exit; ) >&5 2>/dev/null
1345013892 lt_status=$?
1345113893 case x$lt_status in
1346513907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
1346613908 $as_echo "$lt_cv_dlopen_self" >&6; }
1346713909
13468 if test "x$lt_cv_dlopen_self" = xyes; then
13910 if test yes = "$lt_cv_dlopen_self"; then
1346913911 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1347013912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
1347113913 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
1347213914 if ${lt_cv_dlopen_self_static+:} false; then :
1347313915 $as_echo_n "(cached) " >&6
1347413916 else
13475 if test "$cross_compiling" = yes; then :
13917 if test yes = "$cross_compiling"; then :
1347613918 lt_cv_dlopen_self_static=cross
1347713919 else
1347813920 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1351913961 # endif
1352013962 #endif
1352113963
13522 /* When -fvisbility=hidden is used, assume the code has been annotated
13964 /* When -fvisibility=hidden is used, assume the code has been annotated
1352313965 correspondingly for the symbols needed. */
13524 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
13966 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1352513967 int fnord () __attribute__((visibility("default")));
1352613968 #endif
1352713969
1355113993 (eval $ac_link) 2>&5
1355213994 ac_status=$?
1355313995 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13554 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
13996 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
1355513997 (./conftest; exit; ) >&5 2>/dev/null
1355613998 lt_status=$?
1355713999 case x$lt_status in
1357214014 $as_echo "$lt_cv_dlopen_self_static" >&6; }
1357314015 fi
1357414016
13575 CPPFLAGS="$save_CPPFLAGS"
13576 LDFLAGS="$save_LDFLAGS"
13577 LIBS="$save_LIBS"
14017 CPPFLAGS=$save_CPPFLAGS
14018 LDFLAGS=$save_LDFLAGS
14019 LIBS=$save_LIBS
1357814020 ;;
1357914021 esac
1358014022
1361814060 # FIXME - insert some real tests, host_os isn't really good enough
1361914061 case $host_os in
1362014062 darwin*)
13621 if test -n "$STRIP" ; then
14063 if test -n "$STRIP"; then
1362214064 striplib="$STRIP -x"
1362314065 old_striplib="$STRIP -S"
1362414066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1364614088
1364714089
1364814090
13649 # Report which library types will actually be built
14091 # Report what library types will actually be built
1365014092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
1365114093 $as_echo_n "checking if libtool supports shared libraries... " >&6; }
1365214094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
1365414096
1365514097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
1365614098 $as_echo_n "checking whether to build shared libraries... " >&6; }
13657 test "$can_build_shared" = "no" && enable_shared=no
14099 test no = "$can_build_shared" && enable_shared=no
1365814100
1365914101 # On AIX, shared libraries and static libraries use the same namespace, and
1366014102 # are all built from PIC.
1366114103 case $host_os in
1366214104 aix3*)
13663 test "$enable_shared" = yes && enable_static=no
14105 test yes = "$enable_shared" && enable_static=no
1366414106 if test -n "$RANLIB"; then
1366514107 archive_cmds="$archive_cmds~\$RANLIB \$lib"
1366614108 postinstall_cmds='$RANLIB $lib'
1366814110 ;;
1366914111
1367014112 aix[4-9]*)
13671 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
13672 test "$enable_shared" = yes && enable_static=no
14113 if test ia64 != "$host_cpu"; then
14114 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
14115 yes,aix,yes) ;; # shared object as lib.so file only
14116 yes,svr4,*) ;; # shared object as lib.so archive member only
14117 yes,*) enable_static=no ;; # shared object in lib.a archive as well
14118 esac
1367314119 fi
1367414120 ;;
1367514121 esac
1367914125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
1368014126 $as_echo_n "checking whether to build static libraries... " >&6; }
1368114127 # Make sure either enable_shared or enable_static is yes.
13682 test "$enable_shared" = yes || enable_static=yes
14128 test yes = "$enable_shared" || enable_static=yes
1368314129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
1368414130 $as_echo "$enable_static" >&6; }
1368514131
1369314139 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1369414140 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1369514141
13696 CC="$lt_save_CC"
14142 CC=$lt_save_CC
1369714143
1369814144
1369914145
1590416350 fi
1590516351
1590616352
15907 # Check whether --enable-winapi was given.
16353
16354
16355 # Check whether --enable-winapi was given.
1590816356 if test "${enable_winapi+set}" = set; then :
1590916357 enableval=$enable_winapi; ac_cv_enable_winapi=$enableval
1591016358 else
1591116359 ac_cv_enable_winapi=auto-detect
1591216360 fi
15913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable WINAPI support for cross-compilation" >&5
16361
16362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable WINAPI support for cross-compilation" >&5
1591416363 $as_echo_n "checking whether to enable enable WINAPI support for cross-compilation... " >&6; }
1591516364 if ${ac_cv_enable_winapi+:} false; then :
1591616365 $as_echo_n "(cached) " >&6
1592016369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_winapi" >&5
1592116370 $as_echo "$ac_cv_enable_winapi" >&6; }
1592216371
15923 if test "x$ac_cv_enable_winapi" = xauto-detect; then :
16372 if test "x$ac_cv_enable_winapi" = xauto-detect; then :
1592416373 ac_common_check_winapi_target_string="$target"
1592516374
15926 if test "x$ac_common_check_winapi_target_string" = x; then :
16375 if test "x$ac_common_check_winapi_target_string" = x; then :
1592716376 ac_common_check_winapi_target_string="$host"
1592816377 fi
1592916378
15930 case $ac_common_check_winapi_target_string in #(
16379 case $ac_common_check_winapi_target_string in #(
1593116380 *mingw*) :
1593216381 { $as_echo "$as_me:${as_lineno-$LINENO}: detected MinGW enabling WINAPI support for cross-compilation" >&5
1593316382 $as_echo "$as_me: detected MinGW enabling WINAPI support for cross-compilation" >&6;}
15934 ac_cv_enable_winapi=yes ;; #(
16383 ac_cv_enable_winapi=yes ;; #(
1593516384 *) :
1593616385 ac_cv_enable_winapi=no ;; #(
1593716386 *) :
1594116390 fi
1594216391
1594316392
15944 # Check whether --enable-wide-character-type was given.
16393
16394
16395 # Check whether --enable-wide-character-type was given.
1594516396 if test "${enable_wide_character_type+set}" = set; then :
1594616397 enableval=$enable_wide_character_type; ac_cv_enable_wide_character_type=$enableval
1594716398 else
1594816399 ac_cv_enable_wide_character_type=no
1594916400 fi
15950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable wide character type support" >&5
16401
16402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable wide character type support" >&5
1595116403 $as_echo_n "checking whether to enable enable wide character type support... " >&6; }
1595216404 if ${ac_cv_enable_wide_character_type+:} false; then :
1595316405 $as_echo_n "(cached) " >&6
1597116423 else
1597216424 HAVE_WIDE_CHARACTER_TYPE=0
1597316425
15974 HAVE_WCHAR_H=0
15975
15976
15977 fi
15978
15979 for ac_header in sys/types.h inttypes.h stdint.h
16426
16427 fi
16428
16429 for ac_header in sys/types.h inttypes.h stdint.h wchar.h
1598016430 do :
1598116431 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
1598216432 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
1601316463
1601416464 else
1601516465 HAVE_STDINT_H=0
16466
16467
16468 fi
16469
16470 if test "x$ac_cv_header_wchar_h" = xyes; then :
16471 HAVE_WCHAR_H=1
16472
16473 else
16474 HAVE_WCHAR_H=0
1601616475
1601716476
1601816477 fi
1621716676
1621816677
1621916678
16220 if test "x$ac_cv_enable_wide_character_type" != xno; then :
16221 for ac_header in wchar.h
16222 do :
16223 ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
16224 if test "x$ac_cv_header_wchar_h" = xyes; then :
16225 cat >>confdefs.h <<_ACEOF
16226 #define HAVE_WCHAR_H 1
16227 _ACEOF
16228
16229 $as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
16230
16231 HAVE_WCHAR_H=1
16232
16233 else
16234 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16235 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16236 as_fn_error 1 "Missing header: wchar.h
16237 See \`config.log' for more details" "$LINENO" 5; }
16238 fi
16239
16240 done
16241
16242
16679 if test "x$ac_cv_header_wchar_h" = xyes; then :
1624316680 # The cast to long int works around a bug in the HP C Compiler
1624416681 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
1624516682 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
1627316710 _ACEOF
1627416711
1627516712
16276
16277 fi
16278
16279
16280
16281 if test "x$ac_cv_enable_winapi" = xyes; then :
16713 fi
16714
16715
16716
16717 if test "x$ac_cv_enable_winapi" = xyes; then :
1628216718 for ac_header in windows.h
1628316719 do :
1628416720 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
1629216728 done
1629316729
1629416730
16295 if test "x$ac_cv_header_windows_h" = xno; then :
16731 if test "x$ac_cv_header_windows_h" = xno; then :
1629616732 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1629716733 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1629816734 as_fn_error 1 "Missing header: windows.h header is required to compile with winapi support
1630216738
1630316739 fi
1630416740
16305 if test "x$ac_cv_enable_winapi" = xno; then :
16741 if test "x$ac_cv_enable_winapi" = xno; then :
1630616742 for ac_header in libintl.h
1630716743 do :
1630816744 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
1631516751
1631616752 done
1631716753
16318 fi
16319
16320 for ac_header in limits.h
16754
16755 fi
16756
16757 for ac_header in limits.h
1632116758 do :
1632216759 ac_fn_c_check_header_mongrel "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default"
1632316760 if test "x$ac_cv_header_limits_h" = xyes; then :
1633016767 done
1633116768
1633216769
16333 for ac_header in stdlib.h string.h
16770 for ac_header in stdlib.h string.h
1633416771 do :
1633516772 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
1633616773 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
1634416781 done
1634516782
1634616783
16347 for ac_func in fclose feof fgets fopen fread fseeko fseeko64 fwrite vfprintf
16784 for ac_header in wchar.h wctype.h
16785 do :
16786 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16787 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16788 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16789 cat >>confdefs.h <<_ACEOF
16790 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16791 _ACEOF
16792
16793 fi
16794
16795 done
16796
16797
16798 for ac_func in fclose feof fgets fopen fread fseeko fseeko64 fwrite vfprintf
1634816799 do :
1634916800 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
1635016801 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
1635716808 done
1635816809
1635916810
16360 if test "x$ac_cv_func_fclose" != xyes; then :
16811 if test "x$ac_cv_func_fclose" != xyes; then :
1636116812 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1636216813 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1636316814 as_fn_error 1 "Missing function: fclose
1636516816
1636616817 fi
1636716818
16368 if test "x$ac_cv_func_feof" != xyes; then :
16819 if test "x$ac_cv_func_feof" != xyes; then :
1636916820 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1637016821 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1637116822 as_fn_error 1 "Missing function: feof
1637316824
1637416825 fi
1637516826
16376 if test "x$ac_cv_func_fgets" != xyes; then :
16827 if test "x$ac_cv_func_fgets" != xyes; then :
1637716828 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1637816829 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1637916830 as_fn_error 1 "Missing function: fgets
1638116832
1638216833 fi
1638316834
16384 if test "x$ac_cv_func_fopen" != xyes; then :
16835 if test "x$ac_cv_func_fopen" != xyes; then :
1638516836 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1638616837 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1638716838 as_fn_error 1 "Missing function: fopen
1638916840
1639016841 fi
1639116842
16392 if test "x$ac_cv_func_fread" != xyes; then :
16843 if test "x$ac_cv_func_fread" != xyes; then :
1639316844 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1639416845 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1639516846 as_fn_error 1 "Missing function: fread
1639716848
1639816849 fi
1639916850
16400 if test "x$ac_cv_func_fseeko" != xyes && test "x$ac_cv_func_fseeko64" != xyes; then :
16851 if test "x$ac_cv_func_fseeko" != xyes && test "x$ac_cv_func_fseeko64" != xyes; then :
1640116852 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1640216853 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1640316854 as_fn_error 1 "Missing function: fseeko and fseeko64
1640516856
1640616857 fi
1640716858
16408 if test "x$ac_cv_func_fwrite" != xyes; then :
16859 if test "x$ac_cv_func_fwrite" != xyes; then :
1640916860 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1641016861 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1641116862 as_fn_error 1 "Missing function: fwrite
1641316864
1641416865 fi
1641516866
16416 if test "x$ac_cv_func_vfprintf" != xyes; then :
16867 if test "x$ac_cv_func_vfprintf" != xyes; then :
1641716868 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1641816869 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1641916870 as_fn_error 1 "Missing function: vfprintf
1642116872
1642216873 fi
1642316874
16424 if test "x$ac_cv_enable_wide_character_type" != xno; then :
16875 if test "x$ac_cv_enable_wide_character_type" != xno; then :
1642516876 for ac_func in fgetws
1642616877 do :
1642716878 ac_fn_c_check_func "$LINENO" "fgetws" "ac_cv_func_fgetws"
1643416885 done
1643516886
1643616887
16437 if test "x$ac_cv_func_fgetws" != xyes; then :
16888 if test "x$ac_cv_func_fgetws" != xyes; then :
1643816889 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1643916890 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1644016891 as_fn_error 1 "Missing function: fgetws
1644416895
1644516896 fi
1644616897
16447 for ac_func in free malloc memcmp memcpy memset realloc
16898 for ac_func in free malloc memcmp memcpy memset realloc
1644816899 do :
1644916900 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
1645016901 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
1645716908 done
1645816909
1645916910
16460 if test "x$ac_cv_func_free" != xyes; then :
16911 if test "x$ac_cv_func_free" != xyes; then :
1646116912 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1646216913 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1646316914 as_fn_error 1 "Missing function: free
1646516916
1646616917 fi
1646716918
16468 if test "x$ac_cv_func_malloc" != xyes; then :
16919 if test "x$ac_cv_func_malloc" != xyes; then :
1646916920 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1647016921 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1647116922 as_fn_error 1 "Missing function: malloc
1647316924
1647416925 fi
1647516926
16476 if test "x$ac_cv_func_memcmp" != xyes; then :
16927 if test "x$ac_cv_func_memcmp" != xyes; then :
1647716928 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1647816929 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1647916930 as_fn_error 1 "Missing function: memcmp
1648116932
1648216933 fi
1648316934
16484 if test "x$ac_cv_func_memcpy" != xyes; then :
16935 if test "x$ac_cv_func_memcpy" != xyes; then :
1648516936 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1648616937 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1648716938 as_fn_error 1 "Missing function: memcpy
1648916940
1649016941 fi
1649116942
16492 if test "x$ac_cv_func_memset" != xyes; then :
16943 if test "x$ac_cv_func_memset" != xyes; then :
1649316944 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1649416945 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1649516946 as_fn_error 1 "Missing function: memset
1649716948
1649816949 fi
1649916950
16500 if test "x$ac_cv_func_realloc" != xyes; then :
16951 if test "x$ac_cv_func_realloc" != xyes; then :
1650116952 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1650216953 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1650316954 as_fn_error 1 "Missing function: realloc
1650516956
1650616957 fi
1650716958
16959 for ac_func in memchr memrchr snprintf sscanf strcasecmp strchr strlen strncasecmp strncmp strncpy strnicmp strrchr strstr vsnprintf
16960 do :
16961 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16962 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16963 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16964 cat >>confdefs.h <<_ACEOF
16965 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16966 _ACEOF
16967
16968 fi
16969 done
16970
16971
16972 if test "x$ac_cv_func_memchr" != xyes && test "x$ac_cv_func_strchr" != xyes; then :
16973 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16974 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16975 as_fn_error 1 "Missing functions: memchr and strchr
16976 See \`config.log' for more details" "$LINENO" 5; }
16977
16978 fi
16979
16980 if test "x$ac_cv_func_memcmp" != xyes && test "x$ac_cv_func_strncmp" != xyes; then :
16981 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16982 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16983 as_fn_error 1 "Missing functions: memcmp and strncmp
16984 See \`config.log' for more details" "$LINENO" 5; }
16985
16986 fi
16987
16988 if test "x$ac_cv_func_memcpy" != xyes && test "x$ac_cv_func_strncpy" != xyes; then :
16989 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16990 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16991 as_fn_error 1 "Missing functions: memcpy and strncpy
16992 See \`config.log' for more details" "$LINENO" 5; }
16993
16994 fi
16995
16996 if test "x$ac_cv_func_memrchr" = xyes; then :
16997 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
16998 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
16999 ac_have_decl=1
17000 else
17001 ac_have_decl=0
17002 fi
17003
17004 cat >>confdefs.h <<_ACEOF
17005 #define HAVE_DECL_MEMRCHR $ac_have_decl
17006 _ACEOF
17007
17008
17009 if test "x$ac_cv_decl_memrchr" != xyes; then :
17010 ac_cv_func_memrchr=no
17011 fi
17012
17013 fi
17014
17015 if test "x$ac_cv_func_memrchr" != xyes && test "x$ac_cv_func_strrchr" != xyes; then :
17016 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17017 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17018 as_fn_error 1 "Missing functions: strrchr and memrchr
17019 See \`config.log' for more details" "$LINENO" 5; }
17020
17021 fi
17022
17023 if test "x$ac_cv_func_snprintf" != xyes; then :
17024 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17025 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17026 as_fn_error 1 "Missing function: snprintf
17027 See \`config.log' for more details" "$LINENO" 5; }
17028
17029 fi
17030
17031 if test "x$ac_cv_func_sscanf" != xyes; then :
17032 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17033 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17034 as_fn_error 1 "Missing function: sscanf
17035 See \`config.log' for more details" "$LINENO" 5; }
17036
17037 fi
17038
17039 if test "x$ac_cv_func_strlen" != xyes; then :
17040 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17041 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17042 as_fn_error 1 "Missing function: strlen
17043 See \`config.log' for more details" "$LINENO" 5; }
17044
17045 fi
17046
17047 if test "x$ac_cv_func_strcasecmp" != xyes && test "x$ac_cv_func_strncasecmp" != xyes && test "x$ac_cv_func_strnicmp" != xyes; then :
17048 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17049 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17050 as_fn_error 1 "Missing functions: strncasecmp, strcasecmp and strnicmp
17051 See \`config.log' for more details" "$LINENO" 5; }
17052
17053 fi
17054
17055 if test "x$ac_cv_func_strstr" != xyes; then :
17056 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17057 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17058 as_fn_error 1 "Missing function: strstr
17059 See \`config.log' for more details" "$LINENO" 5; }
17060
17061 fi
17062
17063 if test "x$ac_cv_func_vsnprintf" != xyes; then :
17064 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17065 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17066 as_fn_error 1 "Missing function: vsnprintf
17067 See \`config.log' for more details" "$LINENO" 5; }
17068
17069 fi
17070
17071 if test "x$ac_cv_enable_wide_character_type" != xno; then :
17072 for ac_func in swprintf towlower wcscasecmp wcschr wcslen wcsncasecmp wcsncmp wcsncpy wcsnicmp wcsrchr wcsstr wmemchr wmemcmp wmemcpy wmemrchr
17073 do :
17074 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17075 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17076 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17077 cat >>confdefs.h <<_ACEOF
17078 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17079 _ACEOF
17080
17081 fi
17082 done
17083
17084
17085 if test "x$ac_cv_func_swprintf" != xyes; then :
17086 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17087 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17088 as_fn_error 1 "Missing function: swprintf
17089 See \`config.log' for more details" "$LINENO" 5; }
17090
17091 fi
17092
17093 if test "x$ac_cv_func_wmemchr" != xyes && test "x$ac_cv_func_wcschr" != xyes; then :
17094 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17095 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17096 as_fn_error 1 "Missing functions: wmemchr and wcschr
17097 See \`config.log' for more details" "$LINENO" 5; }
17098
17099 fi
17100
17101 if test "x$ac_cv_func_wmemcmp" != xyes && test "x$ac_cv_func_wcsncmp" != xyes; then :
17102 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17103 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17104 as_fn_error 1 "Missing functions: wmemcmp and wcsncmp
17105 See \`config.log' for more details" "$LINENO" 5; }
17106
17107 fi
17108
17109 if test "x$ac_cv_func_wmemcpy" != xyes && test "x$ac_cv_func_wcsncpy" != xyes; then :
17110 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17111 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17112 as_fn_error 1 "Missing functions: wmemcpy and wcsncpy
17113 See \`config.log' for more details" "$LINENO" 5; }
17114
17115 fi
17116
17117 if test "x$ac_cv_func_wmemrchr" != xyes && test "x$ac_cv_func_wcsrchr" != xyes; then :
17118 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17119 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17120 as_fn_error 1 "Missing functions: wmemrchr and wcsrchr
17121 See \`config.log' for more details" "$LINENO" 5; }
17122
17123 fi
17124
17125 if test "x$ac_cv_func_wcslen" != xyes; then :
17126 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17127 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17128 as_fn_error 1 "Missing function: wcslen
17129 See \`config.log' for more details" "$LINENO" 5; }
17130
17131 fi
17132
17133 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 :
17134 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17135 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17136 as_fn_error 1 "Missing functions: wcsncasecmp, wcscasecmp, wcsnicmp and towlower
17137 See \`config.log' for more details" "$LINENO" 5; }
17138
17139 fi
17140
17141 if test "x$ac_cv_func_wcsstr" != xyes; then :
17142 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17143 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17144 as_fn_error 1 "Missing function: wcsstr
17145 See \`config.log' for more details" "$LINENO" 5; }
17146
17147 fi
17148
17149 fi
17150
17151
1650817152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the conversion specifier \"%jd\"" >&5
1650917153 $as_echo_n "checking whether printf supports the conversion specifier \"%jd\"... " >&6; }
1651017154
16511 SAVE_CFLAGS="$CFLAGS"
16512 CFLAGS="$CFLAGS -Wall -Werror"
16513 ac_ext=c
17155 SAVE_CFLAGS="$CFLAGS"
17156 CFLAGS="$CFLAGS -Wall -Werror"
17157 ac_ext=c
1651417158 ac_cpp='$CPP $CPPFLAGS'
1651517159 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1651617160 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1651717161 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1651817162
1651917163
16520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1652117165 /* end confdefs.h. */
1652217166 #include <stdio.h>
1652317167 int
1653617180 rm -f core conftest.err conftest.$ac_objext \
1653717181 conftest$ac_exeext conftest.$ac_ext
1653817182
16539 if test "x$ac_cv_cv_have_printf_jd" = xyes; then :
17183 if test "x$ac_cv_cv_have_printf_jd" = xyes; then :
1654017184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1654117185 /* end confdefs.h. */
1654217186 #include <sys/types.h>
1655917203
1656017204 fi
1656117205
16562 if test "x$ac_cv_cv_have_printf_jd" = xyes; then :
17206 if test "x$ac_cv_cv_have_printf_jd" = xyes; then :
1656317207 if test "$cross_compiling" = yes; then :
1656417208 ac_cv_cv_have_printf_jd=undetermined
1656517209 else
1658917233
1659017234 fi
1659117235
16592 ac_ext=c
17236 ac_ext=c
1659317237 ac_cpp='$CPP $CPPFLAGS'
1659417238 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1659517239 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1659617240 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1659717241
16598 CFLAGS="$SAVE_CFLAGS"
16599
16600 if test "x$ac_cv_cv_have_printf_jd" = xyes; then :
17242 CFLAGS="$SAVE_CFLAGS"
17243
17244 if test "x$ac_cv_cv_have_printf_jd" = xyes; then :
1660117245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1660217246 $as_echo "yes" >&6; }
1660317247
1660617250 else
1660717251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cv_have_printf_jd" >&5
1660817252 $as_echo "$ac_cv_cv_have_printf_jd" >&6; }
16609 fi
16610
16611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the conversion specifier \"%zd\"" >&5
17253
17254 fi
17255
17256
17257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the conversion specifier \"%zd\"" >&5
1661217258 $as_echo_n "checking whether printf supports the conversion specifier \"%zd\"... " >&6; }
1661317259
16614 SAVE_CFLAGS="$CFLAGS"
16615 CFLAGS="$CFLAGS -Wall -Werror"
16616 ac_ext=c
17260 SAVE_CFLAGS="$CFLAGS"
17261 CFLAGS="$CFLAGS -Wall -Werror"
17262 ac_ext=c
1661717263 ac_cpp='$CPP $CPPFLAGS'
1661817264 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1661917265 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1662017266 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1662117267
1662217268
16623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1662417270 /* end confdefs.h. */
1662517271 #include <stdio.h>
1662617272 int
1663917285 rm -f core conftest.err conftest.$ac_objext \
1664017286 conftest$ac_exeext conftest.$ac_ext
1664117287
16642 if test "x$ac_cv_cv_have_printf_zd" = xyes; then :
17288 if test "x$ac_cv_cv_have_printf_zd" = xyes; then :
1664317289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1664417290 /* end confdefs.h. */
1664517291 #include <sys/types.h>
1666217308
1666317309 fi
1666417310
16665 if test "x$ac_cv_cv_have_printf_zd" = xyes; then :
17311 if test "x$ac_cv_cv_have_printf_zd" = xyes; then :
1666617312 if test "$cross_compiling" = yes; then :
1666717313 ac_cv_cv_have_printf_zd=undetermined
1666817314 else
1669217338
1669317339 fi
1669417340
16695 ac_ext=c
17341 ac_ext=c
1669617342 ac_cpp='$CPP $CPPFLAGS'
1669717343 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1669817344 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1669917345 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1670017346
16701 CFLAGS="$SAVE_CFLAGS"
16702
16703 if test "x$ac_cv_cv_have_printf_zd" = xyes; then :
17347 CFLAGS="$SAVE_CFLAGS"
17348
17349 if test "x$ac_cv_cv_have_printf_zd" = xyes; then :
1670417350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1670517351 $as_echo "yes" >&6; }
1670617352
1670917355 else
1671017356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cv_have_printf_zd" >&5
1671117357 $as_echo "$ac_cv_cv_have_printf_zd" >&6; }
17358
1671217359 fi
1671317360
1671417361
1683417481 fi
1683517482 fi
1683617483
16837 # Check whether --with-libcstring was given.
16838 if test "${with_libcstring+set}" = set; then :
16839 withval=$with_libcstring; ac_cv_with_libcstring=$withval
16840 else
16841 ac_cv_with_libcstring=auto-detect
16842 fi
16843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcstring in includedir and libdir or in the specified DIR, or no if to use local version" >&5
16844 $as_echo_n "checking whether to use search for libcstring in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; }
16845 if ${ac_cv_with_libcstring+:} false; then :
16846 $as_echo_n "(cached) " >&6
16847 else
16848 ac_cv_with_libcstring=auto-detect
16849 fi
16850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcstring" >&5
16851 $as_echo "$ac_cv_with_libcstring" >&6; }
16852
16853 if test "x$ac_cv_with_libcstring" != x && test "x$ac_cv_with_libcstring" != xno && test "x$ac_cv_with_libcstring" != xauto-detect; then :
16854 if test -d "$ac_cv_with_libcstring"; then :
16855 CFLAGS="$CFLAGS -I${ac_cv_with_libcstring}/include"
16856 LDFLAGS="$LDFLAGS -L${ac_cv_with_libcstring}/lib"
16857 else
16858 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libcstring" >&5
16859 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libcstring" >&2;}
16860
16861 fi
16862
16863 fi
16864
16865 if test "x$ac_cv_with_libcstring" = xno; then :
16866 ac_cv_libcstring=no
16867 else
16868 if test "x$ac_cv_header_libcstring_h" = xno; then :
16869 ac_cv_libcstring=no
16870 else
16871 if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then :
16872
16873 pkg_failed=no
16874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcstring" >&5
16875 $as_echo_n "checking for libcstring... " >&6; }
16876
16877 if test -n "$libcstring_CFLAGS"; then
16878 pkg_cv_libcstring_CFLAGS="$libcstring_CFLAGS"
16879 elif test -n "$PKG_CONFIG"; then
16880 if test -n "$PKG_CONFIG" && \
16881 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcstring >= 20120425\""; } >&5
16882 ($PKG_CONFIG --exists --print-errors "libcstring >= 20120425") 2>&5
16883 ac_status=$?
16884 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16885 test $ac_status = 0; }; then
16886 pkg_cv_libcstring_CFLAGS=`$PKG_CONFIG --cflags "libcstring >= 20120425" 2>/dev/null`
16887 test "x$?" != "x0" && pkg_failed=yes
16888 else
16889 pkg_failed=yes
16890 fi
16891 else
16892 pkg_failed=untried
16893 fi
16894 if test -n "$libcstring_LIBS"; then
16895 pkg_cv_libcstring_LIBS="$libcstring_LIBS"
16896 elif test -n "$PKG_CONFIG"; then
16897 if test -n "$PKG_CONFIG" && \
16898 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcstring >= 20120425\""; } >&5
16899 ($PKG_CONFIG --exists --print-errors "libcstring >= 20120425") 2>&5
16900 ac_status=$?
16901 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16902 test $ac_status = 0; }; then
16903 pkg_cv_libcstring_LIBS=`$PKG_CONFIG --libs "libcstring >= 20120425" 2>/dev/null`
16904 test "x$?" != "x0" && pkg_failed=yes
16905 else
16906 pkg_failed=yes
16907 fi
16908 else
16909 pkg_failed=untried
16910 fi
16911
16912
16913
16914 if test $pkg_failed = yes; then
16915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16916 $as_echo "no" >&6; }
16917
16918 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
16919 _pkg_short_errors_supported=yes
16920 else
16921 _pkg_short_errors_supported=no
16922 fi
16923 if test $_pkg_short_errors_supported = yes; then
16924 libcstring_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcstring >= 20120425" 2>&1`
16925 else
16926 libcstring_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcstring >= 20120425" 2>&1`
16927 fi
16928 # Put the nasty error message in config.log where it belongs
16929 echo "$libcstring_PKG_ERRORS" >&5
16930
16931 ac_cv_libcstring=no
16932 elif test $pkg_failed = untried; then
16933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16934 $as_echo "no" >&6; }
16935 ac_cv_libcstring=no
16936 else
16937 libcstring_CFLAGS=$pkg_cv_libcstring_CFLAGS
16938 libcstring_LIBS=$pkg_cv_libcstring_LIBS
16939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16940 $as_echo "yes" >&6; }
16941 ac_cv_libcstring=yes
16942 fi
16943
16944 fi
16945
16946 fi
16947
16948 if test "x$ac_cv_libcstring" = xyes; then :
16949 ac_cv_libcstring_CPPFLAGS="$pkg_cv_libcstring_CFLAGS"
16950 ac_cv_libcstring_LIBADD="$pkg_cv_libcstring_LIBS"
16951 else
16952 for ac_header in libcstring.h
16953 do :
16954 ac_fn_c_check_header_mongrel "$LINENO" "libcstring.h" "ac_cv_header_libcstring_h" "$ac_includes_default"
16955 if test "x$ac_cv_header_libcstring_h" = xyes; then :
16956 cat >>confdefs.h <<_ACEOF
16957 #define HAVE_LIBCSTRING_H 1
16958 _ACEOF
16959
16960 fi
16961
16962 done
16963
16964
16965 if test "x$ac_cv_header_libcstring_h" = xno; then :
16966 ac_cv_libcstring=no
16967 else
16968 ac_cv_libcstring=yes
16969
16970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcstring_get_version in -lcstring" >&5
16971 $as_echo_n "checking for libcstring_get_version in -lcstring... " >&6; }
16972 if ${ac_cv_lib_cstring_libcstring_get_version+:} false; then :
16973 $as_echo_n "(cached) " >&6
16974 else
16975 ac_check_lib_save_LIBS=$LIBS
16976 LIBS="-lcstring $LIBS"
16977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16978 /* end confdefs.h. */
16979
16980 /* Override any GCC internal prototype to avoid an error.
16981 Use char because int might match the return type of a GCC
16982 builtin and then its argument prototype would still apply. */
16983 #ifdef __cplusplus
16984 extern "C"
16985 #endif
16986 char libcstring_get_version ();
16987 int
16988 main ()
16989 {
16990 return libcstring_get_version ();
16991 ;
16992 return 0;
16993 }
16994 _ACEOF
16995 if ac_fn_c_try_link "$LINENO"; then :
16996 ac_cv_lib_cstring_libcstring_get_version=yes
16997 else
16998 ac_cv_lib_cstring_libcstring_get_version=no
16999 fi
17000 rm -f core conftest.err conftest.$ac_objext \
17001 conftest$ac_exeext conftest.$ac_ext
17002 LIBS=$ac_check_lib_save_LIBS
17003 fi
17004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cstring_libcstring_get_version" >&5
17005 $as_echo "$ac_cv_lib_cstring_libcstring_get_version" >&6; }
17006 if test "x$ac_cv_lib_cstring_libcstring_get_version" = xyes; then :
17007 ac_cv_libcstring_dummy=yes
17008 else
17009 ac_cv_libcstring=no
17010 fi
17011
17012
17013 ac_cv_libcstring_LIBADD="-lcstring"
17014
17015 fi
17016
17017 fi
17018
17019 fi
17020
17021 if test "x$ac_cv_libcstring" = xyes; then :
17022
17023 $as_echo "#define HAVE_LIBCSTRING 1" >>confdefs.h
17024
17025
17026 fi
17027
17028 if test "x$ac_cv_libcstring" = xyes; then :
17029 HAVE_LIBCSTRING=1
17030
17031 else
17032 HAVE_LIBCSTRING=0
17033
17034
17035 fi
17036
17037
17038 for ac_header in stdlib.h string.h
17039 do :
17040 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17041 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
17042 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17043 cat >>confdefs.h <<_ACEOF
17044 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17045 _ACEOF
17046
17047 fi
17048
17049 done
17050
17051
17052 for ac_header in wchar.h wctype.h
17053 do :
17054 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17055 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
17056 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17057 cat >>confdefs.h <<_ACEOF
17058 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17059 _ACEOF
17060
17061 fi
17062
17063 done
17064
17065
17066 for ac_func in fgets memchr memcmp memcpy memrchr snprintf sscanf strcasecmp strchr strlen strncasecmp strncmp strncpy strnicmp strrchr strstr vsnprintf
17067 do :
17068 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17069 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17070 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17071 cat >>confdefs.h <<_ACEOF
17072 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17073 _ACEOF
17074
17075 fi
17076 done
17077
17078
17079 if test "x$ac_cv_func_fgets" != xyes; then :
17080 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17081 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17082 as_fn_error 1 "Missing function: fgets
17083 See \`config.log' for more details" "$LINENO" 5; }
17084
17085 fi
17086
17087 if test "x$ac_cv_func_memchr" != xyes && test "x$ac_cv_func_strchr" != xyes; then :
17088 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17089 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17090 as_fn_error 1 "Missing functions: memchr and strchr
17091 See \`config.log' for more details" "$LINENO" 5; }
17092
17093 fi
17094
17095 if test "x$ac_cv_func_memcmp" != xyes && test "x$ac_cv_func_strncmp" != xyes; then :
17096 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17097 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17098 as_fn_error 1 "Missing functions: memcmp and strncmp
17099 See \`config.log' for more details" "$LINENO" 5; }
17100
17101 fi
17102
17103 if test "x$ac_cv_func_memcpy" != xyes && test "x$ac_cv_func_strncpy" != xyes; then :
17104 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17105 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17106 as_fn_error 1 "Missing functions: memcpy and strncpy
17107 See \`config.log' for more details" "$LINENO" 5; }
17108
17109 fi
17110
17111 if test "x$ac_cv_func_memrchr" = xyes; then :
17112 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
17113 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
17114 ac_have_decl=1
17115 else
17116 ac_have_decl=0
17117 fi
17118
17119 cat >>confdefs.h <<_ACEOF
17120 #define HAVE_DECL_MEMRCHR $ac_have_decl
17121 _ACEOF
17122
17123
17124 if test "x$ac_cv_decl_memrchr" != xyes; then :
17125 ac_cv_func_memrchr=no
17126 fi
17127
17128 fi
17129
17130 if test "x$ac_cv_func_memrchr" != xyes && test "x$ac_cv_func_strrchr" != xyes; then :
17131 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17132 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17133 as_fn_error 1 "Missing functions: strrchr and memrchr
17134 See \`config.log' for more details" "$LINENO" 5; }
17135
17136 fi
17137
17138 if test "x$ac_cv_func_snprintf" != xyes; then :
17139 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17140 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17141 as_fn_error 1 "Missing function: snprintf
17142 See \`config.log' for more details" "$LINENO" 5; }
17143
17144 fi
17145
17146 if test "x$ac_cv_func_sscanf" != xyes; then :
17147 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17148 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17149 as_fn_error 1 "Missing function: sscanf
17150 See \`config.log' for more details" "$LINENO" 5; }
17151
17152 fi
17153
17154 if test "x$ac_cv_func_strlen" != xyes; then :
17155 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17156 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17157 as_fn_error 1 "Missing function: strlen
17158 See \`config.log' for more details" "$LINENO" 5; }
17159
17160 fi
17161
17162 if test "x$ac_cv_func_strcasecmp" != xyes && test "x$ac_cv_func_strncasecmp" != xyes && test "x$ac_cv_func_strnicmp" != xyes; then :
17163 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17164 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17165 as_fn_error 1 "Missing functions: strncasecmp, strcasecmp and strnicmp
17166 See \`config.log' for more details" "$LINENO" 5; }
17167
17168 fi
17169
17170 if test "x$ac_cv_func_strstr" != xyes; then :
17171 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17172 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17173 as_fn_error 1 "Missing function: strstr
17174 See \`config.log' for more details" "$LINENO" 5; }
17175
17176 fi
17177
17178 if test "x$ac_cv_func_strstr" != xyes; then :
17179 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17180 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17181 as_fn_error 1 "Missing function: vsnprintf
17182 See \`config.log' for more details" "$LINENO" 5; }
17183
17184 fi
17185
17186 if test "x$ac_cv_enable_wide_character_type" != xno; then :
17187 for ac_func in swprintf towlower wcscasecmp wcschr wcslen wcsncasecmp wcsncmp wcsncpy wcsnicmp wcsrchr wcsstr wmemchr wmemcmp wmemcpy wmemrchr
17188 do :
17189 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17190 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17191 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17192 cat >>confdefs.h <<_ACEOF
17193 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17194 _ACEOF
17195
17196 fi
17197 done
17198
17199
17200 if test "x$ac_cv_func_swprintf" != xyes; then :
17201 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17202 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17203 as_fn_error 1 "Missing function: swprintf
17204 See \`config.log' for more details" "$LINENO" 5; }
17205
17206 fi
17207
17208 if test "x$ac_cv_func_wmemchr" != xyes && test "x$ac_cv_func_wcschr" != xyes; then :
17209 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17210 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17211 as_fn_error 1 "Missing functions: wmemchr and wcschr
17212 See \`config.log' for more details" "$LINENO" 5; }
17213
17214 fi
17215
17216 if test "x$ac_cv_func_wmemcmp" != xyes && test "x$ac_cv_func_wcsncmp" != xyes; then :
17217 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17218 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17219 as_fn_error 1 "Missing functions: wmemcmp and wcsncmp
17220 See \`config.log' for more details" "$LINENO" 5; }
17221
17222 fi
17223
17224 if test "x$ac_cv_func_wmemcpy" != xyes && test "x$ac_cv_func_wcsncpy" != xyes; then :
17225 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17226 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17227 as_fn_error 1 "Missing functions: wmemcpy and wcsncpy
17228 See \`config.log' for more details" "$LINENO" 5; }
17229
17230 fi
17231
17232 if test "x$ac_cv_func_wmemrchr" != xyes && test "x$ac_cv_func_wcsrchr" != xyes; then :
17233 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17234 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17235 as_fn_error 1 "Missing functions: wmemrchr and wcsrchr
17236 See \`config.log' for more details" "$LINENO" 5; }
17237
17238 fi
17239
17240 if test "x$ac_cv_func_wcslen" != xyes; then :
17241 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17242 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17243 as_fn_error 1 "Missing function: wcslen
17244 See \`config.log' for more details" "$LINENO" 5; }
17245
17246 fi
17247
17248 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 :
17249 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17250 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17251 as_fn_error 1 "Missing functions: wcsncasecmp, wcscasecmp, wcsnicmp and towlower
17252 See \`config.log' for more details" "$LINENO" 5; }
17253
17254 fi
17255
17256 if test "x$ac_cv_func_wcsstr" != xyes; then :
17257 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17258 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17259 as_fn_error 1 "Missing function: wcsstr
17260 See \`config.log' for more details" "$LINENO" 5; }
17261
17262 fi
17263
17264 fi
17265
17266
17267 if test "x$ac_cv_libcstring" != xyes; then :
17268 ac_cv_libcstring_CPPFLAGS="-I../libcstring";
17269 ac_cv_libcstring_LIBADD="../libcstring/libcstring.la";
17270
17271 ac_cv_libcstring=local
17272
17273
17274 $as_echo "#define HAVE_LOCAL_LIBCSTRING 1" >>confdefs.h
17275
17276 HAVE_LOCAL_LIBCSTRING=1
17277
17278
17279 fi
17280
17281 if test "x$ac_cv_libcstring" = xlocal; then
17282 HAVE_LOCAL_LIBCSTRING_TRUE=
17283 HAVE_LOCAL_LIBCSTRING_FALSE='#'
17284 else
17285 HAVE_LOCAL_LIBCSTRING_TRUE='#'
17286 HAVE_LOCAL_LIBCSTRING_FALSE=
17287 fi
17288
17289 if test "x$ac_cv_libcstring_CPPFLAGS" != "x"; then :
17290 LIBCSTRING_CPPFLAGS=$ac_cv_libcstring_CPPFLAGS
17291
17292
17293 fi
17294 if test "x$ac_cv_libcstring_LIBADD" != "x"; then :
17295 LIBCSTRING_LIBADD=$ac_cv_libcstring_LIBADD
17296
17297
17298 fi
17299
17300 if test "x$ac_cv_libcstring" = xyes; then :
17301 ax_libcstring_pc_libs_private=-lcstring
17302
17303
17304 fi
17305
17306 if test "x$ac_cv_libcstring" = xyes; then :
17307 ax_libcstring_spec_requires=libcstring
17308
17309 ax_libcstring_spec_build_requires=libcstring-devel
17310
17311
17312 fi
17313
17314
1731517484
1731617485 # Check whether --with-libcerror was given.
1731717486 if test "${with_libcerror+set}" = set; then :
1731917488 else
1732017489 ac_cv_with_libcerror=auto-detect
1732117490 fi
17322 { $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
17491
17492 { $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
1732317493 $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; }
1732417494 if ${ac_cv_with_libcerror+:} false; then :
1732517495 $as_echo_n "(cached) " >&6
1805718227 fi
1805818228
1805918229
18060 # Check whether --enable-multi-threading-support was given.
18230
18231 # Check whether --enable-multi-threading-support was given.
1806118232 if test "${enable_multi_threading_support+set}" = set; then :
1806218233 enableval=$enable_multi_threading_support; ac_cv_enable_multi_threading_support=$enableval
1806318234 else
1806418235 ac_cv_enable_multi_threading_support=yes
1806518236 fi
18066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable multi-threading support" >&5
18237
18238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable multi-threading support" >&5
1806718239 $as_echo_n "checking whether to enable enable multi-threading support... " >&6; }
1806818240 if ${ac_cv_enable_multi_threading_support+:} false; then :
1806918241 $as_echo_n "(cached) " >&6
1807218244 fi
1807318245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_multi_threading_support" >&5
1807418246 $as_echo "$ac_cv_enable_multi_threading_support" >&6; }
18247
1807518248
1807618249 # Check whether --with-libcthreads was given.
1807718250 if test "${with_libcthreads+set}" = set; then :
1807918252 else
1808018253 ac_cv_with_libcthreads=auto-detect
1808118254 fi
18082 { $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
18255
18256 { $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
1808318257 $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; }
1808418258 if ${ac_cv_with_libcthreads+:} false; then :
1808518259 $as_echo_n "(cached) " >&6
1976019934 if test "x$ac_cv_libcthreads" != xyes; then :
1976119935 if test "x$ac_cv_enable_winapi" = xno; then :
1976219936
19937
1976319938 # Check whether --with-pthread was given.
1976419939 if test "${with_pthread+set}" = set; then :
1976519940 withval=$with_pthread; ac_cv_with_pthread=$withval
1976619941 else
1976719942 ac_cv_with_pthread=auto-detect
1976819943 fi
19769 { $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
19944
19945 { $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
1977019946 $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; }
1977119947 if ${ac_cv_with_pthread+:} false; then :
1977219948 $as_echo_n "(cached) " >&6
2068120857
2068220858
2068320859
20860
2068420861 # Check whether --with-libcdata was given.
2068520862 if test "${with_libcdata+set}" = set; then :
2068620863 withval=$with_libcdata; ac_cv_with_libcdata=$withval
2068720864 else
2068820865 ac_cv_with_libcdata=auto-detect
2068920866 fi
20690 { $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
20867
20868 { $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
2069120869 $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; }
2069220870 if ${ac_cv_with_libcdata+:} false; then :
2069320871 $as_echo_n "(cached) " >&6
2408124259
2408224260
2408324261
24262
2408424263 # Check whether --with-libclocale was given.
2408524264 if test "${with_libclocale+set}" = set; then :
2408624265 withval=$with_libclocale; ac_cv_with_libclocale=$withval
2408724266 else
2408824267 ac_cv_with_libclocale=auto-detect
2408924268 fi
24090 { $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
24269
24270 { $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
2409124271 $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; }
2409224272 if ${ac_cv_with_libclocale+:} false; then :
2409324273 $as_echo_n "(cached) " >&6
2481024990
2481124991
2481224992
24993
2481324994 # Check whether --with-libcnotify was given.
2481424995 if test "${with_libcnotify+set}" = set; then :
2481524996 withval=$with_libcnotify; ac_cv_with_libcnotify=$withval
2481624997 else
2481724998 ac_cv_with_libcnotify=auto-detect
2481824999 fi
24819 { $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
25000
25001 { $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
2482025002 $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; }
2482125003 if ${ac_cv_with_libcnotify+:} false; then :
2482225004 $as_echo_n "(cached) " >&6
2538825570
2538925571
2539025572
25573
2539125574 # Check whether --with-libcsplit was given.
2539225575 if test "${with_libcsplit+set}" = set; then :
2539325576 withval=$with_libcsplit; ac_cv_with_libcsplit=$withval
2539425577 else
2539525578 ac_cv_with_libcsplit=auto-detect
2539625579 fi
25397 { $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
25580
25581 { $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
2539825582 $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; }
2539925583 if ${ac_cv_with_libcsplit+:} false; then :
2540025584 $as_echo_n "(cached) " >&6
2614426328
2614526329
2614626330
26331
2614726332 # Check whether --with-libuna was given.
2614826333 if test "${with_libuna+set}" = set; then :
2614926334 withval=$with_libuna; ac_cv_with_libuna=$withval
2615026335 else
2615126336 ac_cv_with_libuna=auto-detect
2615226337 fi
26153 { $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
26338
26339 { $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
2615426340 $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; }
2615526341 if ${ac_cv_with_libuna+:} false; then :
2615626342 $as_echo_n "(cached) " >&6
3101931205
3102031206
3102131207
31208
3102231209 # Check whether --with-libcfile was given.
3102331210 if test "${with_libcfile+set}" = set; then :
3102431211 withval=$with_libcfile; ac_cv_with_libcfile=$withval
3102531212 else
3102631213 ac_cv_with_libcfile=auto-detect
3102731214 fi
31028 { $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
31215
31216 { $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
3102931217 $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; }
3103031218 if ${ac_cv_with_libcfile+:} false; then :
3103131219 $as_echo_n "(cached) " >&6
3244732635
3244832636
3244932637
32638
3245032639 # Check whether --with-libcpath was given.
3245132640 if test "${with_libcpath+set}" = set; then :
3245232641 withval=$with_libcpath; ac_cv_with_libcpath=$withval
3245332642 else
3245432643 ac_cv_with_libcpath=auto-detect
3245532644 fi
32456 { $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
32645
32646 { $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
3245732647 $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; }
3245832648 if ${ac_cv_with_libcpath+:} false; then :
3245932649 $as_echo_n "(cached) " >&6
3343933629
3344033630
3344133631
33632
3344233633 # Check whether --with-libbfio was given.
3344333634 if test "${with_libbfio+set}" = set; then :
3344433635 withval=$with_libbfio; ac_cv_with_libbfio=$withval
3344533636 else
3344633637 ac_cv_with_libbfio=auto-detect
3344733638 fi
33448 { $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
33639
33640 { $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
3344933641 $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; }
3345033642 if ${ac_cv_with_libbfio+:} false; then :
3345133643 $as_echo_n "(cached) " >&6
3533235524
3533335525
3533435526
35527
3533535528 # Check whether --with-libfcache was given.
3533635529 if test "${with_libfcache+set}" = set; then :
3533735530 withval=$with_libfcache; ac_cv_with_libfcache=$withval
3533835531 else
3533935532 ac_cv_with_libfcache=auto-detect
3534035533 fi
35341 { $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
35534
35535 { $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
3534235536 $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; }
3534335537 if ${ac_cv_with_libfcache+:} false; then :
3534435538 $as_echo_n "(cached) " >&6
3625936453
3626036454
3626136455
36456
3626236457 # Check whether --with-libfdata was given.
3626336458 if test "${with_libfdata+set}" = set; then :
3626436459 withval=$with_libfdata; ac_cv_with_libfdata=$withval
3626536460 else
3626636461 ac_cv_with_libfdata=auto-detect
3626736462 fi
36268 { $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
36463
36464 { $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
3626936465 $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; }
3627036466 if ${ac_cv_with_libfdata+:} false; then :
3627136467 $as_echo_n "(cached) " >&6
3900239198
3900339199
3900439200
39201
3900539202 # Check whether --with-libfdatetime was given.
3900639203 if test "${with_libfdatetime+set}" = set; then :
3900739204 withval=$with_libfdatetime; ac_cv_with_libfdatetime=$withval
3900839205 else
3900939206 ac_cv_with_libfdatetime=auto-detect
3901039207 fi
39011 { $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
39208
39209 { $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
3901239210 $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; }
3901339211 if ${ac_cv_with_libfdatetime+:} false; then :
3901439212 $as_echo_n "(cached) " >&6
4253042728
4253142729
4253242730
42731
4253342732 # Check whether --with-libfguid was given.
4253442733 if test "${with_libfguid+set}" = set; then :
4253542734 withval=$with_libfguid; ac_cv_with_libfguid=$withval
4253642735 else
4253742736 ac_cv_with_libfguid=auto-detect
4253842737 fi
42539 { $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
42738
42739 { $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
4254042740 $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; }
4254142741 if ${ac_cv_with_libfguid+:} false; then :
4254242742 $as_echo_n "(cached) " >&6
4319643396
4319743397
4319843398
43399
4319943400 # Check whether --with-libfvalue was given.
4320043401 if test "${with_libfvalue+set}" = set; then :
4320143402 withval=$with_libfvalue; ac_cv_with_libfvalue=$withval
4320243403 else
4320343404 ac_cv_with_libfvalue=auto-detect
4320443405 fi
43205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfvalue in includedir and libdir or in the specified DIR, or no if to use local version" >&5
43406
43407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfvalue in includedir and libdir or in the specified DIR, or no if to use local version" >&5
4320643408 $as_echo_n "checking whether to use search for libfvalue in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; }
4320743409 if ${ac_cv_with_libfvalue+:} false; then :
4320843410 $as_echo_n "(cached) " >&6
4759347795 fi
4759447796
4759547797
47596 for ac_func in bindtextdomain
47798 for ac_func in bindtextdomain
4759747799 do :
4759847800 ac_fn_c_check_func "$LINENO" "bindtextdomain" "ac_cv_func_bindtextdomain"
4759947801 if test "x$ac_cv_func_bindtextdomain" = xyes; then :
4760747809
4760847810
4760947811
47812 # Check whether --enable-verbose-output was given.
47813 if test "${enable_verbose_output+set}" = set; then :
47814 enableval=$enable_verbose_output; ac_cv_enable_verbose_output=$enableval
47815 else
47816 ac_cv_enable_verbose_output=no
47817 fi
47818
47819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable verbose output" >&5
47820 $as_echo_n "checking whether to enable enable verbose output... " >&6; }
47821 if ${ac_cv_enable_verbose_output+:} false; then :
47822 $as_echo_n "(cached) " >&6
47823 else
47824 ac_cv_enable_verbose_output=no
47825 fi
47826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_verbose_output" >&5
47827 $as_echo "$ac_cv_enable_verbose_output" >&6; }
47828
47829 if test "x$ac_cv_enable_verbose_output" != xno ; then :
47830
47831 $as_echo "#define HAVE_VERBOSE_OUTPUT 1" >>confdefs.h
47832
47833
47834 ac_cv_enable_verbose_output=yes
47835 fi
47836
47837
47838
47839
47840 # Check whether --enable-debug-output was given.
47841 if test "${enable_debug_output+set}" = set; then :
47842 enableval=$enable_debug_output; ac_cv_enable_debug_output=$enableval
47843 else
47844 ac_cv_enable_debug_output=no
47845 fi
47846
47847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable debug output" >&5
47848 $as_echo_n "checking whether to enable enable debug output... " >&6; }
47849 if ${ac_cv_enable_debug_output+:} false; then :
47850 $as_echo_n "(cached) " >&6
47851 else
47852 ac_cv_enable_debug_output=no
47853 fi
47854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_debug_output" >&5
47855 $as_echo "$ac_cv_enable_debug_output" >&6; }
47856
47857 if test "x$ac_cv_enable_debug_output" != xno ; then :
47858
47859 $as_echo "#define HAVE_DEBUG_OUTPUT 1" >>confdefs.h
47860
47861
47862 ac_cv_enable_debug_output=yes
47863 fi
47864
47865
47866 if test "x$enable_shared" = xyes; then :
47867 case $host in #(
47868 *cygwin* | *mingw*) :
47869
47870 $as_echo "#define HAVE_DLLMAIN 1" >>confdefs.h
47871
47872 HAVE_DLLMAIN=1
47873
47874 ;; #(
47875 *) :
47876 ;;
47877 esac
47878
47879 fi
47880
47881
47882
47883
4761047884 # Check whether --with-libfwnt was given.
4761147885 if test "${with_libfwnt+set}" = set; then :
4761247886 withval=$with_libfwnt; ac_cv_with_libfwnt=$withval
4761347887 else
4761447888 ac_cv_with_libfwnt=auto-detect
4761547889 fi
47616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfwnt in includedir and libdir or in the specified DIR, or no if to use local version" >&5
47890
47891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfwnt in includedir and libdir or in the specified DIR, or no if to use local version" >&5
4761747892 $as_echo_n "checking whether to use search for libfwnt in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; }
4761847893 if ${ac_cv_with_libfwnt+:} false; then :
4761947894 $as_echo_n "(cached) " >&6
4764847923 pkg_cv_libfwnt_CFLAGS="$libfwnt_CFLAGS"
4764947924 elif test -n "$PKG_CONFIG"; then
4765047925 if test -n "$PKG_CONFIG" && \
47651 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfwnt >= 20160417\""; } >&5
47652 ($PKG_CONFIG --exists --print-errors "libfwnt >= 20160417") 2>&5
47926 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfwnt >= 20161103\""; } >&5
47927 ($PKG_CONFIG --exists --print-errors "libfwnt >= 20161103") 2>&5
4765347928 ac_status=$?
4765447929 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4765547930 test $ac_status = 0; }; then
47656 pkg_cv_libfwnt_CFLAGS=`$PKG_CONFIG --cflags "libfwnt >= 20160417" 2>/dev/null`
47931 pkg_cv_libfwnt_CFLAGS=`$PKG_CONFIG --cflags "libfwnt >= 20161103" 2>/dev/null`
4765747932 test "x$?" != "x0" && pkg_failed=yes
4765847933 else
4765947934 pkg_failed=yes
4766547940 pkg_cv_libfwnt_LIBS="$libfwnt_LIBS"
4766647941 elif test -n "$PKG_CONFIG"; then
4766747942 if test -n "$PKG_CONFIG" && \
47668 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfwnt >= 20160417\""; } >&5
47669 ($PKG_CONFIG --exists --print-errors "libfwnt >= 20160417") 2>&5
47943 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libfwnt >= 20161103\""; } >&5
47944 ($PKG_CONFIG --exists --print-errors "libfwnt >= 20161103") 2>&5
4767047945 ac_status=$?
4767147946 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4767247947 test $ac_status = 0; }; then
47673 pkg_cv_libfwnt_LIBS=`$PKG_CONFIG --libs "libfwnt >= 20160417" 2>/dev/null`
47948 pkg_cv_libfwnt_LIBS=`$PKG_CONFIG --libs "libfwnt >= 20161103" 2>/dev/null`
4767447949 test "x$?" != "x0" && pkg_failed=yes
4767547950 else
4767647951 pkg_failed=yes
4769147966 _pkg_short_errors_supported=no
4769247967 fi
4769347968 if test $_pkg_short_errors_supported = yes; then
47694 libfwnt_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfwnt >= 20160417" 2>&1`
47969 libfwnt_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libfwnt >= 20161103" 2>&1`
4769547970 else
47696 libfwnt_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfwnt >= 20160417" 2>&1`
47971 libfwnt_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libfwnt >= 20161103" 2>&1`
4769747972 fi
4769847973 # Put the nasty error message in config.log where it belongs
4769947974 echo "$libfwnt_PKG_ERRORS" >&5
4896349238 ac_cv_libfwnt=no
4896449239 fi
4896549240
48966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libfwnt_lzxpress_huffman_stream_decompress in -lfwnt" >&5
48967 $as_echo_n "checking for libfwnt_lzxpress_huffman_stream_decompress in -lfwnt... " >&6; }
48968 if ${ac_cv_lib_fwnt_libfwnt_lzxpress_huffman_stream_decompress+:} false; then :
48969 $as_echo_n "(cached) " >&6
48970 else
48971 ac_check_lib_save_LIBS=$LIBS
48972 LIBS="-lfwnt $LIBS"
48973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48974 /* end confdefs.h. */
48975
48976 /* Override any GCC internal prototype to avoid an error.
48977 Use char because int might match the return type of a GCC
48978 builtin and then its argument prototype would still apply. */
48979 #ifdef __cplusplus
48980 extern "C"
48981 #endif
48982 char libfwnt_lzxpress_huffman_stream_decompress ();
48983 int
48984 main ()
48985 {
48986 return libfwnt_lzxpress_huffman_stream_decompress ();
48987 ;
48988 return 0;
48989 }
48990 _ACEOF
48991 if ac_fn_c_try_link "$LINENO"; then :
48992 ac_cv_lib_fwnt_libfwnt_lzxpress_huffman_stream_decompress=yes
48993 else
48994 ac_cv_lib_fwnt_libfwnt_lzxpress_huffman_stream_decompress=no
48995 fi
48996 rm -f core conftest.err conftest.$ac_objext \
48997 conftest$ac_exeext conftest.$ac_ext
48998 LIBS=$ac_check_lib_save_LIBS
48999 fi
49000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fwnt_libfwnt_lzxpress_huffman_stream_decompress" >&5
49001 $as_echo "$ac_cv_lib_fwnt_libfwnt_lzxpress_huffman_stream_decompress" >&6; }
49002 if test "x$ac_cv_lib_fwnt_libfwnt_lzxpress_huffman_stream_decompress" = xyes; then :
49003 ac_cv_libfwnt_dummy=yes
49004 else
49005 ac_cv_libfwnt=no
49006 fi
49007
4900849241
4900949242 ac_cv_libfwnt_LIBADD="-lfwnt"
4901049243
4908049313
4908149314
4908249315
49316
4908349317 # Check whether --with-libfmapi was given.
4908449318 if test "${with_libfmapi+set}" = set; then :
4908549319 withval=$with_libfmapi; ac_cv_with_libfmapi=$withval
4908649320 else
4908749321 ac_cv_with_libfmapi=auto-detect
4908849322 fi
49089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfmapi in includedir and libdir or in the specified DIR, or no if to use local version" >&5
49323
49324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libfmapi in includedir and libdir or in the specified DIR, or no if to use local version" >&5
4909049325 $as_echo_n "checking whether to use search for libfmapi in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; }
4909149326 if ${ac_cv_with_libfmapi+:} false; then :
4909249327 $as_echo_n "(cached) " >&6
4932449559
4932549560
4932649561
49562
4932749563 # Check whether --with-libmapidb was given.
4932849564 if test "${with_libmapidb+set}" = set; then :
4932949565 withval=$with_libmapidb; ac_cv_with_libmapidb=$withval
4933049566 else
4933149567 ac_cv_with_libmapidb=auto-detect
4933249568 fi
49333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libmapidb in includedir and libdir or in the specified DIR, or no if to use local version" >&5
49569
49570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libmapidb in includedir and libdir or in the specified DIR, or no if to use local version" >&5
4933449571 $as_echo_n "checking whether to use search for libmapidb in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; }
4933549572 if ${ac_cv_with_libmapidb+:} false; then :
4933649573 $as_echo_n "(cached) " >&6
4957249809 fi
4957349810
4957449811
49575
49576 # Check whether --with-libcsystem was given.
49577 if test "${with_libcsystem+set}" = set; then :
49578 withval=$with_libcsystem; ac_cv_with_libcsystem=$withval
49579 else
49580 ac_cv_with_libcsystem=auto-detect
49581 fi
49582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use search for libcsystem in includedir and libdir or in the specified DIR, or no if to use local version" >&5
49583 $as_echo_n "checking whether to use search for libcsystem in includedir and libdir or in the specified DIR, or no if to use local version... " >&6; }
49584 if ${ac_cv_with_libcsystem+:} false; then :
49585 $as_echo_n "(cached) " >&6
49586 else
49587 ac_cv_with_libcsystem=auto-detect
49588 fi
49589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_libcsystem" >&5
49590 $as_echo "$ac_cv_with_libcsystem" >&6; }
49591
49592 if test "x$ac_cv_with_libcsystem" != x && test "x$ac_cv_with_libcsystem" != xno && test "x$ac_cv_with_libcsystem" != xauto-detect; then :
49593 if test -d "$ac_cv_with_libcsystem"; then :
49594 CFLAGS="$CFLAGS -I${ac_cv_with_libcsystem}/include"
49595 LDFLAGS="$LDFLAGS -L${ac_cv_with_libcsystem}/lib"
49596 else
49597 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no such directory: $ac_cv_with_libcsystem" >&5
49598 $as_echo "$as_me: WARNING: no such directory: $ac_cv_with_libcsystem" >&2;}
49599
49600 fi
49601
49602 fi
49603
49604 if test "x$ac_cv_with_libcsystem" = xno; then :
49605 ac_cv_libcsystem=no
49606 else
49607 if test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"; then :
49608
49609 pkg_failed=no
49610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsystem" >&5
49611 $as_echo_n "checking for libcsystem... " >&6; }
49612
49613 if test -n "$libcsystem_CFLAGS"; then
49614 pkg_cv_libcsystem_CFLAGS="$libcsystem_CFLAGS"
49615 elif test -n "$PKG_CONFIG"; then
49616 if test -n "$PKG_CONFIG" && \
49617 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcsystem >= 20150629\""; } >&5
49618 ($PKG_CONFIG --exists --print-errors "libcsystem >= 20150629") 2>&5
49619 ac_status=$?
49620 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49621 test $ac_status = 0; }; then
49622 pkg_cv_libcsystem_CFLAGS=`$PKG_CONFIG --cflags "libcsystem >= 20150629" 2>/dev/null`
49623 test "x$?" != "x0" && pkg_failed=yes
49624 else
49625 pkg_failed=yes
49626 fi
49627 else
49628 pkg_failed=untried
49629 fi
49630 if test -n "$libcsystem_LIBS"; then
49631 pkg_cv_libcsystem_LIBS="$libcsystem_LIBS"
49632 elif test -n "$PKG_CONFIG"; then
49633 if test -n "$PKG_CONFIG" && \
49634 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcsystem >= 20150629\""; } >&5
49635 ($PKG_CONFIG --exists --print-errors "libcsystem >= 20150629") 2>&5
49636 ac_status=$?
49637 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49638 test $ac_status = 0; }; then
49639 pkg_cv_libcsystem_LIBS=`$PKG_CONFIG --libs "libcsystem >= 20150629" 2>/dev/null`
49640 test "x$?" != "x0" && pkg_failed=yes
49641 else
49642 pkg_failed=yes
49643 fi
49644 else
49645 pkg_failed=untried
49646 fi
49647
49648
49649
49650 if test $pkg_failed = yes; then
49651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49652 $as_echo "no" >&6; }
49653
49654 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49655 _pkg_short_errors_supported=yes
49656 else
49657 _pkg_short_errors_supported=no
49658 fi
49659 if test $_pkg_short_errors_supported = yes; then
49660 libcsystem_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcsystem >= 20150629" 2>&1`
49661 else
49662 libcsystem_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcsystem >= 20150629" 2>&1`
49663 fi
49664 # Put the nasty error message in config.log where it belongs
49665 echo "$libcsystem_PKG_ERRORS" >&5
49666
49667 ac_cv_libcsystem=no
49668 elif test $pkg_failed = untried; then
49669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49670 $as_echo "no" >&6; }
49671 ac_cv_libcsystem=no
49672 else
49673 libcsystem_CFLAGS=$pkg_cv_libcsystem_CFLAGS
49674 libcsystem_LIBS=$pkg_cv_libcsystem_LIBS
49675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49676 $as_echo "yes" >&6; }
49677 ac_cv_libcsystem=yes
49678 fi
49679
49680 fi
49681
49682 if test "x$ac_cv_libcsystem" = xyes; then :
49683 ac_cv_libcsystem_CPPFLAGS="$pkg_cv_libcsystem_CFLAGS"
49684 ac_cv_libcsystem_LIBADD="$pkg_cv_libcsystem_LIBS"
49685 else
49686 for ac_header in libcsystem.h
49687 do :
49688 ac_fn_c_check_header_mongrel "$LINENO" "libcsystem.h" "ac_cv_header_libcsystem_h" "$ac_includes_default"
49689 if test "x$ac_cv_header_libcsystem_h" = xyes; then :
49690 cat >>confdefs.h <<_ACEOF
49691 #define HAVE_LIBCSYSTEM_H 1
49692 _ACEOF
49693
49694 fi
49695
49696 done
49697
49698
49699 if test "x$ac_cv_header_libcsystem_h" = xno; then :
49700 ac_cv_libcsystem=no
49701 else
49702 ac_cv_libcsystem=yes
49703
49704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsystem_initialize in -lcsystem" >&5
49705 $as_echo_n "checking for libcsystem_initialize in -lcsystem... " >&6; }
49706 if ${ac_cv_lib_csystem_libcsystem_initialize+:} false; then :
49707 $as_echo_n "(cached) " >&6
49708 else
49709 ac_check_lib_save_LIBS=$LIBS
49710 LIBS="-lcsystem $LIBS"
49711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49712 /* end confdefs.h. */
49713
49714 /* Override any GCC internal prototype to avoid an error.
49715 Use char because int might match the return type of a GCC
49716 builtin and then its argument prototype would still apply. */
49717 #ifdef __cplusplus
49718 extern "C"
49719 #endif
49720 char libcsystem_initialize ();
49721 int
49722 main ()
49723 {
49724 return libcsystem_initialize ();
49725 ;
49726 return 0;
49727 }
49728 _ACEOF
49729 if ac_fn_c_try_link "$LINENO"; then :
49730 ac_cv_lib_csystem_libcsystem_initialize=yes
49731 else
49732 ac_cv_lib_csystem_libcsystem_initialize=no
49733 fi
49734 rm -f core conftest.err conftest.$ac_objext \
49735 conftest$ac_exeext conftest.$ac_ext
49736 LIBS=$ac_check_lib_save_LIBS
49737 fi
49738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csystem_libcsystem_initialize" >&5
49739 $as_echo "$ac_cv_lib_csystem_libcsystem_initialize" >&6; }
49740 if test "x$ac_cv_lib_csystem_libcsystem_initialize" = xyes; then :
49741 ac_cv_libcsystem_dummy=yes
49742 else
49743 ac_cv_libcsystem=no
49744 fi
49745
49746
49747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsystem_signal_attach in -lcsystem" >&5
49748 $as_echo_n "checking for libcsystem_signal_attach in -lcsystem... " >&6; }
49749 if ${ac_cv_lib_csystem_libcsystem_signal_attach+:} false; then :
49750 $as_echo_n "(cached) " >&6
49751 else
49752 ac_check_lib_save_LIBS=$LIBS
49753 LIBS="-lcsystem $LIBS"
49754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49755 /* end confdefs.h. */
49756
49757 /* Override any GCC internal prototype to avoid an error.
49758 Use char because int might match the return type of a GCC
49759 builtin and then its argument prototype would still apply. */
49760 #ifdef __cplusplus
49761 extern "C"
49762 #endif
49763 char libcsystem_signal_attach ();
49764 int
49765 main ()
49766 {
49767 return libcsystem_signal_attach ();
49768 ;
49769 return 0;
49770 }
49771 _ACEOF
49772 if ac_fn_c_try_link "$LINENO"; then :
49773 ac_cv_lib_csystem_libcsystem_signal_attach=yes
49774 else
49775 ac_cv_lib_csystem_libcsystem_signal_attach=no
49776 fi
49777 rm -f core conftest.err conftest.$ac_objext \
49778 conftest$ac_exeext conftest.$ac_ext
49779 LIBS=$ac_check_lib_save_LIBS
49780 fi
49781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csystem_libcsystem_signal_attach" >&5
49782 $as_echo "$ac_cv_lib_csystem_libcsystem_signal_attach" >&6; }
49783 if test "x$ac_cv_lib_csystem_libcsystem_signal_attach" = xyes; then :
49784 ac_cv_libcsystem_dummy=yes
49785 else
49786 ac_cv_libcsystem=no
49787 fi
49788
49789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcsystem_signal_detach in -lcsystem" >&5
49790 $as_echo_n "checking for libcsystem_signal_detach in -lcsystem... " >&6; }
49791 if ${ac_cv_lib_csystem_libcsystem_signal_detach+:} false; then :
49792 $as_echo_n "(cached) " >&6
49793 else
49794 ac_check_lib_save_LIBS=$LIBS
49795 LIBS="-lcsystem $LIBS"
49796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49797 /* end confdefs.h. */
49798
49799 /* Override any GCC internal prototype to avoid an error.
49800 Use char because int might match the return type of a GCC
49801 builtin and then its argument prototype would still apply. */
49802 #ifdef __cplusplus
49803 extern "C"
49804 #endif
49805 char libcsystem_signal_detach ();
49806 int
49807 main ()
49808 {
49809 return libcsystem_signal_detach ();
49810 ;
49811 return 0;
49812 }
49813 _ACEOF
49814 if ac_fn_c_try_link "$LINENO"; then :
49815 ac_cv_lib_csystem_libcsystem_signal_detach=yes
49816 else
49817 ac_cv_lib_csystem_libcsystem_signal_detach=no
49818 fi
49819 rm -f core conftest.err conftest.$ac_objext \
49820 conftest$ac_exeext conftest.$ac_ext
49821 LIBS=$ac_check_lib_save_LIBS
49822 fi
49823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_csystem_libcsystem_signal_detach" >&5
49824 $as_echo "$ac_cv_lib_csystem_libcsystem_signal_detach" >&6; }
49825 if test "x$ac_cv_lib_csystem_libcsystem_signal_detach" = xyes; then :
49826 ac_cv_libcsystem_dummy=yes
49827 else
49828 ac_cv_libcsystem=no
49829 fi
49830
49831
49832 ac_cv_libcsystem_LIBADD="-lcsystem"
49833
49834 fi
49835
49836 fi
49837
49838 fi
49839
49840 if test "x$ac_cv_libcsystem" = xyes; then :
49841
49842 $as_echo "#define HAVE_LIBCSYSTEM 1" >>confdefs.h
49843
49844
49845 fi
49846
49847 if test "x$ac_cv_libcsystem" = xyes; then :
49848 HAVE_LIBCSYSTEM=1
49849
49850 else
49851 HAVE_LIBCSYSTEM=0
49852
49853
49854 fi
49855
49856
49857 for ac_header in errno.h
49858 do :
49859 ac_fn_c_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
49860 if test "x$ac_cv_header_errno_h" = xyes; then :
49861 cat >>confdefs.h <<_ACEOF
49862 #define HAVE_ERRNO_H 1
49863 _ACEOF
49864
49865 fi
49866
49867 done
49868
49869
49870 for ac_header in fcntl.h unistd.h sys/stat.h
49812 for ac_header in signal.h sys/signal.h unistd.h
4987149813 do :
4987249814 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4987349815 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
4988149823 done
4988249824
4988349825
49884 for ac_header in glob.h
49885 do :
49886 ac_fn_c_check_header_mongrel "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default"
49887 if test "x$ac_cv_header_glob_h" = xyes; then :
49888 cat >>confdefs.h <<_ACEOF
49889 #define HAVE_GLOB_H 1
49890 _ACEOF
49891
49892 fi
49893
49894 done
49895
49896
49897 if test "x$ac_cv_header_glob_h" = xno; then :
49898 for ac_header in io.h
49899 do :
49900 ac_fn_c_check_header_mongrel "$LINENO" "io.h" "ac_cv_header_io_h" "$ac_includes_default"
49901 if test "x$ac_cv_header_io_h" = xyes; then :
49902 cat >>confdefs.h <<_ACEOF
49903 #define HAVE_IO_H 1
49904 _ACEOF
49905
49906 fi
49907
49908 done
49909
49910
49911 fi
49912
49913 for ac_header in signal.h sys/signal.h
49914 do :
49915 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49916 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
49917 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49918 cat >>confdefs.h <<_ACEOF
49919 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49920 _ACEOF
49921
49922 fi
49923
49924 done
49925
49926
49927 for ac_func in close fstat ftruncate lseek open read stat write
49826 for ac_func in close getopt setvbuf
4992849827 do :
4992949828 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
4993049829 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
4993749836 done
4993849837
4993949838
49940 if test "x$ac_cv_func_close" != xyes; then :
49839 if test "x$ac_cv_func_close" != xyes; then :
4994149840 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4994249841 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4994349842 as_fn_error 1 "Missing function: close
4994549844
4994649845 fi
4994749846
49948 if test "x$ac_cv_func_fstat" != xyes; then :
49949 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49950 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49951 as_fn_error 1 "Missing function: fstat
49952 See \`config.log' for more details" "$LINENO" 5; }
49953
49954 fi
49955
49956 if test "x$ac_cv_func_ftruncate" != xyes; then :
49957 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49958 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49959 as_fn_error 1 "Missing function: ftruncate
49960 See \`config.log' for more details" "$LINENO" 5; }
49961
49962 fi
49963
49964 if test "x$ac_cv_func_lseek" != xyes; then :
49965 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49966 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49967 as_fn_error 1 "Missing function: lseek
49968 See \`config.log' for more details" "$LINENO" 5; }
49969
49970 fi
49971
49972 if test "x$ac_cv_func_open" != xyes; then :
49973 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49974 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49975 as_fn_error 1 "Missing function: open
49976 See \`config.log' for more details" "$LINENO" 5; }
49977
49978 fi
49979
49980 if test "x$ac_cv_func_read" != xyes; then :
49981 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49982 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49983 as_fn_error 1 "Missing function: read
49984 See \`config.log' for more details" "$LINENO" 5; }
49985
49986 fi
49987
49988 if test "x$ac_cv_func_stat" != xyes; then :
49989 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49990 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49991 as_fn_error 1 "Missing function: stat
49992 See \`config.log' for more details" "$LINENO" 5; }
49993
49994 fi
49995
49996 if test "x$ac_cv_func_write" != xyes; then :
49997 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49998 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49999 as_fn_error 1 "Missing function: write
50000 See \`config.log' for more details" "$LINENO" 5; }
50001
50002 fi
50003
50004 for ac_func in getopt
50005 do :
50006 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
50007 if test "x$ac_cv_func_getopt" = xyes; then :
50008 cat >>confdefs.h <<_ACEOF
50009 #define HAVE_GETOPT 1
50010 _ACEOF
50011
50012 fi
50013 done
50014
50015
50016 for ac_func in setvbuf
50017 do :
50018 ac_fn_c_check_func "$LINENO" "setvbuf" "ac_cv_func_setvbuf"
50019 if test "x$ac_cv_func_setvbuf" = xyes; then :
50020 cat >>confdefs.h <<_ACEOF
50021 #define HAVE_SETVBUF 1
50022 _ACEOF
50023
50024 fi
50025 done
50026
50027
50028 for ac_func in bindtextdomain textdomain
50029 do :
50030 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
50031 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
50032 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
50033 cat >>confdefs.h <<_ACEOF
50034 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
50035 _ACEOF
50036
50037 fi
50038 done
50039
50040
50041
50042 if test "x$ac_cv_libcsystem" != xyes; then :
50043 ac_cv_libcsystem_CPPFLAGS="-I../libcsystem";
50044 ac_cv_libcsystem_LIBADD="../libcsystem/libcsystem.la";
50045
50046 ac_cv_libcsystem=local
50047
50048
50049 $as_echo "#define HAVE_LOCAL_LIBCSYSTEM 1" >>confdefs.h
50050
50051 HAVE_LOCAL_LIBCSYSTEM=1
50052
50053
50054 fi
50055
50056 if test "x$ac_cv_libcsystem" = xlocal; then
50057 HAVE_LOCAL_LIBCSYSTEM_TRUE=
50058 HAVE_LOCAL_LIBCSYSTEM_FALSE='#'
50059 else
50060 HAVE_LOCAL_LIBCSYSTEM_TRUE='#'
50061 HAVE_LOCAL_LIBCSYSTEM_FALSE=
50062 fi
50063
50064 if test "x$ac_cv_libcsystem_CPPFLAGS" != "x"; then :
50065 LIBCSYSTEM_CPPFLAGS=$ac_cv_libcsystem_CPPFLAGS
50066
50067
50068 fi
50069 if test "x$ac_cv_libcsystem_LIBADD" != "x"; then :
50070 LIBCSYSTEM_LIBADD=$ac_cv_libcsystem_LIBADD
50071
50072
50073 fi
50074
50075 if test "x$ac_cv_libcsystem" = xyes; then :
50076 ax_libcsystem_pc_libs_private=-lstring
50077
50078
50079 fi
50080
50081 if test "x$ac_cv_libcsystem" = xyes; then :
50082 ax_libcsystem_spec_requires=libcsystem
50083
50084 ax_libcsystem_spec_build_requires=libcsystem-devel
50085
50086
50087 fi
50088
50089
50090 # Check whether --enable-static-executables was given.
49847
49848
49849 # Check whether --enable-static-executables was given.
5009149850 if test "${enable_static_executables+set}" = set; then :
5009249851 enableval=$enable_static_executables; ac_cv_enable_static_executables=$enableval
5009349852 else
5009449853 ac_cv_enable_static_executables=no
5009549854 fi
50096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable build static executables (binaries)" >&5
49855
49856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable build static executables (binaries)" >&5
5009749857 $as_echo_n "checking whether to enable build static executables (binaries)... " >&6; }
5009849858 if ${ac_cv_enable_static_executables+:} false; then :
5009949859 $as_echo_n "(cached) " >&6
5010349863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_static_executables" >&5
5010449864 $as_echo "$ac_cv_enable_static_executables" >&6; }
5010549865
50106 if test "x$ac_cv_enable_static_executables" != xno; then :
49866 if test "x$ac_cv_enable_static_executables" != xno; then :
5010749867 STATIC_LDFLAGS="-all-static";
5010849868
5010949869
5011049870
50111 ac_cv_enable_static_executables=yes
50112 fi
50113
50114
50115 # Check whether --enable-verbose-output was given.
50116 if test "${enable_verbose_output+set}" = set; then :
50117 enableval=$enable_verbose_output; ac_cv_enable_verbose_output=$enableval
50118 else
50119 ac_cv_enable_verbose_output=no
50120 fi
50121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable verbose output" >&5
50122 $as_echo_n "checking whether to enable enable verbose output... " >&6; }
50123 if ${ac_cv_enable_verbose_output+:} false; then :
50124 $as_echo_n "(cached) " >&6
50125 else
50126 ac_cv_enable_verbose_output=no
50127 fi
50128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_verbose_output" >&5
50129 $as_echo "$ac_cv_enable_verbose_output" >&6; }
50130
50131 if test "x$ac_cv_enable_verbose_output" != xno ; then :
50132
50133 $as_echo "#define HAVE_VERBOSE_OUTPUT 1" >>confdefs.h
50134
50135
50136 ac_cv_enable_verbose_output=yes
50137 fi
50138
50139
50140 # Check whether --enable-debug-output was given.
50141 if test "${enable_debug_output+set}" = set; then :
50142 enableval=$enable_debug_output; ac_cv_enable_debug_output=$enableval
50143 else
50144 ac_cv_enable_debug_output=no
50145 fi
50146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable enable debug output" >&5
50147 $as_echo_n "checking whether to enable enable debug output... " >&6; }
50148 if ${ac_cv_enable_debug_output+:} false; then :
50149 $as_echo_n "(cached) " >&6
50150 else
50151 ac_cv_enable_debug_output=no
50152 fi
50153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_debug_output" >&5
50154 $as_echo "$ac_cv_enable_debug_output" >&6; }
50155
50156 if test "x$ac_cv_enable_debug_output" != xno ; then :
50157
50158 $as_echo "#define HAVE_DEBUG_OUTPUT 1" >>confdefs.h
50159
50160
50161 ac_cv_enable_debug_output=yes
50162 fi
49871 ac_cv_enable_static_executables=yes
49872 fi
49873
49874
49875 if test "x$enable_shared" = xyes && test "x$ac_cv_enable_static_executables" = xno; then :
49876 case $host in #(
49877 *cygwin* | *mingw*) :
49878 LIBESEDB_DLL_IMPORT="-DLIBESEDB_DLL_IMPORT"
49879
49880 ;; #(
49881 *) :
49882 ;;
49883 esac
49884
49885 fi
49886
5016349887
5016449888
5016549889
5016949893 else
5017049894 ac_cv_with_pyprefix=no
5017149895 fi
50172 { $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
49896
49897 { $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
5017349898 $as_echo_n "checking whether to use use \`python-config --prefix' to determine the prefix of pythondir instead of --prefix... " >&6; }
5017449899 if ${ac_cv_with_pyprefix+:} false; then :
5017549900 $as_echo_n "(cached) " >&6
5017949904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_with_pyprefix" >&5
5018049905 $as_echo "$ac_cv_with_pyprefix" >&6; }
5018149906
50182 # Check whether --enable-python was given.
49907
49908 # Check whether --enable-python was given.
5018349909 if test "${enable_python+set}" = set; then :
5018449910 enableval=$enable_python; ac_cv_enable_python=$enableval
5018549911 else
5018649912 ac_cv_enable_python=no
5018749913 fi
50188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable build Python bindings" >&5
49914
49915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable build Python bindings" >&5
5018949916 $as_echo_n "checking whether to enable build Python bindings... " >&6; }
5019049917 if ${ac_cv_enable_python+:} false; then :
5019149918 $as_echo_n "(cached) " >&6
5019449921 fi
5019549922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_python" >&5
5019649923 $as_echo "$ac_cv_enable_python" >&6; }
49924
5019749925
5019849926 # Check whether --with-pythondir was given.
5019949927 if test "${with_pythondir+set}" = set; then :
5020149929 else
5020249930 ac_cv_with_pythondir=no
5020349931 fi
50204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use use to specify the Python directory (pythondir)" >&5
49932
49933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use use to specify the Python directory (pythondir)" >&5
5020549934 $as_echo_n "checking whether to use use to specify the Python directory (pythondir)... " >&6; }
5020649935 if ${ac_cv_with_pythondir+:} false; then :
5020749936 $as_echo_n "(cached) " >&6
5044650175 fi
5044750176
5044850177
50449 # Check whether --enable-python2 was given.
50178
50179 # Check whether --enable-python2 was given.
5045050180 if test "${enable_python2+set}" = set; then :
5045150181 enableval=$enable_python2; ac_cv_enable_python2=$enableval
5045250182 else
5045350183 ac_cv_enable_python2=no
5045450184 fi
50455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable build Python 2 bindings" >&5
50185
50186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable build Python 2 bindings" >&5
5045650187 $as_echo_n "checking whether to enable build Python 2 bindings... " >&6; }
5045750188 if ${ac_cv_enable_python2+:} false; then :
5045850189 $as_echo_n "(cached) " >&6
5046150192 fi
5046250193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_python2" >&5
5046350194 $as_echo "$ac_cv_enable_python2" >&6; }
50195
5046450196
5046550197 # Check whether --with-pythondir2 was given.
5046650198 if test "${with_pythondir2+set}" = set; then :
5046850200 else
5046950201 ac_cv_with_pythondir2=no
5047050202 fi
50471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use use to specify the Python 2 directory (pythondir2)" >&5
50203
50204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use use to specify the Python 2 directory (pythondir2)" >&5
5047250205 $as_echo_n "checking whether to use use to specify the Python 2 directory (pythondir2)... " >&6; }
5047350206 if ${ac_cv_with_pythondir2+:} false; then :
5047450207 $as_echo_n "(cached) " >&6
5070950442 fi
5071050443
5071150444
50712 # Check whether --enable-python3 was given.
50445
50446 # Check whether --enable-python3 was given.
5071350447 if test "${enable_python3+set}" = set; then :
5071450448 enableval=$enable_python3; ac_cv_enable_python3=$enableval
5071550449 else
5071650450 ac_cv_enable_python3=no
5071750451 fi
50718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable build Python 3 bindings" >&5
50452
50453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable build Python 3 bindings" >&5
5071950454 $as_echo_n "checking whether to enable build Python 3 bindings... " >&6; }
5072050455 if ${ac_cv_enable_python3+:} false; then :
5072150456 $as_echo_n "(cached) " >&6
5072450459 fi
5072550460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_python3" >&5
5072650461 $as_echo "$ac_cv_enable_python3" >&6; }
50462
5072750463
5072850464 # Check whether --with-pythondir3 was given.
5072950465 if test "${with_pythondir3+set}" = set; then :
5073150467 else
5073250468 ac_cv_with_pythondir3=no
5073350469 fi
50734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use use to specify the Python 3 directory (pythondir3)" >&5
50470
50471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use use to specify the Python 3 directory (pythondir3)" >&5
5073550472 $as_echo_n "checking whether to use use to specify the Python 3 directory (pythondir3)... " >&6; }
5073650473 if ${ac_cv_with_pythondir3+:} false; then :
5073750474 $as_echo_n "(cached) " >&6
5100450741
5100550742 fi
5100650743
51007 if test "x$enable_shared" = xyes; then :
51008 case $host in #(
51009 *cygwin* | *mingw*) :
51010
51011 $as_echo "#define HAVE_DLLMAIN 1" >>confdefs.h
51012
51013 HAVE_DLLMAIN=1
51014
51015
51016 if test "x$ac_cv_enable_static_executables" = xno; then :
51017 LIBESEDB_DLL_IMPORT="-DLIBESEDB_DLL_IMPORT"
51018
51019
51020 fi
51021 ;; #(
51022 *) :
51023 ;;
51024 esac
51025
51026 fi
50744 for ac_header in dlfcn.h
50745 do :
50746 ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
50747 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
50748 cat >>confdefs.h <<_ACEOF
50749 #define HAVE_DLFCN_H 1
50750 _ACEOF
50751
50752 fi
50753
50754 done
50755
50756
50757 for ac_func in fmemopen getopt
50758 do :
50759 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
50760 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
50761 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
50762 cat >>confdefs.h <<_ACEOF
50763 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
50764 _ACEOF
50765
50766 fi
50767 done
50768
50769
50770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
50771 $as_echo_n "checking for dlsym in -ldl... " >&6; }
50772 if ${ac_cv_lib_dl_dlsym+:} false; then :
50773 $as_echo_n "(cached) " >&6
50774 else
50775 ac_check_lib_save_LIBS=$LIBS
50776 LIBS="-ldl $LIBS"
50777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50778 /* end confdefs.h. */
50779
50780 /* Override any GCC internal prototype to avoid an error.
50781 Use char because int might match the return type of a GCC
50782 builtin and then its argument prototype would still apply. */
50783 #ifdef __cplusplus
50784 extern "C"
50785 #endif
50786 char dlsym ();
50787 int
50788 main ()
50789 {
50790 return dlsym ();
50791 ;
50792 return 0;
50793 }
50794 _ACEOF
50795 if ac_fn_c_try_link "$LINENO"; then :
50796 ac_cv_lib_dl_dlsym=yes
50797 else
50798 ac_cv_lib_dl_dlsym=no
50799 fi
50800 rm -f core conftest.err conftest.$ac_objext \
50801 conftest$ac_exeext conftest.$ac_ext
50802 LIBS=$ac_check_lib_save_LIBS
50803 fi
50804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
50805 $as_echo "$ac_cv_lib_dl_dlsym" >&6; }
50806 if test "x$ac_cv_lib_dl_dlsym" = xyes; then :
50807 cat >>confdefs.h <<_ACEOF
50808 #define HAVE_LIBDL 1
50809 _ACEOF
50810
50811 LIBS="-ldl $LIBS"
50812
50813 fi
50814
50815
50816 if test "x$lt_cv_prog_gnu_ld" = xyes && test "x$ac_cv_lib_dl_dlsym" = xyes; then :
50817
50818 $as_echo "#define HAVE_GNU_DL_DLSYM 1" >>confdefs.h
50819
50820
50821 fi
50822
5102750823
5102850824 CFLAGS="$CFLAGS -Wall";
5102950825
51030 if test "x$ac_cv_libcstring" = xyes || 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_libfvalue" = xyes || test "x$ac_cv_libfwnt" = xyes; then :
50826 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_libfvalue" = xyes || test "x$ac_cv_libfwnt" = xyes; then :
5103150827 libesedb_spec_requires=Requires:
5103250828
5103350829 libesedb_spec_build_requires=BuildRequires:
5103550831
5103650832 fi
5103750833
51038 if test "x$ac_cv_libfmapi" = xyes || test "x$ac_cv_libmapidb" = xyes || test "x$ac_cv_libcsystem" = xyes; then :
50834 if test "x$ac_cv_libfmapi" = xyes || test "x$ac_cv_libmapidb" = xyes; then :
5103950835 libesedb_spec_tools_build_requires=BuildRequires:
5104050836
5104150837
5105650852
5105750853 ac_config_files="$ac_config_files common/Makefile"
5105850854
51059 ac_config_files="$ac_config_files libcstring/Makefile"
51060
5106150855 ac_config_files="$ac_config_files libcerror/Makefile"
5106250856
5106350857 ac_config_files="$ac_config_files libcthreads/Makefile"
5109550889 ac_config_files="$ac_config_files libfmapi/Makefile"
5109650890
5109750891 ac_config_files="$ac_config_files libmapidb/Makefile"
51098
51099 ac_config_files="$ac_config_files libcsystem/Makefile"
5110050892
5110150893 ac_config_files="$ac_config_files esedbtools/Makefile"
5110250894
5127851070 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
5127951071 Usually this means the macro was only invoked conditionally." "$LINENO" 5
5128051072 fi
51281 if test -z "${HAVE_LOCAL_LIBCSTRING_TRUE}" && test -z "${HAVE_LOCAL_LIBCSTRING_FALSE}"; then
51282 as_fn_error $? "conditional \"HAVE_LOCAL_LIBCSTRING\" was never defined.
51283 Usually this means the macro was only invoked conditionally." "$LINENO" 5
51284 fi
5128551073 if test -z "${HAVE_LOCAL_LIBCERROR_TRUE}" && test -z "${HAVE_LOCAL_LIBCERROR_FALSE}"; then
5128651074 as_fn_error $? "conditional \"HAVE_LOCAL_LIBCERROR\" was never defined.
5128751075 Usually this means the macro was only invoked conditionally." "$LINENO" 5
5135251140 fi
5135351141 if test -z "${HAVE_LOCAL_LIBMAPIDB_TRUE}" && test -z "${HAVE_LOCAL_LIBMAPIDB_FALSE}"; then
5135451142 as_fn_error $? "conditional \"HAVE_LOCAL_LIBMAPIDB\" was never defined.
51355 Usually this means the macro was only invoked conditionally." "$LINENO" 5
51356 fi
51357 if test -z "${HAVE_LOCAL_LIBCSYSTEM_TRUE}" && test -z "${HAVE_LOCAL_LIBCSYSTEM_FALSE}"; then
51358 as_fn_error $? "conditional \"HAVE_LOCAL_LIBCSYSTEM\" was never defined.
5135951143 Usually this means the macro was only invoked conditionally." "$LINENO" 5
5136051144 fi
5136151145 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
5177151555 # report actual input values of CONFIG_FILES etc. instead of their
5177251556 # values after options handling.
5177351557 ac_log="
51774 This file was extended by libesedb $as_me 20160622, which was
51558 This file was extended by libesedb $as_me 20170121, which was
5177551559 generated by GNU Autoconf 2.69. Invocation command line was
5177651560
5177751561 CONFIG_FILES = $CONFIG_FILES
5183751621 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
5183851622 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
5183951623 ac_cs_version="\\
51840 libesedb config.status 20160622
51624 libesedb config.status 20170121
5184151625 configured by $0, generated by GNU Autoconf 2.69,
5184251626 with options \\"\$ac_cs_config\\"
5184351627
5197551759 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
5197651760 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
5197751761 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
51762 shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
5197851763 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
5197951764 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
5198051765 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
5202251807 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
5202351808 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
5202451809 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
51810 lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
5202551811 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
5202651812 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
51813 lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
5202751814 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
5202851815 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
51816 lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
5202951817 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
5203051818 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
5203151819 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
5209051878 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
5209151879 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
5209251880 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
52093 sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
51881 configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
51882 configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
5209451883 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
5209551884 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
5209651885 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
5214251931 compiler \
5214351932 lt_cv_sys_global_symbol_pipe \
5214451933 lt_cv_sys_global_symbol_to_cdecl \
51934 lt_cv_sys_global_symbol_to_import \
5214551935 lt_cv_sys_global_symbol_to_c_name_address \
5214651936 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
51937 lt_cv_nm_interface \
5214751938 nm_file_list_spec \
51939 lt_cv_truncate_bin \
5214851940 lt_prog_compiler_no_builtin_flag \
5214951941 lt_prog_compiler_pic \
5215051942 lt_prog_compiler_wl \
5217951971 striplib; do
5218051972 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
5218151973 *[\\\\\\\`\\"\\\$]*)
52182 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
51974 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
5218351975 ;;
5218451976 *)
5218551977 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
5220651998 postuninstall_cmds \
5220751999 finish_cmds \
5220852000 sys_lib_search_path_spec \
52209 sys_lib_dlsearch_path_spec; do
52001 configure_time_dlsearch_path \
52002 configure_time_lt_sys_library_path; do
5221052003 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
5221152004 *[\\\\\\\`\\"\\\$]*)
52212 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
52005 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
5221352006 ;;
5221452007 *)
5221552008 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
5221852011 done
5221952012
5222052013 ac_aux_dir='$ac_aux_dir'
52221 xsi_shell='$xsi_shell'
52222 lt_shell_append='$lt_shell_append'
52223
52224 # See if we are running on zsh, and set the options which allow our
52014
52015 # See if we are running on zsh, and set the options that allow our
5222552016 # commands through without removal of \ escapes INIT.
52226 if test -n "\${ZSH_VERSION+set}" ; then
52017 if test -n "\${ZSH_VERSION+set}"; then
5222752018 setopt NO_GLOB_SUBST
5222852019 fi
5222952020
5223052021
5223152022 PACKAGE='$PACKAGE'
5223252023 VERSION='$VERSION'
52233 TIMESTAMP='$TIMESTAMP'
5223452024 RM='$RM'
5223552025 ofile='$ofile'
5223652026
5225852048 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
5225952049 "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
5226052050 "common/Makefile") CONFIG_FILES="$CONFIG_FILES common/Makefile" ;;
52261 "libcstring/Makefile") CONFIG_FILES="$CONFIG_FILES libcstring/Makefile" ;;
5226252051 "libcerror/Makefile") CONFIG_FILES="$CONFIG_FILES libcerror/Makefile" ;;
5226352052 "libcthreads/Makefile") CONFIG_FILES="$CONFIG_FILES libcthreads/Makefile" ;;
5226452053 "libcdata/Makefile") CONFIG_FILES="$CONFIG_FILES libcdata/Makefile" ;;
5227852067 "libesedb/Makefile") CONFIG_FILES="$CONFIG_FILES libesedb/Makefile" ;;
5227952068 "libfmapi/Makefile") CONFIG_FILES="$CONFIG_FILES libfmapi/Makefile" ;;
5228052069 "libmapidb/Makefile") CONFIG_FILES="$CONFIG_FILES libmapidb/Makefile" ;;
52281 "libcsystem/Makefile") CONFIG_FILES="$CONFIG_FILES libcsystem/Makefile" ;;
5228252070 "esedbtools/Makefile") CONFIG_FILES="$CONFIG_FILES esedbtools/Makefile" ;;
5228352071 "pyesedb/Makefile") CONFIG_FILES="$CONFIG_FILES pyesedb/Makefile" ;;
5228452072 "pyesedb-python2/Makefile") CONFIG_FILES="$CONFIG_FILES pyesedb-python2/Makefile" ;;
5299052778 ;;
5299152779 "libtool":C)
5299252780
52993 # See if we are running on zsh, and set the options which allow our
52781 # See if we are running on zsh, and set the options that allow our
5299452782 # commands through without removal of \ escapes.
52995 if test -n "${ZSH_VERSION+set}" ; then
52783 if test -n "${ZSH_VERSION+set}"; then
5299652784 setopt NO_GLOB_SUBST
5299752785 fi
5299852786
52999 cfgfile="${ofile}T"
52787 cfgfile=${ofile}T
5300052788 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
5300152789 $RM "$cfgfile"
5300252790
5300352791 cat <<_LT_EOF >> "$cfgfile"
5300452792 #! $SHELL
53005
53006 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
53007 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
52793 # Generated automatically by $as_me ($PACKAGE) $VERSION
5300852794 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5300952795 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
52796
52797 # Provide generalized library-building support services.
52798 # Written by Gordon Matzigkeit, 1996
52799
52800 # Copyright (C) 2014 Free Software Foundation, Inc.
52801 # This is free software; see the source for copying conditions. There is NO
52802 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
52803
52804 # GNU Libtool is free software; you can redistribute it and/or modify
52805 # it under the terms of the GNU General Public License as published by
52806 # the Free Software Foundation; either version 2 of of the License, or
52807 # (at your option) any later version.
5301052808 #
53011 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
53012 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
53013 # Foundation, Inc.
53014 # Written by Gordon Matzigkeit, 1996
52809 # As a special exception to the GNU General Public License, if you
52810 # distribute this file as part of a program or library that is built
52811 # using GNU Libtool, you may include this file under the same
52812 # distribution terms that you use for the rest of that program.
5301552813 #
53016 # This file is part of GNU Libtool.
53017 #
53018 # GNU Libtool is free software; you can redistribute it and/or
53019 # modify it under the terms of the GNU General Public License as
53020 # published by the Free Software Foundation; either version 2 of
53021 # the License, or (at your option) any later version.
53022 #
53023 # As a special exception to the GNU General Public License,
53024 # if you distribute this file as part of a program or library that
53025 # is built using GNU Libtool, you may include this file under the
53026 # same distribution terms that you use for the rest of that program.
53027 #
53028 # GNU Libtool is distributed in the hope that it will be useful,
53029 # but WITHOUT ANY WARRANTY; without even the implied warranty of
52814 # GNU Libtool is distributed in the hope that it will be useful, but
52815 # WITHOUT ANY WARRANTY; without even the implied warranty of
5303052816 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5303152817 # GNU General Public License for more details.
5303252818 #
5303352819 # You should have received a copy of the GNU General Public License
53034 # along with GNU Libtool; see the file COPYING. If not, a copy
53035 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
53036 # obtained by writing to the Free Software Foundation, Inc.,
53037 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
52820 # along with this program. If not, see <http://www.gnu.org/licenses/>.
5303852821
5303952822
5304052823 # The names of the tagged configurations supported by this script.
53041 available_tags=""
52824 available_tags=''
52825
52826 # Configured defaults for sys_lib_dlsearch_path munging.
52827 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
5304252828
5304352829 # ### BEGIN LIBTOOL CONFIG
5304452830
5306652852
5306752853 # Whether or not to optimize for fast installation.
5306852854 fast_install=$enable_fast_install
52855
52856 # Shared archive member basename,for filename based shared library versioning on AIX.
52857 shared_archive_member_spec=$shared_archive_member_spec
5306952858
5307052859 # Shell to use when invoking shell scripts.
5307152860 SHELL=$lt_SHELL
5317852967 # Transform the output of nm in a proper C declaration.
5317952968 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5318052969
52970 # Transform the output of nm into a list of symbols to manually relocate.
52971 global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
52972
5318152973 # Transform the output of nm in a C name address pair.
5318252974 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5318352975
5318452976 # Transform the output of nm in a C name address pair when lib prefix is needed.
5318552977 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
5318652978
52979 # The name lister interface.
52980 nm_interface=$lt_lt_cv_nm_interface
52981
5318752982 # Specify filename containing input files for \$NM.
5318852983 nm_file_list_spec=$lt_nm_file_list_spec
5318952984
53190 # The root where to search for dependent libraries,and in which our libraries should be installed.
52985 # The root where to search for dependent libraries,and where our libraries should be installed.
5319152986 lt_sysroot=$lt_sysroot
52987
52988 # Command to truncate a binary pipe.
52989 lt_truncate_bin=$lt_lt_cv_truncate_bin
5319252990
5319352991 # The name of the directory that contains temporary libtool files.
5319452992 objdir=$objdir
5328053078 # Compile-time system search path for libraries.
5328153079 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5328253080
53283 # Run-time system search path for libraries.
53284 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
53081 # Detected run-time system search path for libraries.
53082 sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
53083
53084 # Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
53085 configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
5328553086
5328653087 # Whether dlopen is supported.
5328753088 dlopen_support=$enable_dlopen
5337453175 # Whether we need a single "-rpath" flag with a separated argument.
5337553176 hardcode_libdir_separator=$lt_hardcode_libdir_separator
5337653177
53377 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
53178 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
5337853179 # DIR into the resulting binary.
5337953180 hardcode_direct=$hardcode_direct
5338053181
53381 # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
53182 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
5338253183 # DIR into the resulting binary and the resulting library dependency is
53383 # "absolute",i.e impossible to change by setting \${shlibpath_var} if the
53184 # "absolute",i.e impossible to change by setting \$shlibpath_var if the
5338453185 # library is relocated.
5338553186 hardcode_direct_absolute=$hardcode_direct_absolute
5338653187
5342953230 hardcode_action=$hardcode_action
5343053231
5343153232 # ### END LIBTOOL CONFIG
53233
53234 _LT_EOF
53235
53236 cat <<'_LT_EOF' >> "$cfgfile"
53237
53238 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
53239
53240 # func_munge_path_list VARIABLE PATH
53241 # -----------------------------------
53242 # VARIABLE is name of variable containing _space_ separated list of
53243 # directories to be munged by the contents of PATH, which is string
53244 # having a format:
53245 # "DIR[:DIR]:"
53246 # string "DIR[ DIR]" will be prepended to VARIABLE
53247 # ":DIR[:DIR]"
53248 # string "DIR[ DIR]" will be appended to VARIABLE
53249 # "DIRP[:DIRP]::[DIRA:]DIRA"
53250 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
53251 # "DIRA[ DIRA]" will be appended to VARIABLE
53252 # "DIR[:DIR]"
53253 # VARIABLE will be replaced by "DIR[ DIR]"
53254 func_munge_path_list ()
53255 {
53256 case x$2 in
53257 x)
53258 ;;
53259 *:)
53260 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
53261 ;;
53262 x:*)
53263 eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
53264 ;;
53265 *::*)
53266 eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
53267 eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
53268 ;;
53269 *)
53270 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
53271 ;;
53272 esac
53273 }
53274
53275
53276 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
53277 func_cc_basename ()
53278 {
53279 for cc_temp in $*""; do
53280 case $cc_temp in
53281 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
53282 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
53283 \-*) ;;
53284 *) break;;
53285 esac
53286 done
53287 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
53288 }
53289
53290
53291 # ### END FUNCTIONS SHARED WITH CONFIGURE
5343253292
5343353293 _LT_EOF
5343453294
5343853298 # AIX sometimes has problems with the GCC collect2 program. For some
5343953299 # reason, if we set the COLLECT_NAMES environment variable, the problems
5344053300 # vanish in a puff of smoke.
53441 if test "X${COLLECT_NAMES+set}" != Xset; then
53301 if test set != "${COLLECT_NAMES+set}"; then
5344253302 COLLECT_NAMES=
5344353303 export COLLECT_NAMES
5344453304 fi
5344753307 esac
5344853308
5344953309
53450 ltmain="$ac_aux_dir/ltmain.sh"
53310 ltmain=$ac_aux_dir/ltmain.sh
5345153311
5345253312
5345353313 # We use sed instead of cat because bash on DJGPP gets confused if
5345653316 # is reportedly fixed, but why not run on old versions too?
5345753317 sed '$q' "$ltmain" >> "$cfgfile" \
5345853318 || (rm -f "$cfgfile"; exit 1)
53459
53460 if test x"$xsi_shell" = xyes; then
53461 sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
53462 func_dirname ()\
53463 {\
53464 \ case ${1} in\
53465 \ */*) func_dirname_result="${1%/*}${2}" ;;\
53466 \ * ) func_dirname_result="${3}" ;;\
53467 \ esac\
53468 } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
53469 && mv -f "$cfgfile.tmp" "$cfgfile" \
53470 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
53471 test 0 -eq $? || _lt_function_replace_fail=:
53472
53473
53474 sed -e '/^func_basename ()$/,/^} # func_basename /c\
53475 func_basename ()\
53476 {\
53477 \ func_basename_result="${1##*/}"\
53478 } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
53479 && mv -f "$cfgfile.tmp" "$cfgfile" \
53480 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
53481 test 0 -eq $? || _lt_function_replace_fail=:
53482
53483
53484 sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
53485 func_dirname_and_basename ()\
53486 {\
53487 \ case ${1} in\
53488 \ */*) func_dirname_result="${1%/*}${2}" ;;\
53489 \ * ) func_dirname_result="${3}" ;;\
53490 \ esac\
53491 \ func_basename_result="${1##*/}"\
53492 } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
53493 && mv -f "$cfgfile.tmp" "$cfgfile" \
53494 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
53495 test 0 -eq $? || _lt_function_replace_fail=:
53496
53497
53498 sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
53499 func_stripname ()\
53500 {\
53501 \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
53502 \ # positional parameters, so assign one to ordinary parameter first.\
53503 \ func_stripname_result=${3}\
53504 \ func_stripname_result=${func_stripname_result#"${1}"}\
53505 \ func_stripname_result=${func_stripname_result%"${2}"}\
53506 } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
53507 && mv -f "$cfgfile.tmp" "$cfgfile" \
53508 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
53509 test 0 -eq $? || _lt_function_replace_fail=:
53510
53511
53512 sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
53513 func_split_long_opt ()\
53514 {\
53515 \ func_split_long_opt_name=${1%%=*}\
53516 \ func_split_long_opt_arg=${1#*=}\
53517 } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
53518 && mv -f "$cfgfile.tmp" "$cfgfile" \
53519 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
53520 test 0 -eq $? || _lt_function_replace_fail=:
53521
53522
53523 sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
53524 func_split_short_opt ()\
53525 {\
53526 \ func_split_short_opt_arg=${1#??}\
53527 \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
53528 } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
53529 && mv -f "$cfgfile.tmp" "$cfgfile" \
53530 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
53531 test 0 -eq $? || _lt_function_replace_fail=:
53532
53533
53534 sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
53535 func_lo2o ()\
53536 {\
53537 \ case ${1} in\
53538 \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
53539 \ *) func_lo2o_result=${1} ;;\
53540 \ esac\
53541 } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
53542 && mv -f "$cfgfile.tmp" "$cfgfile" \
53543 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
53544 test 0 -eq $? || _lt_function_replace_fail=:
53545
53546
53547 sed -e '/^func_xform ()$/,/^} # func_xform /c\
53548 func_xform ()\
53549 {\
53550 func_xform_result=${1%.*}.lo\
53551 } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
53552 && mv -f "$cfgfile.tmp" "$cfgfile" \
53553 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
53554 test 0 -eq $? || _lt_function_replace_fail=:
53555
53556
53557 sed -e '/^func_arith ()$/,/^} # func_arith /c\
53558 func_arith ()\
53559 {\
53560 func_arith_result=$(( $* ))\
53561 } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
53562 && mv -f "$cfgfile.tmp" "$cfgfile" \
53563 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
53564 test 0 -eq $? || _lt_function_replace_fail=:
53565
53566
53567 sed -e '/^func_len ()$/,/^} # func_len /c\
53568 func_len ()\
53569 {\
53570 func_len_result=${#1}\
53571 } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
53572 && mv -f "$cfgfile.tmp" "$cfgfile" \
53573 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
53574 test 0 -eq $? || _lt_function_replace_fail=:
53575
53576 fi
53577
53578 if test x"$lt_shell_append" = xyes; then
53579 sed -e '/^func_append ()$/,/^} # func_append /c\
53580 func_append ()\
53581 {\
53582 eval "${1}+=\\${2}"\
53583 } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
53584 && mv -f "$cfgfile.tmp" "$cfgfile" \
53585 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
53586 test 0 -eq $? || _lt_function_replace_fail=:
53587
53588
53589 sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
53590 func_append_quoted ()\
53591 {\
53592 \ func_quote_for_eval "${2}"\
53593 \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
53594 } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
53595 && mv -f "$cfgfile.tmp" "$cfgfile" \
53596 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
53597 test 0 -eq $? || _lt_function_replace_fail=:
53598
53599
53600 # Save a `func_append' function call where possible by direct use of '+='
53601 sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
53602 && mv -f "$cfgfile.tmp" "$cfgfile" \
53603 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
53604 test 0 -eq $? || _lt_function_replace_fail=:
53605 else
53606 # Save a `func_append' function call even when '+=' is not available
53607 sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
53608 && mv -f "$cfgfile.tmp" "$cfgfile" \
53609 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
53610 test 0 -eq $? || _lt_function_replace_fail=:
53611 fi
53612
53613 if test x"$_lt_function_replace_fail" = x":"; then
53614 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
53615 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
53616 fi
53617
5361853319
5361953320 mv -f "$cfgfile" "$ofile" ||
5362053321 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5377553476
5377653477 { $as_echo "$as_me:${as_lineno-$LINENO}:
5377753478 Building:
53778 libcstring support: $ac_cv_libcstring
5377953479 libcerror support: $ac_cv_libcerror
5378053480 libcthreads support: $ac_cv_libcthreads
5378153481 libcdata support: $ac_cv_libcdata
5379453494 libfwnt support: $ac_cv_libfwnt
5379553495 libfmapi support: $ac_cv_libfmapi
5379653496 libmapidb support: $ac_cv_libmapidb
53797 libcsystem support: $ac_cv_libcsystem
5379853497
5379953498 Features:
5380053499 Multi-threading support: $ac_cv_libcthreads_multi_threading
5380853507 " >&5
5380953508 $as_echo "$as_me:
5381053509 Building:
53811 libcstring support: $ac_cv_libcstring
5381253510 libcerror support: $ac_cv_libcerror
5381353511 libcthreads support: $ac_cv_libcthreads
5381453512 libcdata support: $ac_cv_libcdata
5382753525 libfwnt support: $ac_cv_libfwnt
5382853526 libfmapi support: $ac_cv_libfmapi
5382953527 libmapidb support: $ac_cv_libmapidb
53830 libcsystem support: $ac_cv_libcsystem
5383153528
5383253529 Features:
5383353530 Multi-threading support: $ac_cv_libcthreads_multi_threading
11
22 AC_INIT(
33 [libesedb],
4 [20160622],
4 [20170121],
55 [joachim.metz@gmail.com])
66
77 AC_CONFIG_SRCDIR(
5353 dnl Checks for libraries and library functions
5454 AX_COMMON_CHECK_LOCAL
5555
56 dnl Check for enabling libcstring for cross-platform C string functions
57 AX_LIBCSTRING_CHECK_ENABLE
58
5956 dnl Check for enabling libcerror for cross-platform C error functions
6057 AX_LIBCERROR_CHECK_ENABLE
6158
9289 dnl Check for enabling libfdata for file data types support
9390 AX_LIBFDATA_CHECK_ENABLE
9491
95 dnl Check for enabling libfdatetime for file date and time support
92 dnl Check for enabling libfdatetime for date and time formats support
9693 AX_LIBFDATETIME_CHECK_ENABLE
9794
98 dnl Check for enabling libfguid for file GUID/UUID support
95 dnl Check for enabling libfguid for GUID/UUID format support
9996 AX_LIBFGUID_CHECK_ENABLE
10097
10198 dnl Check for enabling libfvalue for file value support
113110 dnl Check for enabling libmapidb for MAPI database support
114111 AX_LIBMAPIDB_CHECK_ENABLE
115112
116 dnl Check for enabling libcsystem for cross-platform C generic system functions
117 AX_LIBCSYSTEM_CHECK_ENABLE
118
119 dnl Check if esedbtools should be build as static executables
120 AX_COMMON_CHECK_ENABLE_STATIC_EXECUTABLES
121
122 dnl Check if libesedb should be build with verbose output
123 AX_COMMON_CHECK_ENABLE_VERBOSE_OUTPUT
124
125 dnl Check if libesedb should be build with debug output
126 AX_COMMON_CHECK_ENABLE_DEBUG_OUTPUT
113 dnl Check for esedbtools function support
114 AX_ESEDBTOOLS_CHECK_LOCAL
127115
128116 dnl Check if libesedb python bindings (pyesedb) should be build
129117 AX_PYTHON_CHECK_PYPREFIX
145133 [1])
146134 ])
147135
148 dnl Check if DLL support is needed
149 AS_IF(
150 [test "x$enable_shared" = xyes],
151 [AS_CASE(
152 [$host],
153 [*cygwin* | *mingw*],
154 [AC_DEFINE(
155 [HAVE_DLLMAIN],
156 [1],
157 [Define to 1 to enable the DllMain function.])
158 AC_SUBST(
159 [HAVE_DLLMAIN],
160 [1])
161
162 AS_IF(
163 [test "x$ac_cv_enable_static_executables" = xno],
164 [AC_SUBST(
165 [LIBESEDB_DLL_IMPORT],
166 ["-DLIBESEDB_DLL_IMPORT"])
167 ])
168 ])
169 ])
136 dnl Check for test function support
137 AX_TESTS_CHECK_LOCAL
170138
171139 dnl Set additional compiler flags
172140 CFLAGS="$CFLAGS -Wall";
173141
174142 dnl Check if requires and build requires should be set in spec file
175143 AS_IF(
176 [test "x$ac_cv_libcstring" = xyes || 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_libfvalue" = xyes || test "x$ac_cv_libfwnt" = xyes],
144 [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_libfvalue" = xyes || test "x$ac_cv_libfwnt" = xyes],
177145 [AC_SUBST(
178146 [libesedb_spec_requires],
179147 [Requires:])
183151 ])
184152
185153 AS_IF(
186 [test "x$ac_cv_libfmapi" = xyes || test "x$ac_cv_libmapidb" = xyes || test "x$ac_cv_libcsystem" = xyes],
154 [test "x$ac_cv_libfmapi" = xyes || test "x$ac_cv_libmapidb" = xyes],
187155 [AC_SUBST(
188156 [libesedb_spec_tools_build_requires],
189157 [BuildRequires:])
208176 AC_CONFIG_FILES([Makefile])
209177 AC_CONFIG_FILES([include/Makefile])
210178 AC_CONFIG_FILES([common/Makefile])
211 AC_CONFIG_FILES([libcstring/Makefile])
212179 AC_CONFIG_FILES([libcerror/Makefile])
213180 AC_CONFIG_FILES([libcthreads/Makefile])
214181 AC_CONFIG_FILES([libcdata/Makefile])
228195 AC_CONFIG_FILES([libesedb/Makefile])
229196 AC_CONFIG_FILES([libfmapi/Makefile])
230197 AC_CONFIG_FILES([libmapidb/Makefile])
231 AC_CONFIG_FILES([libcsystem/Makefile])
232198 AC_CONFIG_FILES([esedbtools/Makefile])
233199 AC_CONFIG_FILES([pyesedb/Makefile])
234200 AC_CONFIG_FILES([pyesedb-python2/Makefile])
259225 dnl Print a summary
260226 AC_MSG_NOTICE([
261227 Building:
262 libcstring support: $ac_cv_libcstring
263228 libcerror support: $ac_cv_libcerror
264229 libcthreads support: $ac_cv_libcthreads
265230 libcdata support: $ac_cv_libcdata
278243 libfwnt support: $ac_cv_libfwnt
279244 libfmapi support: $ac_cv_libfmapi
280245 libmapidb support: $ac_cv_libmapidb
281 libcsystem support: $ac_cv_libcsystem
282246
283247 Features:
284248 Multi-threading support: $ac_cv_libcthreads_multi_threading
0 libesedb (20160622-1) unstable; urgency=low
0 libesedb (20170121-1) unstable; urgency=low
11
22 * Auto-generated
33
4 -- Joachim Metz <joachim.metz@gmail.com> Mon, 01 Aug 2016 11:28:44 +0200
4 -- Joachim Metz <joachim.metz@gmail.com> Sat, 21 Jan 2017 10:53:07 +0100
00 This work was packaged for Debian by:
11
2 Joachim Metz <joachim.metz@gmail.com> on Mon, 01 Aug 2016 11:28:44 +0200
2 Joachim Metz <joachim.metz@gmail.com> on Sat, 21 Jan 2017 10:53:07 +0100
33
44 It was downloaded from https://github.com/libyal/libesedb/
55
99
1010 Copyright:
1111
12 Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
12 Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
1313
1414 License:
1515
3232
3333 The Debian packaging is:
3434
35 Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
35 Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
3636
3737 and is licensed under the GNU Lesser General Public License,
3838 see `/usr/share/common-licenses/LGPL-3'.
99
1010 Copyright:
1111
12 Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
12 Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
1313
1414 License:
1515
3232
3333 The Debian packaging is:
3434
35 Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
35 Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
3636
3737 and is licensed under the GNU Lesser General Public License,
3838 see `/usr/share/common-licenses/LGPL-3'.
00 AM_CPPFLAGS = \
11 -I$(top_srcdir)/include \
22 -I$(top_srcdir)/common \
3 @LIBCSTRING_CPPFLAGS@ \
43 @LIBCERROR_CPPFLAGS@ \
54 @LIBCDATA_CPPFLAGS@ \
65 @LIBCLOCALE_CPPFLAGS@ \
1514 @LIBFVALUE_CPPFLAGS@ \
1615 @LIBFWNT_CPPFLAGS@ \
1716 @LIBFMAPI_CPPFLAGS@ \
18 @LIBCSYSTEM_CPPFLAGS@ \
1917 @LIBESEDB_DLL_IMPORT@
2018
2119 AM_LDFLAGS = @STATIC_LDFLAGS@
2624
2725 esedbexport_SOURCES = \
2826 esedbexport.c \
29 esedboutput.c esedboutput.h \
27 esedbtools_getopt.c esedbtools_getopt.h \
28 esedbtools_i18n.h \
3029 esedbtools_libbfio.h \
3130 esedbtools_libcerror.h \
3231 esedbtools_libclocale.h \
3332 esedbtools_libcfile.h \
3433 esedbtools_libcnotify.h \
3534 esedbtools_libcpath.h \
36 esedbtools_libcstring.h \
37 esedbtools_libcsystem.h \
3835 esedbtools_libesedb.h \
3936 esedbtools_libfdatetime.h \
4037 esedbtools_libfguid.h \
4239 esedbtools_libfvalue.h \
4340 esedbtools_libfwnt.h \
4441 esedbtools_libuna.h \
42 esedbtools_output.c esedbtools_output.h \
43 esedbtools_signal.c esedbtools_signal.h \
44 esedbtools_system_string.c esedbtools_system_string.h \
45 esedbtools_unused.h \
4546 exchange.c exchange.h \
4647 export.c export.h \
4748 export_handle.c export_handle.h \
5152 windows_security.c windows_security.h
5253
5354 esedbexport_LDADD = \
54 @LIBCSYSTEM_LIBADD@ \
5555 @LIBFMAPI_LIBADD@ \
5656 @LIBFVALUE_LIBADD@ \
5757 @LIBFWNT_LIBADD@ \
6161 @LIBCPATH_LIBADD@ \
6262 @LIBUNA_LIBADD@ \
6363 @LIBCSPLIT_LIBADD@ \
64 ../libesedb/libesedb.la \
6564 @LIBCNOTIFY_LIBADD@ \
6665 @LIBCLOCALE_LIBADD@ \
66 ../libesedb/libesedb.la \
6767 @LIBCERROR_LIBADD@ \
68 @LIBCSTRING_LIBADD@ \
6968 @LIBINTL@
7069
7170 esedbinfo_SOURCES = \
7271 esedbinfo.c \
73 esedboutput.c esedboutput.h \
72 esedbtools_getopt.c esedbtools_getopt.h \
73 esedbtools_i18n.h \
7474 esedbtools_libbfio.h \
7575 esedbtools_libcerror.h \
7676 esedbtools_libclocale.h \
7777 esedbtools_libcnotify.h \
78 esedbtools_libcstring.h \
79 esedbtools_libcsystem.h \
8078 esedbtools_libesedb.h \
8179 esedbtools_libfdatetime.h \
8280 esedbtools_libfguid.h \
8482 esedbtools_libfvalue.h \
8583 esedbtools_libfwnt.h \
8684 esedbtools_libuna.h \
85 esedbtools_output.c esedbtools_output.h \
86 esedbtools_signal.c esedbtools_signal.h \
87 esedbtools_unused.h \
8788 info_handle.c info_handle.h
8889
8990 esedbinfo_LDADD = \
90 @LIBCSYSTEM_LIBADD@ \
91 ../libesedb/libesedb.la \
9291 @LIBCNOTIFY_LIBADD@ \
9392 @LIBCLOCALE_LIBADD@ \
93 ../libesedb/libesedb.la \
9494 @LIBCERROR_LIBADD@ \
95 @LIBCSTRING_LIBADD@ \
9695 @LIBINTL@
9796
9897 MAINTAINERCLEANFILES = \
9898 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9999 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
100100 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
101 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
102101 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
103102 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
104103 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
109108 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
110109 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
111110 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
112 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
113 $(top_srcdir)/configure.ac
111 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
112 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
114113 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
115114 $(ACLOCAL_M4)
116115 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
120119 CONFIG_CLEAN_VPATH_FILES =
121120 am__installdirs = "$(DESTDIR)$(bindir)"
122121 PROGRAMS = $(bin_PROGRAMS)
123 am_esedbexport_OBJECTS = esedbexport.$(OBJEXT) esedboutput.$(OBJEXT) \
122 am_esedbexport_OBJECTS = esedbexport.$(OBJEXT) \
123 esedbtools_getopt.$(OBJEXT) esedbtools_output.$(OBJEXT) \
124 esedbtools_signal.$(OBJEXT) esedbtools_system_string.$(OBJEXT) \
124125 exchange.$(OBJEXT) export.$(OBJEXT) export_handle.$(OBJEXT) \
125126 log_handle.$(OBJEXT) webcache.$(OBJEXT) \
126127 windows_search.$(OBJEXT) windows_security.$(OBJEXT)
130131 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
131132 am__v_lt_0 = --silent
132133 am__v_lt_1 =
133 am_esedbinfo_OBJECTS = esedbinfo.$(OBJEXT) esedboutput.$(OBJEXT) \
134 am_esedbinfo_OBJECTS = esedbinfo.$(OBJEXT) esedbtools_getopt.$(OBJEXT) \
135 esedbtools_output.$(OBJEXT) esedbtools_signal.$(OBJEXT) \
134136 info_handle.$(OBJEXT)
135137 esedbinfo_OBJECTS = $(am_esedbinfo_OBJECTS)
136138 esedbinfo_DEPENDENCIES = ../libesedb/libesedb.la
237239 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
238240 HAVE_LIBCPATH = @HAVE_LIBCPATH@
239241 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
240 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
241 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
242242 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
243243 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
244244 HAVE_LIBFDATA = @HAVE_LIBFDATA@
257257 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
258258 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
259259 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
260 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
261 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
262260 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
263261 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
264262 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
305303 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
306304 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
307305 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
308 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
309 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
310 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
311 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
312306 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
313307 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
314308 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
341335 LTLIBICONV = @LTLIBICONV@
342336 LTLIBINTL = @LTLIBINTL@
343337 LTLIBOBJS = @LTLIBOBJS@
338 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
344339 MAKEINFO = @MAKEINFO@
345340 MANIFEST_TOOL = @MANIFEST_TOOL@
346341 MKDIR_P = @MKDIR_P@
447442 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
448443 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
449444 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
450 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
451 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
452 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
453 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
454 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
455 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
456445 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
457446 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
458447 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
521510 libcpath_LIBS = @libcpath_LIBS@
522511 libcsplit_CFLAGS = @libcsplit_CFLAGS@
523512 libcsplit_LIBS = @libcsplit_LIBS@
524 libcstring_CFLAGS = @libcstring_CFLAGS@
525 libcstring_LIBS = @libcstring_LIBS@
526 libcsystem_CFLAGS = @libcsystem_CFLAGS@
527 libcsystem_LIBS = @libcsystem_LIBS@
528513 libcthreads_CFLAGS = @libcthreads_CFLAGS@
529514 libcthreads_LIBS = @libcthreads_LIBS@
530515 libdir = @libdir@
576561 AM_CPPFLAGS = \
577562 -I$(top_srcdir)/include \
578563 -I$(top_srcdir)/common \
579 @LIBCSTRING_CPPFLAGS@ \
580564 @LIBCERROR_CPPFLAGS@ \
581565 @LIBCDATA_CPPFLAGS@ \
582566 @LIBCLOCALE_CPPFLAGS@ \
591575 @LIBFVALUE_CPPFLAGS@ \
592576 @LIBFWNT_CPPFLAGS@ \
593577 @LIBFMAPI_CPPFLAGS@ \
594 @LIBCSYSTEM_CPPFLAGS@ \
595578 @LIBESEDB_DLL_IMPORT@
596579
597580 AM_LDFLAGS = @STATIC_LDFLAGS@
598581 esedbexport_SOURCES = \
599582 esedbexport.c \
600 esedboutput.c esedboutput.h \
583 esedbtools_getopt.c esedbtools_getopt.h \
584 esedbtools_i18n.h \
601585 esedbtools_libbfio.h \
602586 esedbtools_libcerror.h \
603587 esedbtools_libclocale.h \
604588 esedbtools_libcfile.h \
605589 esedbtools_libcnotify.h \
606590 esedbtools_libcpath.h \
607 esedbtools_libcstring.h \
608 esedbtools_libcsystem.h \
609591 esedbtools_libesedb.h \
610592 esedbtools_libfdatetime.h \
611593 esedbtools_libfguid.h \
613595 esedbtools_libfvalue.h \
614596 esedbtools_libfwnt.h \
615597 esedbtools_libuna.h \
598 esedbtools_output.c esedbtools_output.h \
599 esedbtools_signal.c esedbtools_signal.h \
600 esedbtools_system_string.c esedbtools_system_string.h \
601 esedbtools_unused.h \
616602 exchange.c exchange.h \
617603 export.c export.h \
618604 export_handle.c export_handle.h \
622608 windows_security.c windows_security.h
623609
624610 esedbexport_LDADD = \
625 @LIBCSYSTEM_LIBADD@ \
626611 @LIBFMAPI_LIBADD@ \
627612 @LIBFVALUE_LIBADD@ \
628613 @LIBFWNT_LIBADD@ \
632617 @LIBCPATH_LIBADD@ \
633618 @LIBUNA_LIBADD@ \
634619 @LIBCSPLIT_LIBADD@ \
635 ../libesedb/libesedb.la \
636620 @LIBCNOTIFY_LIBADD@ \
637621 @LIBCLOCALE_LIBADD@ \
622 ../libesedb/libesedb.la \
638623 @LIBCERROR_LIBADD@ \
639 @LIBCSTRING_LIBADD@ \
640624 @LIBINTL@
641625
642626 esedbinfo_SOURCES = \
643627 esedbinfo.c \
644 esedboutput.c esedboutput.h \
628 esedbtools_getopt.c esedbtools_getopt.h \
629 esedbtools_i18n.h \
645630 esedbtools_libbfio.h \
646631 esedbtools_libcerror.h \
647632 esedbtools_libclocale.h \
648633 esedbtools_libcnotify.h \
649 esedbtools_libcstring.h \
650 esedbtools_libcsystem.h \
651634 esedbtools_libesedb.h \
652635 esedbtools_libfdatetime.h \
653636 esedbtools_libfguid.h \
655638 esedbtools_libfvalue.h \
656639 esedbtools_libfwnt.h \
657640 esedbtools_libuna.h \
641 esedbtools_output.c esedbtools_output.h \
642 esedbtools_signal.c esedbtools_signal.h \
643 esedbtools_unused.h \
658644 info_handle.c info_handle.h
659645
660646 esedbinfo_LDADD = \
661 @LIBCSYSTEM_LIBADD@ \
662 ../libesedb/libesedb.la \
663647 @LIBCNOTIFY_LIBADD@ \
664648 @LIBCLOCALE_LIBADD@ \
649 ../libesedb/libesedb.la \
665650 @LIBCERROR_LIBADD@ \
666 @LIBCSTRING_LIBADD@ \
667651 @LIBINTL@
668652
669653 MAINTAINERCLEANFILES = \
768752
769753 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedbexport.Po@am__quote@
770754 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedbinfo.Po@am__quote@
771 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedboutput.Po@am__quote@
755 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedbtools_getopt.Po@am__quote@
756 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedbtools_output.Po@am__quote@
757 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedbtools_signal.Po@am__quote@
758 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedbtools_system_string.Po@am__quote@
772759 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exchange.Po@am__quote@
773760 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/export.Po@am__quote@
774761 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/export_handle.Po@am__quote@
00 /*
11 * Extracts tables from an Extensible Storage Engine (ESE) Database (EDB) file
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2121 #include <common.h>
2222 #include <file_stream.h>
2323 #include <memory.h>
24 #include <system_string.h>
2425 #include <types.h>
2526
2627 #if defined( HAVE_UNISTD_H )
3132 #include <stdlib.h>
3233 #endif
3334
34 #include "esedboutput.h"
35 #include "esedbtools_getopt.h"
3536 #include "esedbtools_libcerror.h"
3637 #include "esedbtools_libclocale.h"
3738 #include "esedbtools_libcnotify.h"
3839 #include "esedbtools_libcpath.h"
39 #include "esedbtools_libcstring.h"
40 #include "esedbtools_libcsystem.h"
4140 #include "esedbtools_libesedb.h"
41 #include "esedbtools_output.h"
42 #include "esedbtools_signal.h"
43 #include "esedbtools_unused.h"
4244 #include "export_handle.h"
4345 #include "log_handle.h"
4446
8284 /* Signal handler for esedbexport
8385 */
8486 void esedbexport_signal_handler(
85 libcsystem_signal_t signal LIBCSYSTEM_ATTRIBUTE_UNUSED )
87 esedbtools_signal_t signal ESEDBTOOLS_ATTRIBUTE_UNUSED )
8688 {
8789 libcerror_error_t *error = NULL;
8890 static char *function = "esedbexport_signal_handler";
8991
90 LIBCSYSTEM_UNREFERENCED_PARAMETER( signal )
92 ESEDBTOOLS_UNREFERENCED_PARAMETER( signal )
9193
9294 esedbexport_abort = 1;
9395
109111 }
110112 /* Force stdin to close otherwise any function reading it will remain blocked
111113 */
112 if( libcsystem_file_io_close(
114 #if defined( WINAPI ) && !defined( __CYGWIN__ )
115 if( _close(
113116 0 ) != 0 )
117 #else
118 if( close(
119 0 ) != 0 )
120 #endif
114121 {
115122 libcnotify_printf(
116123 "%s: unable to close stdin.\n",
120127
121128 /* The main program
122129 */
123 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
130 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
124131 int wmain( int argc, wchar_t * const argv[] )
125132 #else
126133 int main( int argc, char * const argv[] )
127134 #endif
128135 {
129 libcstring_system_character_t *log_filename = NULL;
130 libcstring_system_character_t *option_ascii_codepage = NULL;
131 libcstring_system_character_t *option_export_mode = NULL;
132 libcstring_system_character_t *option_table_name = NULL;
133 libcstring_system_character_t *option_target_path = NULL;
134 libcstring_system_character_t *path_separator = NULL;
135 libcstring_system_character_t *source = NULL;
136 libcerror_error_t *error = NULL;
137 log_handle_t *log_handle = NULL;
138 char *program = "esedbexport";
139 size_t source_length = 0;
140 size_t option_table_name_length = 0;
141 libcstring_system_integer_t option = 0;
142 int result = 0;
143 int verbose = 0;
136 system_character_t *log_filename = NULL;
137 system_character_t *option_ascii_codepage = NULL;
138 system_character_t *option_export_mode = NULL;
139 system_character_t *option_table_name = NULL;
140 system_character_t *option_target_path = NULL;
141 system_character_t *path_separator = NULL;
142 system_character_t *source = NULL;
143 libcerror_error_t *error = NULL;
144 log_handle_t *log_handle = NULL;
145 char *program = "esedbexport";
146 size_t source_length = 0;
147 size_t option_table_name_length = 0;
148 system_integer_t option = 0;
149 int result = 0;
150 int verbose = 0;
144151
145152 libcnotify_stream_set(
146153 stderr,
158165
159166 goto on_error;
160167 }
161 if( libcsystem_initialize(
168 if( esedbtools_output_initialize(
162169 _IONBF,
163170 &error ) != 1 )
164171 {
165172 fprintf(
166173 stderr,
167 "Unable to initialize system values.\n" );
174 "Unable to initialize output settings.\n" );
168175
169176 goto on_error;
170177 }
172179 stdout,
173180 program );
174181
175 while( ( option = libcsystem_getopt(
182 while( ( option = esedbtools_getopt(
176183 argc,
177184 argv,
178 _LIBCSTRING_SYSTEM_STRING( "c:hl:m:t:T:vV" ) ) ) != (libcstring_system_integer_t) -1 )
185 _SYSTEM_STRING( "c:hl:m:t:T:vV" ) ) ) != (system_integer_t) -1 )
179186 {
180187 switch( option )
181188 {
182 case (libcstring_system_integer_t) '?':
189 case (system_integer_t) '?':
183190 default:
184191 fprintf(
185192 stderr,
186 "Invalid argument: %" PRIs_LIBCSTRING_SYSTEM "\n",
193 "Invalid argument: %" PRIs_SYSTEM "\n",
187194 argv[ optind - 1 ] );
188195
189196 usage_fprint(
191198
192199 return( EXIT_FAILURE );
193200
194 case (libcstring_system_integer_t) 'c':
201 case (system_integer_t) 'c':
195202 option_ascii_codepage = optarg;
196203
197204 break;
198205
199 case (libcstring_system_integer_t) 'h':
206 case (system_integer_t) 'h':
200207 usage_fprint(
201208 stdout );
202209
203210 return( EXIT_SUCCESS );
204211
205 case (libcstring_system_integer_t) 'l':
212 case (system_integer_t) 'l':
206213 log_filename = optarg;
207214
208215 break;
209216
210 case (libcstring_system_integer_t) 'm':
217 case (system_integer_t) 'm':
211218 option_export_mode = optarg;
212219
213220 break;
214221
215 case (libcstring_system_integer_t) 't':
222 case (system_integer_t) 't':
216223 option_target_path = optarg;
217224
218225 break;
219226
220 case (libcstring_system_integer_t) 'T':
227 case (system_integer_t) 'T':
221228 option_table_name = optarg;
222229
223230 break;
224231
225 case (libcstring_system_integer_t) 'v':
232 case (system_integer_t) 'v':
226233 verbose = 1;
227234
228235 break;
229236
230 case (libcstring_system_integer_t) 'V':
237 case (system_integer_t) 'V':
231238 esedboutput_copyright_fprint(
232239 stdout );
233240
249256
250257 if( option_target_path == NULL )
251258 {
252 source_length = libcstring_system_string_length(
259 source_length = system_string_length(
253260 source );
254261
255 path_separator = libcstring_system_string_search_character_reverse(
262 path_separator = system_string_search_character_reverse(
256263 source,
257 (libcstring_system_character_t) LIBCPATH_SEPARATOR,
264 (system_character_t) LIBCPATH_SEPARATOR,
258265 source_length );
259266
260267 if( path_separator == NULL )
269276 }
270277 if( option_table_name != NULL )
271278 {
272 option_table_name_length = libcstring_system_string_length(
279 option_table_name_length = system_string_length(
273280 option_table_name );
274281 }
275282 libcnotify_verbose_set(
374381 {
375382 fprintf(
376383 stderr,
377 "%" PRIs_LIBCSTRING_SYSTEM " already exists.\n",
384 "%" PRIs_SYSTEM " already exists.\n",
378385 esedbexport_export_handle->items_export_path );
379386
380387 goto on_error;
386393 {
387394 fprintf(
388395 stderr,
389 "Unable to open log file: %" PRIs_LIBCSTRING_SYSTEM ".\n",
396 "Unable to open log file: %" PRIs_SYSTEM ".\n",
390397 log_filename );
391398
392399 goto on_error;
396403 "Opening file.\n" );
397404
398405 #ifdef TODO_SIGNAL_ABORT
399 if( libcsystem_signal_attach(
406 if( esedbtools_signal_attach(
400407 esedbexport_signal_handler,
401408 &error ) != 1 )
402409 {
417424 {
418425 fprintf(
419426 stderr,
420 "Unable to open: %" PRIs_LIBCSTRING_SYSTEM ".\n",
427 "Unable to open: %" PRIs_SYSTEM ".\n",
421428 source );
422429
423430 goto on_error;
438445 goto on_error;
439446 }
440447 #ifdef TODO_SIGNAL_ABORT
441 if( libcsystem_signal_detach(
448 if( esedbtools_signal_detach(
442449 &error ) != 1 )
443450 {
444451 fprintf(
505512 {
506513 fprintf(
507514 stdout,
508 "Export failed no such table: %" PRIs_LIBCSTRING_SYSTEM ".\n",
515 "Export failed no such table: %" PRIs_SYSTEM ".\n",
509516 option_table_name );
510517 }
511518 else
00 /*
11 * Shows information obtained from an Extensible Storage Engine (ESE) Database (EDB) file
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2121 #include <common.h>
2222 #include <file_stream.h>
2323 #include <memory.h>
24 #include <system_string.h>
2425 #include <types.h>
2526
2627 #if defined( HAVE_UNISTD_H )
3132 #include <stdlib.h>
3233 #endif
3334
34 #include "esedboutput.h"
35 #include "esedbtools_getopt.h"
3536 #include "esedbtools_libcerror.h"
3637 #include "esedbtools_libclocale.h"
3738 #include "esedbtools_libcnotify.h"
38 #include "esedbtools_libcstring.h"
39 #include "esedbtools_libcsystem.h"
4039 #include "esedbtools_libesedb.h"
40 #include "esedbtools_output.h"
41 #include "esedbtools_signal.h"
42 #include "esedbtools_unused.h"
4143 #include "info_handle.h"
4244
4345 info_handle_t *esedbinfo_info_handle = NULL;
6769 /* Signal handler for esedbinfo
6870 */
6971 void esedbinfo_signal_handler(
70 libcsystem_signal_t signal LIBCSYSTEM_ATTRIBUTE_UNUSED )
72 esedbtools_signal_t signal ESEDBTOOLS_ATTRIBUTE_UNUSED )
7173 {
7274 libcerror_error_t *error = NULL;
7375 static char *function = "esedbinfo_signal_handler";
7476
75 LIBCSYSTEM_UNREFERENCED_PARAMETER( signal )
77 ESEDBTOOLS_UNREFERENCED_PARAMETER( signal )
7678
7779 esedbinfo_abort = 1;
7880
9496 }
9597 /* Force stdin to close otherwise any function reading it will remain blocked
9698 */
97 if( libcsystem_file_io_close(
99 #if defined( WINAPI ) && !defined( __CYGWIN__ )
100 if( _close(
98101 0 ) != 0 )
102 #else
103 if( close(
104 0 ) != 0 )
105 #endif
99106 {
100107 libcnotify_printf(
101108 "%s: unable to close stdin.\n",
105112
106113 /* The main program
107114 */
108 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
115 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
109116 int wmain( int argc, wchar_t * const argv[] )
110117 #else
111118 int main( int argc, char * const argv[] )
112119 #endif
113120 {
114 libesedb_error_t *error = NULL;
115 libcstring_system_character_t *source = NULL;
116 char *program = "esedbinfo";
117 libcstring_system_integer_t option = 0;
118 int verbose = 0;
121 libesedb_error_t *error = NULL;
122 system_character_t *source = NULL;
123 char *program = "esedbinfo";
124 system_integer_t option = 0;
125 int verbose = 0;
119126
120127 libcnotify_stream_set(
121128 stderr,
133140
134141 goto on_error;
135142 }
136 if( libcsystem_initialize(
143 if( esedbtools_output_initialize(
137144 _IONBF,
138145 &error ) != 1 )
139146 {
140147 fprintf(
141148 stderr,
142 "Unable to initialize system values.\n" );
149 "Unable to initialize output settings.\n" );
143150
144151 goto on_error;
145152 }
147154 stdout,
148155 program );
149156
150 while( ( option = libcsystem_getopt(
157 while( ( option = esedbtools_getopt(
151158 argc,
152159 argv,
153 _LIBCSTRING_SYSTEM_STRING( "hvV" ) ) ) != (libcstring_system_integer_t) -1 )
160 _SYSTEM_STRING( "hvV" ) ) ) != (system_integer_t) -1 )
154161 {
155162 switch( option )
156163 {
157 case (libcstring_system_integer_t) '?':
164 case (system_integer_t) '?':
158165 default:
159166 fprintf(
160167 stderr,
161 "Invalid argument: %" PRIs_LIBCSTRING_SYSTEM "\n",
168 "Invalid argument: %" PRIs_SYSTEM "\n",
162169 argv[ optind - 1 ] );
163170
164171 usage_fprint(
166173
167174 return( EXIT_FAILURE );
168175
169 case (libcstring_system_integer_t) 'h':
176 case (system_integer_t) 'h':
170177 usage_fprint(
171178 stdout );
172179
173180 return( EXIT_SUCCESS );
174181
175 case (libcstring_system_integer_t) 'v':
182 case (system_integer_t) 'v':
176183 verbose = 1;
177184
178185 break;
179186
180 case (libcstring_system_integer_t) 'V':
187 case (system_integer_t) 'V':
181188 esedboutput_copyright_fprint(
182189 stdout );
183190
222229 {
223230 fprintf(
224231 stderr,
225 "Unable to open: %" PRIs_LIBCSTRING_SYSTEM ".\n",
232 "Unable to open: %" PRIs_SYSTEM ".\n",
226233 source );
227234
228235 goto on_error;
+0
-151
esedbtools/esedboutput.c less more
0 /*
1 * Common output functions for the esedbtools
2 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <memory.h>
24 #include <types.h>
25
26 #include "esedboutput.h"
27 #include "esedbtools_libbfio.h"
28 #include "esedbtools_libcsystem.h"
29 #include "esedbtools_libesedb.h"
30 #include "esedbtools_libfdatetime.h"
31 #include "esedbtools_libfguid.h"
32 #include "esedbtools_libfmapi.h"
33 #include "esedbtools_libfvalue.h"
34 #include "esedbtools_libfwnt.h"
35 #include "esedbtools_libuna.h"
36
37 /* Prints the copyright information
38 */
39 void esedboutput_copyright_fprint(
40 FILE *stream )
41 {
42 if( stream == NULL )
43 {
44 return;
45 }
46 /* TRANSLATORS: This is a proper name.
47 */
48 fprintf(
49 stream,
50 _( "Copyright (C) 2009-2016, %s.\n" ),
51 _( "Joachim Metz" ) );
52
53 fprintf(
54 stream,
55 _( "This is free software; see the source for copying conditions. There is NO\n"
56 "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" ) );
57
58 /* TRANSLATORS: The placeholder indicates the bug-reporting address
59 * for this package. Please add _another line_ saying
60 * "Report translation bugs to <...>\n" with the address for translation
61 * bugs (typically your translation team's web or email address).
62 */
63 fprintf(
64 stream,
65 _( "Report bugs to <%s>.\n" ),
66 PACKAGE_BUGREPORT );
67 }
68
69 /* Prints the (basic) version information
70 */
71 void esedboutput_version_fprint(
72 FILE *stream,
73 const char *program )
74 {
75 if( stream == NULL )
76 {
77 return;
78 }
79 if( program == NULL )
80 {
81 return;
82 }
83 fprintf(
84 stream,
85 "%s %s\n\n",
86 program,
87 LIBESEDB_VERSION_STRING );
88 }
89
90 /* Prints the detailed version information
91 */
92 void esedboutput_version_detailed_fprint(
93 FILE *stream,
94 const char *program )
95 {
96 if( stream == NULL )
97 {
98 return;
99 }
100 if( program == NULL )
101 {
102 return;
103 }
104 fprintf(
105 stream,
106 "%s %s (libesedb %s",
107 program,
108 LIBESEDB_VERSION_STRING,
109 LIBESEDB_VERSION_STRING );
110
111 fprintf(
112 stream,
113 ", libuna %s",
114 LIBUNA_VERSION_STRING );
115
116 fprintf(
117 stream,
118 ", libbfio %s",
119 LIBBFIO_VERSION_STRING );
120
121 fprintf(
122 stream,
123 ", libfdatetime %s",
124 LIBFDATETIME_VERSION_STRING );
125
126 fprintf(
127 stream,
128 ", libfguid %s",
129 LIBFGUID_VERSION_STRING );
130
131 fprintf(
132 stream,
133 ", libfvalue %s",
134 LIBFVALUE_VERSION_STRING );
135
136 fprintf(
137 stream,
138 ", libfwnt %s",
139 LIBFWNT_VERSION_STRING );
140
141 fprintf(
142 stream,
143 ", libfmapi %s",
144 LIBFMAPI_VERSION_STRING );
145
146 fprintf(
147 stream,
148 ")\n\n" );
149 }
150
+0
-49
esedbtools/esedboutput.h less more
0 /*
1 * Common output functions for the esedbtools
2 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _ESEDBOUTPUT_H )
22 #define _ESEDBOUTPUT_H
23
24 #include <common.h>
25 #include <file_stream.h>
26 #include <types.h>
27
28 #if defined( __cplusplus )
29 extern "C" {
30 #endif
31
32 void esedboutput_copyright_fprint(
33 FILE *stream );
34
35 void esedboutput_version_fprint(
36 FILE *stream,
37 const char *program );
38
39 void esedboutput_version_detailed_fprint(
40 FILE *stream,
41 const char *program );
42
43 #if defined( __cplusplus )
44 }
45 #endif
46
47 #endif
48
0 /*
1 * GetOpt functions
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <narrow_string.h>
23 #include <system_string.h>
24 #include <types.h>
25 #include <wide_string.h>
26
27 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
28 #include <stdlib.h>
29 #endif
30
31 #include "esedbtools_getopt.h"
32 #include "esedbtools_libcnotify.h"
33
34 #if !defined( HAVE_GETOPT )
35
36 /* The option index
37 * Start with argument 1 (argument 0 is the program name)
38 */
39 int optind = 1;
40
41 /* The current option argument
42 */
43 system_character_t *optarg = NULL;
44
45 /* Value to indicate the current option
46 */
47 system_integer_t optopt = 0;
48
49 /* Get the program options
50 * Function for platforms that do not have the getopt function
51 * Returns the option character processed, or -1 on error,
52 * ? if the option was not in the options string, : if the option argument was missing
53 */
54 system_integer_t esedbtools_getopt(
55 int argument_count,
56 system_character_t * const argument_values[],
57 const system_character_t *options_string )
58 {
59 system_character_t *argument_value = NULL;
60 system_character_t *option_value = NULL;
61 static char *function = "esedbtools_getopt";
62 size_t options_string_length = 0;
63
64 if( optind >= argument_count )
65 {
66 return( (system_integer_t) -1 );
67 }
68 argument_value = argument_values[ optind ];
69
70 /* Check if the argument value is not an empty string
71 */
72 if( *argument_value == 0 )
73 {
74 return( (system_integer_t) -1 );
75 }
76 /* Check if the first character is a option marker '-'
77 */
78 if( *argument_value != (system_character_t) '-' )
79 {
80 return( (system_integer_t) -1 );
81 }
82 argument_value++;
83
84 /* Check if long options are provided '--'
85 */
86 if( *argument_value == (system_character_t) '-' )
87 {
88 optind++;
89
90 return( (system_integer_t) -1 );
91 }
92 options_string_length = system_string_length(
93 options_string );
94
95 optopt = *argument_value;
96 option_value = system_string_search_character(
97 options_string,
98 optopt,
99 options_string_length );
100
101 argument_value++;
102
103 /* Check if an argument was specified or that the option was not found
104 * in the option string
105 */
106 if( ( optopt == (system_integer_t) ':' )
107 || ( option_value == NULL ) )
108 {
109 if( *argument_value == (system_character_t) '\0' )
110 {
111 optind++;
112 }
113 if( ( *options_string != (system_character_t) ':' )
114 && ( optopt != (system_integer_t) '?' ) )
115 {
116 libcnotify_printf(
117 "%s: no such option: %" PRIc_SYSTEM ".\n",
118 function,
119 optopt );
120 }
121 return( (system_integer_t) '?' );
122 }
123 option_value++;
124
125 /* Check if no option argument is required
126 */
127 if( *option_value != (system_character_t) ':' )
128 {
129 optarg = NULL;
130
131 if( *argument_value == (system_character_t) '\0' )
132 {
133 optind++;
134 }
135 }
136 /* Check if the argument is right after the option flag with no space in between
137 */
138 else if( *argument_value != (system_character_t) '\0' )
139 {
140 optarg = argument_value;
141
142 optind++;
143 }
144 else
145 {
146 optind++;
147
148 /* Check if the argument was provided as the next argument value
149 */
150 if( argument_count <= optind )
151 {
152 if( *option_value == ':' )
153 {
154 return( (system_integer_t) ':' );
155 }
156 libcnotify_printf(
157 "%s: option: %" PRIc_SYSTEM " requires an argument.\n",
158 function,
159 optopt );
160
161 return( (system_integer_t) '?' );
162 }
163 optarg = argument_values[ optind ];
164
165 optind++;
166 }
167 return( optopt );
168 }
169
170 #endif /* !defined( HAVE_GETOPT ) */
171
0 /*
1 * GetOpt functions
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _ESEDBTOOLS_GETOPT_H )
22 #define _ESEDBTOOLS_GETOPT_H
23
24 #include <common.h>
25 #include <types.h>
26
27 /* unistd.h is included here to export getopt, optarg, optind and optopt
28 */
29 #if defined( HAVE_UNISTD_H )
30 #include <unistd.h>
31 #endif
32
33 #if defined( __cplusplus )
34 extern "C" {
35 #endif
36
37 #if defined( HAVE_GETOPT )
38 #define esedbtools_getopt( argument_count, argument_values, options_string ) \
39 getopt( argument_count, argument_values, options_string )
40
41 #else
42
43 #if !defined( __CYGWIN__ )
44 extern int optind;
45 extern system_character_t *optarg;
46 extern system_integer_t optopt;
47
48 #else
49 int optind;
50 system_character_t *optarg;
51 system_integer_t optopt;
52
53 #endif /* !defined( __CYGWIN__ ) */
54
55 system_integer_t esedbtools_getopt(
56 int argument_count,
57 system_character_t * const argument_values[],
58 const system_character_t *options_string );
59
60 #endif /* defined( HAVE_GETOPT ) */
61
62 #if defined( __cplusplus )
63 }
64 #endif
65
66 #endif /* !defined( _ESEDBTOOLS_GETOPT_H ) */
67
0 /*
1 * Internationalization (i18n) functions
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _ESEDBTOOLS_I18N_H )
22 #define _ESEDBTOOLS_I18N_H
23
24 #include <common.h>
25
26 #if defined( HAVE_LIBINTL_H )
27 #include <libintl.h>
28 #endif
29
30 #if defined( __cplusplus )
31 extern "C" {
32 #endif
33
34 /* TODO for now do nothing i18n-like
35 #define _( string ) \
36 gettext( string )
37 */
38
39 #define _( string ) \
40 string
41
42 #if defined( __cplusplus )
43 }
44 #endif
45
46 #endif /* !defined( _ESEDBTOOLS_I18N_H ) */
47
00 /*
11 * The libbfio header wrapper
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal libcerror header
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal libcfile header
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal libclocale header
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal libcnotify header
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal libcpath header
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
+0
-51
esedbtools/esedbtools_libcstring.h less more
0 /*
1 * The internal libcstring header
2 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _ESEDBTOOLS_LIBCSTRING_H )
22 #define _ESEDBTOOLS_LIBCSTRING_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring
27 */
28 #if defined( HAVE_LOCAL_LIBCSTRING )
29
30 #include <libcstring_definitions.h>
31 #include <libcstring_narrow_string.h>
32 #include <libcstring_system_string.h>
33 #include <libcstring_types.h>
34 #include <libcstring_wide_string.h>
35
36 #else
37
38 /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT
39 * before including libcstring.h
40 */
41 #if defined( _WIN32 ) && defined( DLL_IMPORT ) && !defined( HAVE_STATIC_EXECUTABLES )
42 #define LIBCSTRING_DLL_IMPORT
43 #endif
44
45 #include <libcstring.h>
46
47 #endif /* defined( HAVE_LOCAL_LIBCSTRING ) */
48
49 #endif /* !defined( _ESEDBTOOLS_LIBCSTRING_H ) */
50
+0
-54
esedbtools/esedbtools_libcsystem.h less more
0 /*
1 * Library for system independent implementation of functionality
2 * for programs
3 *
4 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
5 *
6 * Refer to AUTHORS for acknowledgements.
7 *
8 * This software is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This software is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this software. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22 #if !defined( _ESEDBTOOLS_LIBCSYSTEM_H )
23 #define _ESEDBTOOLS_LIBCSYSTEM_H
24
25 /* Define HAVE_LOCAL_LIBCSYSTEM for local use of libcsystem
26 */
27 #if defined( HAVE_LOCAL_LIBCSYSTEM )
28
29 #include <libcsystem_definitions.h>
30 #include <libcsystem_file_io.h>
31 #include <libcsystem_getopt.h>
32 #include <libcsystem_glob.h>
33 #include <libcsystem_i18n.h>
34 #include <libcsystem_signal.h>
35 #include <libcsystem_string.h>
36 #include <libcsystem_support.h>
37 #include <libcsystem_unused.h>
38
39 #else
40
41 /* If libtool DLL support is enabled set LIBCSYSTEM_DLL_IMPORT
42 * before including libcsystem.h
43 */
44 #if defined( _WIN32 ) && defined( DLL_IMPORT ) && !defined( HAVE_STATIC_EXECUTABLES )
45 #define LIBCSYSTEM_DLL_IMPORT
46 #endif
47
48 #include <libcsystem.h>
49
50 #endif /* defined( HAVE_LOCAL_LIBCSYSTEM ) */
51
52 #endif /* !defined( _ESEDBTOOLS_LIBCSYSTEM_H ) */
53
00 /*
11 * The internal libesedb header
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2626 /* If Cygwin libtool DLL support is enabled set LIBESEDB_DLL_IMPORT
2727 * before including libesedb.h
2828 */
29 #if defined( _WIN32 ) && defined( DLL_EXPORT )
29 #if defined( _WIN32 ) && defined( DLL_IMPORT ) && !defined( HAVE_STATIC_EXECUTABLES )
3030 #define LIBESEDB_DLL_IMPORT
3131 #endif
3232
3333 #include <libesedb.h>
3434
35 #endif
35 #endif /* !defined( _ESEDBTOOLS_LIBESEDB_H ) */
3636
00 /*
11 * The libfdatetime header wrapper
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The libfguid header wrapper
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The libfmapi header wrapper
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The libfvalue header wrapper
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The libfwnt header wrapper
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The libuna header wrapper
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * This software is free software: you can redistribute it and/or modify
66 * it under the terms of the GNU Lesser General Public License as published by
0 /*
1 * Common output functions for the esedbtools
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <memory.h>
24 #include <types.h>
25
26 #include "esedbtools_i18n.h"
27 #include "esedbtools_libbfio.h"
28 #include "esedbtools_libcerror.h"
29 #include "esedbtools_libesedb.h"
30 #include "esedbtools_libfdatetime.h"
31 #include "esedbtools_libfguid.h"
32 #include "esedbtools_libfmapi.h"
33 #include "esedbtools_libfvalue.h"
34 #include "esedbtools_libfwnt.h"
35 #include "esedbtools_libuna.h"
36 #include "esedbtools_output.h"
37
38 /* Initializes output settings
39 * Returns 1 if successful or -1 on error
40 */
41 int esedbtools_output_initialize(
42 int stdio_mode,
43 libcerror_error_t **error )
44 {
45 static char *function = "esedbtools_output_initialize";
46
47 if( ( stdio_mode != _IOFBF )
48 && ( stdio_mode != _IOLBF )
49 && ( stdio_mode != _IONBF ) )
50 {
51 libcerror_error_set(
52 error,
53 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
54 LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,
55 "%s: unsupported standard IO mode.",
56 function );
57
58 return( -1 );
59 }
60 #if !defined( __BORLANDC__ )
61 if( setvbuf(
62 stdout,
63 NULL,
64 stdio_mode,
65 0 ) != 0 )
66 {
67 libcerror_error_set(
68 error,
69 LIBCERROR_ERROR_DOMAIN_RUNTIME,
70 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
71 "%s: unable to set IO mode of stdout.",
72 function );
73
74 return( -1 );
75 }
76 if( setvbuf(
77 stderr,
78 NULL,
79 stdio_mode,
80 0 ) != 0 )
81 {
82 libcerror_error_set(
83 error,
84 LIBCERROR_ERROR_DOMAIN_RUNTIME,
85 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
86 "%s: unable to set IO mode of stderr.",
87 function );
88
89 return( -1 );
90 }
91 #endif /* !defined( __BORLANDC__ ) */
92
93 return( 1 );
94 }
95
96 /* Prints the copyright information
97 */
98 void esedboutput_copyright_fprint(
99 FILE *stream )
100 {
101 if( stream == NULL )
102 {
103 return;
104 }
105 /* TRANSLATORS: This is a proper name.
106 */
107 fprintf(
108 stream,
109 _( "Copyright (C) 2009-2017, %s.\n" ),
110 _( "Joachim Metz" ) );
111
112 fprintf(
113 stream,
114 _( "This is free software; see the source for copying conditions. There is NO\n"
115 "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" ) );
116
117 /* TRANSLATORS: The placeholder indicates the bug-reporting address
118 * for this package. Please add _another line_ saying
119 * "Report translation bugs to <...>\n" with the address for translation
120 * bugs (typically your translation team's web or email address).
121 */
122 fprintf(
123 stream,
124 _( "Report bugs to <%s>.\n" ),
125 PACKAGE_BUGREPORT );
126 }
127
128 /* Prints the (basic) version information
129 */
130 void esedboutput_version_fprint(
131 FILE *stream,
132 const char *program )
133 {
134 if( stream == NULL )
135 {
136 return;
137 }
138 if( program == NULL )
139 {
140 return;
141 }
142 fprintf(
143 stream,
144 "%s %s\n\n",
145 program,
146 LIBESEDB_VERSION_STRING );
147 }
148
149 /* Prints the detailed version information
150 */
151 void esedboutput_version_detailed_fprint(
152 FILE *stream,
153 const char *program )
154 {
155 if( stream == NULL )
156 {
157 return;
158 }
159 if( program == NULL )
160 {
161 return;
162 }
163 fprintf(
164 stream,
165 "%s %s (libesedb %s",
166 program,
167 LIBESEDB_VERSION_STRING,
168 LIBESEDB_VERSION_STRING );
169
170 fprintf(
171 stream,
172 ", libuna %s",
173 LIBUNA_VERSION_STRING );
174
175 fprintf(
176 stream,
177 ", libbfio %s",
178 LIBBFIO_VERSION_STRING );
179
180 fprintf(
181 stream,
182 ", libfdatetime %s",
183 LIBFDATETIME_VERSION_STRING );
184
185 fprintf(
186 stream,
187 ", libfguid %s",
188 LIBFGUID_VERSION_STRING );
189
190 fprintf(
191 stream,
192 ", libfvalue %s",
193 LIBFVALUE_VERSION_STRING );
194
195 fprintf(
196 stream,
197 ", libfwnt %s",
198 LIBFWNT_VERSION_STRING );
199
200 fprintf(
201 stream,
202 ", libfmapi %s",
203 LIBFMAPI_VERSION_STRING );
204
205 fprintf(
206 stream,
207 ")\n\n" );
208 }
209
0 /*
1 * Common output functions for the esedbtools
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _ESEDBTOOLS_OUTPUT_H )
22 #define _ESEDBTOOLS_OUTPUT_H
23
24 #include <common.h>
25 #include <file_stream.h>
26 #include <types.h>
27
28 #include "esedbtools_libcerror.h"
29
30 #if defined( __cplusplus )
31 extern "C" {
32 #endif
33
34 int esedbtools_output_initialize(
35 int stdio_mode,
36 libcerror_error_t **error );
37
38 void esedboutput_copyright_fprint(
39 FILE *stream );
40
41 void esedboutput_version_fprint(
42 FILE *stream,
43 const char *program );
44
45 void esedboutput_version_detailed_fprint(
46 FILE *stream,
47 const char *program );
48
49 #if defined( __cplusplus )
50 }
51 #endif
52
53 #endif /* !defined( _ESEDBTOOLS_OUTPUT_H ) */
54
0 /*
1 * Signal handling functions
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <types.h>
23
24 #if defined( HAVE_SIGNAL_H )
25 #include <signal.h>
26 #endif
27
28 #if defined( _MSC_VER )
29 #include <crtdbg.h>
30 #endif
31
32 #include "esedbtools_libcerror.h"
33 #include "esedbtools_signal.h"
34
35 #if defined( WINAPI )
36
37 void (*esedbtools_signal_signal_handler)( esedbtools_signal_t ) = NULL;
38
39 /* Signal handler for Ctrl+C or Ctrl+Break signals
40 */
41 BOOL WINAPI esedbtools_signal_handler(
42 unsigned long signal )
43 {
44 static char *function = "esedbtools_signal_handler";
45
46 switch( signal )
47 {
48 /* use Ctrl+C or Ctrl+Break to simulate SERVICE_CONTROL_STOP in debug mode
49 */
50 case CTRL_BREAK_EVENT:
51 case CTRL_C_EVENT:
52 if( esedbtools_signal_signal_handler != NULL )
53 {
54 esedbtools_signal_signal_handler(
55 signal );
56 }
57 return( TRUE );
58
59 default:
60 break;
61 }
62 return( FALSE );
63 }
64
65 #if defined( _MSC_VER )
66
67 /* Initialize memory usage and leakage debugging
68 */
69 void esedbtools_signal_initialize_memory_debug(
70 void )
71 {
72 int flag = 0;
73
74 /* Get the current state of the flag and store it in a temporary variable
75 */
76 flag = _CrtSetDbgFlag(
77 _CRTDBG_REPORT_FLAG );
78
79 /* Turn on client block identifiers and automatic leak detection
80 */
81 flag |= ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
82
83 /* Set the new state for the flag
84 */
85 _CrtSetDbgFlag(
86 flag );
87 }
88
89 #endif /* defined( _MSC_VER ) */
90
91 /* Attaches a signal handler for Ctrl+C or Ctrl+Break signals
92 * Returns 1 if successful or -1 on error
93 */
94 int esedbtools_signal_attach(
95 void (*signal_handler)( esedbtools_signal_t ),
96 libcerror_error_t **error )
97 {
98 static char *function = "esedbtools_signal_attach";
99
100 if( signal_handler == NULL )
101 {
102 libcerror_error_set(
103 error,
104 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
105 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
106 "%s: invalid signal handler.",
107 function );
108
109 return( -1 );
110 }
111 esedbtools_signal_signal_handler = signal_handler;
112
113 if( SetConsoleCtrlHandler(
114 esedbtools_signal_handler,
115 TRUE ) == 0 )
116 {
117 libcerror_error_set(
118 error,
119 LIBCERROR_ERROR_DOMAIN_RUNTIME,
120 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
121 "%s: unable to attach signal handler.",
122 function );
123
124 return( -1 );
125 }
126 if( SetConsoleCtrlHandler(
127 NULL,
128 FALSE ) == 0 )
129 {
130 libcerror_error_set(
131 error,
132 LIBCERROR_ERROR_DOMAIN_RUNTIME,
133 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
134 "%s: unable to attach break signal.",
135 function );
136
137 return( -1 );
138 }
139 #if defined( _MSC_VER )
140 esedbtools_signal_initialize_memory_debug();
141 #endif
142
143 SetErrorMode(
144 SEM_FAILCRITICALERRORS );
145
146 #if defined( LOCALE_SUPPORT )
147 /* Allow subsequent threads to have their own locale.
148 * If the application is single threaded this call has
149 * no practical effect.
150 */
151 _configthreadlocale(
152 _ENABLE_PER_THREAD_LOCALE );
153
154 /* Set the current thread locale to the user default
155 * ANSI code page.
156 */
157 setlocale(
158 LC_ALL,
159 "" );
160
161 /* Set the the code page used by multibyte functions
162 * to use the same code page as the previous call to setlocale.
163 */
164 _setmbcp(
165 _MB_CP_LOCALE );
166
167 #endif /* defined( LOCALE_SUPPORT ) */
168
169 return( 1 );
170 }
171
172 /* Detaches a signal handler for Ctrl+C or Ctrl+Break signals
173 * Returns 1 if successful or -1 on error
174 */
175 int esedbtools_signal_detach(
176 libcerror_error_t **error )
177 {
178 static char *function = "esedbtools_signal_detach";
179
180 if( SetConsoleCtrlHandler(
181 esedbtools_signal_handler,
182 FALSE ) == 0 )
183 {
184 libcerror_error_set(
185 error,
186 LIBCERROR_ERROR_DOMAIN_RUNTIME,
187 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
188 "%s: unable to detach signal handler.",
189 function );
190
191 return( -1 );
192 }
193 esedbtools_signal_signal_handler = NULL;
194
195 return( 1 );
196 }
197
198 #else
199
200 /* Attaches a signal handler for SIGINT
201 * Returns 1 if successful or -1 on error
202 */
203 int esedbtools_signal_attach(
204 void (*signal_handler)( esedbtools_signal_t ),
205 libcerror_error_t **error )
206 {
207 static char *function = "esedbtools_signal_attach";
208
209 if( signal_handler == NULL )
210 {
211 libcerror_error_set(
212 error,
213 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
214 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
215 "%s: invalid signal handler.",
216 function );
217
218 return( -1 );
219 }
220 if( signal(
221 SIGINT,
222 signal_handler ) == SIG_ERR )
223 {
224 libcerror_error_set(
225 error,
226 LIBCERROR_ERROR_DOMAIN_RUNTIME,
227 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
228 "%s: unable to attach signal handler.",
229 function );
230
231 return( -1 );
232 }
233 return( 1 );
234 }
235
236 /* Detaches a signal handler for SIGINT
237 * Returns 1 if successful or -1 on error
238 */
239 int esedbtools_signal_detach(
240 libcerror_error_t **error )
241 {
242 static char *function = "esedbtools_signal_detach";
243
244 if( signal(
245 SIGINT,
246 SIG_DFL ) == SIG_ERR )
247 {
248 libcerror_error_set(
249 error,
250 LIBCERROR_ERROR_DOMAIN_RUNTIME,
251 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
252 "%s: unable to detach signal handler.",
253 function );
254
255 return( -1 );
256 }
257 return( 1 );
258 }
259
260 #endif /* defined( WINAPI ) */
261
0 /*
1 * Signal handling functions
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _ESEDBTOOLS_SIGNAL_H )
22 #define _ESEDBTOOLS_SIGNAL_H
23
24 #include <common.h>
25 #include <types.h>
26
27 #include "esedbtools_libcerror.h"
28
29 #if defined( __cplusplus )
30 extern "C" {
31 #endif
32
33 #if !defined( HAVE_SIGNAL_H ) && !defined( WINAPI )
34 #error missing signal functions
35 #endif
36
37 #if defined( WINAPI )
38 typedef unsigned long esedbtools_signal_t;
39
40 #else
41 typedef int esedbtools_signal_t;
42
43 #endif /* defined( WINAPI ) */
44
45 #if defined( WINAPI )
46
47 BOOL WINAPI esedbtools_signal_handler(
48 esedbtools_signal_t signal );
49
50 #if defined( _MSC_VER )
51
52 void esedbtools_signal_initialize_memory_debug(
53 void );
54
55 #endif /* defined( _MSC_VER ) */
56
57 #endif /* defined( WINAPI ) */
58
59 int esedbtools_signal_attach(
60 void (*signal_handler)( esedbtools_signal_t ),
61 libcerror_error_t **error );
62
63 int esedbtools_signal_detach(
64 libcerror_error_t **error );
65
66 #if defined( __cplusplus )
67 }
68 #endif
69
70 #endif /* !defined( _ESEDBTOOLS_SIGNAL_H ) */
71
0 /*
1 * Character string functions
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <types.h>
23
24 #include "esedbtools_libcerror.h"
25
26 /* Copies a string of a decimal value from a 64-bit value
27 * Returns 1 if successful or -1 on error
28 */
29 int esedbtools_system_string_copy_from_64_bit_in_decimal(
30 system_character_t *string,
31 size_t string_size,
32 size_t *string_index,
33 uint64_t value_64bit,
34 libcerror_error_t **error )
35 {
36 static char *function = "esedbtools_system_string_copy_from_64_bit_in_decimal";
37 uint64_t divider = 0;
38 uint8_t number_of_characters = 0;
39
40 if( string == NULL )
41 {
42 libcerror_error_set(
43 error,
44 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
45 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
46 "%s: invalid string.",
47 function );
48
49 return( -1 );
50 }
51 if( string_size > (size_t) SSIZE_MAX )
52 {
53 libcerror_error_set(
54 error,
55 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
56 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
57 "%s: invalid string size value exceeds maximum.",
58 function );
59
60 return( -1 );
61 }
62 if( string_index == NULL )
63 {
64 libcerror_error_set(
65 error,
66 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
67 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
68 "%s: invalid string index.",
69 function );
70
71 return( -1 );
72 }
73 if( *string_index >= string_size )
74 {
75 libcerror_error_set(
76 error,
77 LIBCERROR_ERROR_DOMAIN_RUNTIME,
78 LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,
79 "%s: invalid string index value out of bounds.",
80 function );
81
82 return( -1 );
83 }
84 divider = 1;
85 number_of_characters = 1;
86
87 while( ( value_64bit / divider ) >= 10 )
88 {
89 divider *= 10;
90
91 number_of_characters += 1;
92 }
93 if( ( *string_index + number_of_characters ) >= string_size )
94 {
95 libcerror_error_set(
96 error,
97 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
98 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
99 "%s: string size too small.",
100 function );
101
102 return( -1 );
103 }
104 while( divider > 1 )
105 {
106 string[ *string_index ] = (uint8_t) '0' + (uint8_t) ( value_64bit / divider );
107
108 *string_index += 1;
109
110 value_64bit %= divider;
111
112 divider /= 10;
113 }
114 string[ *string_index ] = (uint8_t) '0' + (uint8_t) ( value_64bit / divider );
115
116 *string_index += 1;
117
118 return( 1 );
119 }
120
0 /*
1 * System character string functions
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _ESEDBTOOLS_SYSTEM_STRING_H )
22 #define _ESEDBTOOLS_SYSTEM_STRING_H
23
24 #include <common.h>
25 #include <types.h>
26
27 #include "esedbtools_libcerror.h"
28
29 #if defined( __cplusplus )
30 extern "C" {
31 #endif
32
33 int esedbtools_system_string_copy_from_64_bit_in_decimal(
34 system_character_t *string,
35 size_t string_size,
36 size_t *string_index,
37 uint64_t value_64bit,
38 libcerror_error_t **error );
39
40 #if defined( __cplusplus )
41 }
42 #endif
43
44 #endif /* !defined( _ESEDBTOOLS_SYSTEM_STRING_H ) */
45
0 /*
1 * The unused definition
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _ESEDBTOOLS_UNUSED_H )
22 #define _ESEDBTOOLS_UNUSED_H
23
24 #include <common.h>
25
26 #if !defined( ESEDBTOOLS_ATTRIBUTE_UNUSED )
27
28 #if defined( __GNUC__ ) && __GNUC__ >= 3
29 #define ESEDBTOOLS_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
30
31 #else
32 #define ESEDBTOOLS_ATTRIBUTE_UNUSED
33
34 #endif /* defined( __GNUC__ ) && __GNUC__ >= 3 */
35
36 #endif /* !defined( ESEDBTOOLS_ATTRIBUTE_UNUSED ) */
37
38 #if defined( _MSC_VER )
39 #define ESEDBTOOLS_UNREFERENCED_PARAMETER( parameter ) \
40 UNREFERENCED_PARAMETER( parameter );
41
42 #else
43 #define ESEDBTOOLS_UNREFERENCED_PARAMETER( parameter ) \
44 /* parameter */
45
46 #endif /* defined( _MSC_VER ) */
47
48 #endif /* !defined( _ESEDBTOOLS_UNUSED_H ) */
49
2222 #include <byte_stream.h>
2323 #include <file_stream.h>
2424 #include <memory.h>
25 #include <narrow_string.h>
26 #include <system_string.h>
2527 #include <types.h>
28 #include <wide_string.h>
2629
2730 #include "esedbtools_libcerror.h"
2831 #include "esedbtools_libcnotify.h"
29 #include "esedbtools_libcstring.h"
3032 #include "esedbtools_libesedb.h"
3133 #include "esedbtools_libfdatetime.h"
3234 #include "esedbtools_libfguid.h"
6668 uint32_t column_type = 0;
6769
6870 #if defined( HAVE_DEBUG_OUTPUT ) && defined( HAVE_LOCAL_LIBFMAPI )
69 libcstring_system_character_t column_name[ 256 ];
71 system_character_t column_name[ 256 ];
7072
7173 int result = 0;
7274 #endif
174176 #if defined( HAVE_DEBUG_OUTPUT )
175177 if( libcnotify_verbose != 0 )
176178 {
177 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
179 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
178180 result = libesedb_record_get_utf16_column_name(
179181 record,
180182 record_value_entry,
202204 goto on_error;
203205 }
204206 libcnotify_printf(
205 "%s: column name: %" PRIs_LIBCSTRING_SYSTEM "\n",
207 "%s: column name: %" PRIs_SYSTEM "\n",
206208 function,
207209 column_name );
208210
645647 FILE *record_file_stream,
646648 libcerror_error_t **error )
647649 {
648 libcstring_system_character_t filetime_string[ 32 ];
650 system_character_t filetime_string[ 32 ];
649651
650652 libfdatetime_filetime_t *filetime = NULL;
651653 uint8_t *value_data = NULL;
817819
818820 goto on_error;
819821 }
820 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
822 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
821823 result = libfdatetime_filetime_copy_to_utf16_string(
822824 filetime,
823825 (uint16_t *) filetime_string,
858860 }
859861 fprintf(
860862 record_file_stream,
861 "%" PRIs_LIBCSTRING_SYSTEM "",
863 "%" PRIs_SYSTEM "",
862864 filetime_string );
863865 }
864866 }
899901 FILE *record_file_stream,
900902 libcerror_error_t **error )
901903 {
902 libcstring_system_character_t guid_string[ 48 ];
904 system_character_t guid_string[ 48 ];
903905
904906 libfguid_identifier_t *guid = NULL;
905907 uint8_t *value_data = NULL;
10601062
10611063 goto on_error;
10621064 }
1063 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1065 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
10641066 result = libfguid_identifier_copy_to_utf16_string(
10651067 guid,
10661068 (uint16_t *) guid_string,
11011103 }
11021104 fprintf(
11031105 record_file_stream,
1104 "%" PRIs_LIBCSTRING_SYSTEM "",
1106 "%" PRIs_SYSTEM "",
11051107 guid_string );
11061108 }
11071109 }
11561158 uint8_t value_data_flags = 0;
11571159
11581160 #if defined( HAVE_DEBUG_OUTPUT ) && defined( HAVE_LOCAL_LIBFMAPI )
1159 libcstring_system_character_t column_name[ 256 ];
1161 system_character_t column_name[ 256 ];
11601162
11611163 int result = 0;
11621164 #endif
12851287 #if defined( HAVE_DEBUG_OUTPUT ) && defined( HAVE_LOCAL_LIBFMAPI )
12861288 if( libcnotify_verbose != 0 )
12871289 {
1288 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1290 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
12891291 result = libesedb_record_get_utf16_column_name(
12901292 record,
12911293 record_value_entry,
13131315 goto on_error;
13141316 }
13151317 libcnotify_printf(
1316 "%s: column name: %" PRIs_LIBCSTRING_SYSTEM "\n",
1318 "%s: column name: %" PRIs_SYSTEM "\n",
13171319 function,
13181320 column_name );
13191321
13891391 int number_of_multi_values = 0;
13901392
13911393 #if defined( HAVE_DEBUG_OUTPUT ) && defined( HAVE_LOCAL_LIBFMAPI )
1392 libcstring_system_character_t column_name[ 256 ];
1394 system_character_t column_name[ 256 ];
13931395
13941396 int result = 0;
13951397 #endif
15181520 #if defined( HAVE_DEBUG_OUTPUT ) && defined( HAVE_LOCAL_LIBFMAPI )
15191521 if( libcnotify_verbose != 0 )
15201522 {
1521 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1523 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
15221524 result = libesedb_record_get_utf16_column_name(
15231525 record,
15241526 record_value_entry,
15461548 goto on_error;
15471549 }
15481550 libcnotify_printf(
1549 "%s: column name: %" PRIs_LIBCSTRING_SYSTEM "\n",
1551 "%s: column name: %" PRIs_SYSTEM "\n",
15501552 function,
15511553 column_name );
15521554 }
17041706 FILE *record_file_stream,
17051707 libcerror_error_t **error )
17061708 {
1707 libcstring_system_character_t sid_string[ 128 ];
1709 system_character_t sid_string[ 128 ];
17081710
17091711 libfwnt_security_identifier_t *sid = NULL;
17101712 uint8_t *value_data = NULL;
18951897
18961898 goto on_error;
18971899 }
1898 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1900 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
18991901 result = libfwnt_security_identifier_copy_to_utf16_string(
19001902 sid,
19011903 (uint16_t *) sid_string,
19361938 }
19371939 fprintf(
19381940 record_file_stream,
1939 "%" PRIs_LIBCSTRING_SYSTEM "",
1941 "%" PRIs_SYSTEM "",
19401942 sid_string );
19411943 }
19421944 }
21112113 log_handle_t *log_handle,
21122114 libcerror_error_t **error )
21132115 {
2114 libcstring_system_character_t column_name[ 256 ];
2116 system_character_t column_name[ 256 ];
21152117
21162118 static char *function = "exchange_export_record_folders";
21172119 size_t column_name_size = 0;
21622164 value_entry < number_of_values;
21632165 value_entry++ )
21642166 {
2165 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
2167 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
21662168 result = libesedb_record_get_utf16_column_name_size(
21672169 record,
21682170 value_entry,
22022204
22032205 return( -1 );
22042206 }
2205 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
2207 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
22062208 result = libesedb_record_get_utf16_column_name(
22072209 record,
22082210 value_entry,
22522254 if( ( column_name_size > 1 )
22532255 && ( column_name_size < 8 ) )
22542256 {
2255 if( column_name[ 0 ] == (libcstring_system_character_t) 'T' )
2257 if( column_name[ 0 ] == (system_character_t) 'T' )
22562258 {
22572259 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME;
22582260 }
2259 else if( column_name[ 0 ] == (libcstring_system_character_t) 'Q' )
2261 else if( column_name[ 0 ] == (system_character_t) 'Q' )
22602262 {
22612263 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT;
22622264 }
22682270 if( ( column_name_size > 1 )
22692271 && ( column_name_size < 8 ) )
22702272 {
2271 if( column_name[ 0 ] == (libcstring_system_character_t) 'L' )
2273 if( column_name[ 0 ] == (system_character_t) 'L' )
22722274 {
22732275 /* TODO
22742276 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_32BIT;
22752277 */
22762278 }
2277 else if( column_name[ 0 ] == (libcstring_system_character_t) 'S' )
2279 else if( column_name[ 0 ] == (system_character_t) 'S' )
22782280 {
22792281 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_STRING;
22802282 }
2281 else if( column_name[ 0 ] == (libcstring_system_character_t) 'T' )
2283 else if( column_name[ 0 ] == (system_character_t) 'T' )
22822284 {
22832285 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME;
22842286 }
2285 else if( column_name[ 0 ] == (libcstring_system_character_t) 'Q' )
2287 else if( column_name[ 0 ] == (system_character_t) 'Q' )
22862288 {
22872289 byte_order = _BYTE_STREAM_ENDIAN_BIG;
22882290 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT;
22892291 }
22902292 else if( column_name_size == 5 )
22912293 {
2292 if( libcstring_system_string_compare(
2294 if( system_string_compare(
22932295 column_name,
2294 _LIBCSTRING_SYSTEM_STRING( "Ne58" ),
2296 _SYSTEM_STRING( "Ne58" ),
22952297 4 ) == 0 )
22962298 {
22972299 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_SID;
22982300 }
2299 else if( libcstring_system_string_compare(
2301 else if( system_string_compare(
23002302 column_name,
2301 _LIBCSTRING_SYSTEM_STRING( "Ne59" ),
2303 _SYSTEM_STRING( "Ne59" ),
23022304 4 ) == 0 )
23032305 {
23042306 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_SID;
23062308 }
23072309 else if( column_name_size == 6 )
23082310 {
2309 if( libcstring_system_string_compare(
2311 if( system_string_compare(
23102312 column_name,
2311 _LIBCSTRING_SYSTEM_STRING( "N3616" ),
2313 _SYSTEM_STRING( "N3616" ),
23122314 5 ) == 0 )
23132315 {
23142316 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_MAPI_ENTRYID;
23152317 }
2316 else if( libcstring_system_string_compare(
2318 else if( system_string_compare(
23172319 column_name,
2318 _LIBCSTRING_SYSTEM_STRING( "N36d0" ),
2320 _SYSTEM_STRING( "N36d0" ),
23192321 5 ) == 0 )
23202322 {
23212323 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_MAPI_ENTRYID;
23222324 }
2323 else if( libcstring_system_string_compare(
2325 else if( system_string_compare(
23242326 column_name,
2325 _LIBCSTRING_SYSTEM_STRING( "N36d1" ),
2327 _SYSTEM_STRING( "N36d1" ),
23262328 5 ) == 0 )
23272329 {
23282330 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_MAPI_ENTRYID;
23292331 }
2330 else if( libcstring_system_string_compare(
2332 else if( system_string_compare(
23312333 column_name,
2332 _LIBCSTRING_SYSTEM_STRING( "N36d2" ),
2334 _SYSTEM_STRING( "N36d2" ),
23332335 5 ) == 0 )
23342336 {
23352337 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_MAPI_ENTRYID;
23362338 }
2337 else if( libcstring_system_string_compare(
2339 else if( system_string_compare(
23382340 column_name,
2339 _LIBCSTRING_SYSTEM_STRING( "N36d3" ),
2341 _SYSTEM_STRING( "N36d3" ),
23402342 5 ) == 0 )
23412343 {
23422344 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_MAPI_ENTRYID;
23432345 }
2344 else if( libcstring_system_string_compare(
2346 else if( system_string_compare(
23452347 column_name,
2346 _LIBCSTRING_SYSTEM_STRING( "N36d4" ),
2348 _SYSTEM_STRING( "N36d4" ),
23472349 5 ) == 0 )
23482350 {
23492351 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_MAPI_ENTRYID;
23502352 }
2351 else if( libcstring_system_string_compare(
2353 else if( system_string_compare(
23522354 column_name,
2353 _LIBCSTRING_SYSTEM_STRING( "N36d5" ),
2355 _SYSTEM_STRING( "N36d5" ),
23542356 5 ) == 0 )
23552357 {
23562358 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_MAPI_ENTRYID;
23572359 }
2358 else if( libcstring_system_string_compare(
2360 else if( system_string_compare(
23592361 column_name,
2360 _LIBCSTRING_SYSTEM_STRING( "N36d7" ),
2362 _SYSTEM_STRING( "N36d7" ),
23612363 5 ) == 0 )
23622364 {
23632365 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_MAPI_ENTRYID;
23642366 }
2365 else if( libcstring_system_string_compare(
2367 else if( system_string_compare(
23662368 column_name,
2367 _LIBCSTRING_SYSTEM_STRING( "N36dc" ),
2369 _SYSTEM_STRING( "N36dc" ),
23682370 5 ) == 0 )
23692371 {
23702372 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_MAPI_ENTRYID;
23712373 }
2372 else if( libcstring_system_string_compare(
2374 else if( system_string_compare(
23732375 column_name,
2374 _LIBCSTRING_SYSTEM_STRING( "N3880" ),
2376 _SYSTEM_STRING( "N3880" ),
23752377 5 ) == 0 )
23762378 {
23772379 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_GUID;
24862488 log_handle_t *log_handle,
24872489 libcerror_error_t **error )
24882490 {
2489 libcstring_system_character_t column_name[ 256 ];
2491 system_character_t column_name[ 256 ];
24902492
24912493 static char *function = "exchange_export_record_global";
24922494 size_t column_name_size = 0;
25372539 value_entry < number_of_values;
25382540 value_entry++ )
25392541 {
2540 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
2542 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
25412543 result = libesedb_record_get_utf16_column_name_size(
25422544 record,
25432545 value_entry,
25772579
25782580 return( -1 );
25792581 }
2580 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
2582 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
25812583 result = libesedb_record_get_utf16_column_name(
25822584 record,
25832585 value_entry,
26272629 if( ( column_name_size > 1 )
26282630 && ( column_name_size < 8 ) )
26292631 {
2630 if( column_name[ 0 ] == (libcstring_system_character_t) 'T' )
2632 if( column_name[ 0 ] == (system_character_t) 'T' )
26312633 {
26322634 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME;
26332635 }
2634 else if( column_name[ 0 ] == (libcstring_system_character_t) 'Q' )
2636 else if( column_name[ 0 ] == (system_character_t) 'Q' )
26352637 {
26362638 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT;
26372639 }
26432645 if( ( column_name_size > 1 )
26442646 && ( column_name_size < 8 ) )
26452647 {
2646 if( column_name[ 0 ] == (libcstring_system_character_t) 'L' )
2648 if( column_name[ 0 ] == (system_character_t) 'L' )
26472649 {
26482650 /* TODO
26492651 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_32BIT;
26502652 */
26512653 }
2652 else if( column_name[ 0 ] == (libcstring_system_character_t) 'S' )
2654 else if( column_name[ 0 ] == (system_character_t) 'S' )
26532655 {
26542656 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_STRING;
26552657 }
2656 else if( column_name[ 0 ] == (libcstring_system_character_t) 'T' )
2658 else if( column_name[ 0 ] == (system_character_t) 'T' )
26572659 {
26582660 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME;
26592661 }
2660 else if( column_name[ 0 ] == (libcstring_system_character_t) 'Q' )
2662 else if( column_name[ 0 ] == (system_character_t) 'Q' )
26612663 {
26622664 byte_order = _BYTE_STREAM_ENDIAN_BIG;
26632665 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT;
26642666 }
26652667 else if( column_name_size == 6 )
26662668 {
2667 if( libcstring_system_string_compare(
2669 if( system_string_compare(
26682670 column_name,
2669 _LIBCSTRING_SYSTEM_STRING( "N6762" ),
2671 _SYSTEM_STRING( "N6762" ),
26702672 5 ) == 0 )
26712673 {
26722674 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_GUID;
26732675 }
2674 else if( libcstring_system_string_compare(
2676 else if( system_string_compare(
26752677 column_name,
2676 _LIBCSTRING_SYSTEM_STRING( "N6768" ),
2678 _SYSTEM_STRING( "N6768" ),
26772679 5 ) == 0 )
26782680 {
26792681 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_STRING;
26802682 }
2681 else if( libcstring_system_string_compare(
2683 else if( system_string_compare(
26822684 column_name,
2683 _LIBCSTRING_SYSTEM_STRING( "N676a" ),
2685 _SYSTEM_STRING( "N676a" ),
26842686 5 ) == 0 )
26852687 {
26862688 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_GUID;
26872689 }
2688 else if( libcstring_system_string_compare(
2690 else if( system_string_compare(
26892691 column_name,
2690 _LIBCSTRING_SYSTEM_STRING( "N677f" ),
2692 _SYSTEM_STRING( "N677f" ),
26912693 5 ) == 0 )
26922694 {
26932695 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_BINARY_DATA;
26952697 }
26962698 else if( column_name_size == 7 )
26972699 {
2698 if( libcstring_system_string_compare(
2700 if( system_string_compare(
26992701 column_name,
2700 _LIBCSTRING_SYSTEM_STRING( "MN667f" ),
2702 _SYSTEM_STRING( "MN667f" ),
27012703 6 ) == 0 )
27022704 {
27032705 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_MAPI_MULTI_VALUE;
28122814 log_handle_t *log_handle,
28132815 libcerror_error_t **error )
28142816 {
2815 libcstring_system_character_t column_name[ 256 ];
2817 system_character_t column_name[ 256 ];
28162818
28172819 static char *function = "exchange_export_record_mailbox";
28182820 size_t column_name_size = 0;
28632865 value_entry < number_of_values;
28642866 value_entry++ )
28652867 {
2866 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
2868 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
28672869 result = libesedb_record_get_utf16_column_name_size(
28682870 record,
28692871 value_entry,
29022904
29032905 return( -1 );
29042906 }
2905 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
2907 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
29062908 result = libesedb_record_get_utf16_column_name(
29072909 record,
29082910 value_entry,
29522954 if( ( column_name_size > 1 )
29532955 && ( column_name_size < 8 ) )
29542956 {
2955 if( column_name[ 0 ] == (libcstring_system_character_t) 'T' )
2957 if( column_name[ 0 ] == (system_character_t) 'T' )
29562958 {
29572959 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME;
29582960 }
2959 else if( column_name[ 0 ] == (libcstring_system_character_t) 'Q' )
2961 else if( column_name[ 0 ] == (system_character_t) 'Q' )
29602962 {
29612963 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT;
29622964 }
29682970 if( ( column_name_size > 1 )
29692971 && ( column_name_size < 8 ) )
29702972 {
2971 if( column_name[ 0 ] == (libcstring_system_character_t) 'L' )
2973 if( column_name[ 0 ] == (system_character_t) 'L' )
29722974 {
29732975 /* TODO
29742976 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_32BIT;
29752977 */
29762978 }
2977 else if( column_name[ 0 ] == (libcstring_system_character_t) 'S' )
2979 else if( column_name[ 0 ] == (system_character_t) 'S' )
29782980 {
29792981 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_STRING;
29802982 }
2981 else if( column_name[ 0 ] == (libcstring_system_character_t) 'T' )
2983 else if( column_name[ 0 ] == (system_character_t) 'T' )
29822984 {
29832985 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME;
29842986 }
2985 else if( column_name[ 0 ] == (libcstring_system_character_t) 'Q' )
2987 else if( column_name[ 0 ] == (system_character_t) 'Q' )
29862988 {
29872989 byte_order = _BYTE_STREAM_ENDIAN_BIG;
29882990 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT;
29892991 }
29902992 else if( column_name_size == 6 )
29912993 {
2992 if( libcstring_system_string_compare(
2994 if( system_string_compare(
29932995 column_name,
2994 _LIBCSTRING_SYSTEM_STRING( "N66a0" ),
2996 _SYSTEM_STRING( "N66a0" ),
29952997 5 ) == 0 )
29962998 {
29972999 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_SID;
29983000 }
2999 else if( libcstring_system_string_compare(
3001 else if( system_string_compare(
30003002 column_name,
3001 _LIBCSTRING_SYSTEM_STRING( "N676a" ),
3003 _SYSTEM_STRING( "N676a" ),
30023004 5 ) == 0 )
30033005 {
30043006 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_GUID;
30053007 }
3006 else if( libcstring_system_string_compare(
3008 else if( system_string_compare(
30073009 column_name,
3008 _LIBCSTRING_SYSTEM_STRING( "N676c" ),
3010 _SYSTEM_STRING( "N676c" ),
30093011 5 ) == 0 )
30103012 {
30113013 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_GUID;
31113113 log_handle_t *log_handle,
31123114 libcerror_error_t **error )
31133115 {
3114 libcstring_system_character_t column_name[ 256 ];
3116 system_character_t column_name[ 256 ];
31153117
31163118 static char *function = "exchange_export_record_msg";
31173119 size_t column_name_size = 0;
31623164 value_entry < number_of_values;
31633165 value_entry++ )
31643166 {
3165 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
3167 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
31663168 result = libesedb_record_get_utf16_column_name_size(
31673169 record,
31683170 value_entry,
32013203
32023204 return( -1 );
32033205 }
3204 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
3206 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
32053207 result = libesedb_record_get_utf16_column_name(
32063208 record,
32073209 value_entry,
32513253 if( ( column_name_size > 1 )
32523254 && ( column_name_size < 8 ) )
32533255 {
3254 if( column_name[ 0 ] == (libcstring_system_character_t) 'T' )
3256 if( column_name[ 0 ] == (system_character_t) 'T' )
32553257 {
32563258 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME;
32573259 }
3258 else if( column_name[ 0 ] == (libcstring_system_character_t) 'Q' )
3260 else if( column_name[ 0 ] == (system_character_t) 'Q' )
32593261 {
32603262 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT;
32613263 }
32673269 if( ( column_name_size > 1 )
32683270 && ( column_name_size < 8 ) )
32693271 {
3270 if( column_name[ 0 ] == (libcstring_system_character_t) 'L' )
3272 if( column_name[ 0 ] == (system_character_t) 'L' )
32713273 {
32723274 /* TODO
32733275 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_32BIT;
32743276 */
32753277 }
3276 else if( column_name[ 0 ] == (libcstring_system_character_t) 'S' )
3278 else if( column_name[ 0 ] == (system_character_t) 'S' )
32773279 {
32783280 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_STRING;
32793281 }
3280 else if( column_name[ 0 ] == (libcstring_system_character_t) 'T' )
3282 else if( column_name[ 0 ] == (system_character_t) 'T' )
32813283 {
32823284 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME;
32833285 }
3284 else if( column_name[ 0 ] == (libcstring_system_character_t) 'Q' )
3286 else if( column_name[ 0 ] == (system_character_t) 'Q' )
32853287 {
32863288 byte_order = _BYTE_STREAM_ENDIAN_BIG;
32873289 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT;
32883290 }
32893291 else if( column_name_size == 6 )
32903292 {
3291 if( libcstring_system_string_compare(
3293 if( system_string_compare(
32923294 column_name,
3293 _LIBCSTRING_SYSTEM_STRING( "N300b" ),
3295 _SYSTEM_STRING( "N300b" ),
32943296 5 ) == 0 )
32953297 {
32963298 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_GUID;
32973299 }
3298 else if( libcstring_system_string_compare(
3300 else if( system_string_compare(
32993301 column_name,
3300 _LIBCSTRING_SYSTEM_STRING( "N6720" ),
3302 _SYSTEM_STRING( "N6720" ),
33013303 5 ) == 0 )
33023304 {
33033305 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_STRING;
34033405 log_handle_t *log_handle,
34043406 libcerror_error_t **error )
34053407 {
3406 libcstring_system_character_t column_name[ 256 ];
3408 system_character_t column_name[ 256 ];
34073409
34083410 static char *function = "exchange_export_record_per_user_read";
34093411 size_t column_name_size = 0;
34543456 value_entry < number_of_values;
34553457 value_entry++ )
34563458 {
3457 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
3459 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
34583460 result = libesedb_record_get_utf16_column_name_size(
34593461 record,
34603462 value_entry,
34943496
34953497 return( -1 );
34963498 }
3497 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
3499 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
34983500 result = libesedb_record_get_utf16_column_name(
34993501 record,
35003502 value_entry,
35443546 if( ( column_name_size > 1 )
35453547 && ( column_name_size < 8 ) )
35463548 {
3547 if( column_name[ 0 ] == (libcstring_system_character_t) 'T' )
3549 if( column_name[ 0 ] == (system_character_t) 'T' )
35483550 {
35493551 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME;
35503552 }
3551 else if( column_name[ 0 ] == (libcstring_system_character_t) 'Q' )
3553 else if( column_name[ 0 ] == (system_character_t) 'Q' )
35523554 {
35533555 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT;
35543556 }
35603562 if( ( column_name_size > 1 )
35613563 && ( column_name_size < 8 ) )
35623564 {
3563 if( column_name[ 0 ] == (libcstring_system_character_t) 'T' )
3565 if( column_name[ 0 ] == (system_character_t) 'T' )
35643566 {
35653567 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_FILETIME;
35663568 }
3567 else if( column_name[ 0 ] == (libcstring_system_character_t) 'Q' )
3569 else if( column_name[ 0 ] == (system_character_t) 'Q' )
35683570 {
35693571 byte_order = _BYTE_STREAM_ENDIAN_BIG;
35703572 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_INTEGER_64BIT;
35713573 }
35723574 else if( column_name_size == 6 )
35733575 {
3574 if( libcstring_system_string_compare(
3576 if( system_string_compare(
35753577 column_name,
3576 _LIBCSTRING_SYSTEM_STRING( "N676c" ),
3578 _SYSTEM_STRING( "N676c" ),
35773579 5 ) == 0 )
35783580 {
35793581 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_GUID;
35803582 }
3581 else if( libcstring_system_string_compare(
3583 else if( system_string_compare(
35823584 column_name,
3583 _LIBCSTRING_SYSTEM_STRING( "N67d0" ),
3585 _SYSTEM_STRING( "N67d0" ),
35843586 5 ) == 0 )
35853587 {
35863588 known_column_type = EXPORT_EXCHANGE_KNOWN_COLUMN_TYPE_GUID;
125125 }
126126 #endif
127127
128 #endif
128 #endif /* !defined( _EXPORT_EXCHANGE_H ) */
129129
2121 #include <common.h>
2222 #include <file_stream.h>
2323 #include <memory.h>
24 #include <system_string.h>
2425 #include <types.h>
2526
26 #include "esedbtools_libcstring.h"
2727 #include "esedbtools_libcerror.h"
2828 #include "esedbtools_libesedb.h"
2929 #include "esedbtools_libfdatetime.h"
113113 * Converts \\, \t, \n, \r, \0 into their string representation
114114 */
115115 void export_text(
116 const libcstring_system_character_t *string,
116 const system_character_t *string,
117117 size_t string_size,
118118 FILE *stream )
119119 {
130130 "\\0" );
131131 }
132132 }
133 else if( *string == (libcstring_system_character_t) '\\' )
133 else if( *string == (system_character_t) '\\' )
134134 {
135135 fprintf(
136136 stream,
137137 "\\\\" );
138138 }
139 else if( *string == (libcstring_system_character_t) '\n' )
139 else if( *string == (system_character_t) '\n' )
140140 {
141141 fprintf(
142142 stream,
143143 "\\n" );
144144 }
145 else if( *string == (libcstring_system_character_t) '\r' )
145 else if( *string == (system_character_t) '\r' )
146146 {
147147 fprintf(
148148 stream,
149149 "\\r" );
150150 }
151 else if( *string == (libcstring_system_character_t) '\t' )
151 else if( *string == (system_character_t) '\t' )
152152 {
153153 fprintf(
154154 stream,
158158 {
159159 fprintf(
160160 stream,
161 "%" PRIc_LIBCSTRING_SYSTEM "",
161 "%" PRIc_SYSTEM "",
162162 *string );
163163 }
164164 string += 1;
177177 FILE *record_file_stream,
178178 libcerror_error_t **error )
179179 {
180 libcstring_system_character_t filetime_string[ 32 ];
180 system_character_t filetime_string[ 32 ];
181181
182182 libfdatetime_filetime_t *filetime = NULL;
183183 uint8_t *value_data = NULL;
350350
351351 goto on_error;
352352 }
353 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
353 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
354354 result = libfdatetime_filetime_copy_to_utf16_string(
355355 filetime,
356356 (uint16_t *) filetime_string,
391391 }
392392 fprintf(
393393 record_file_stream,
394 "%" PRIs_LIBCSTRING_SYSTEM "",
394 "%" PRIs_SYSTEM "",
395395 filetime_string );
396396 }
397397 }
2525 #include <file_stream.h>
2626 #include <types.h>
2727
28 #include "esedbtools_libcstring.h"
2928 #include "esedbtools_libesedb.h"
3029
3130 #if defined( __cplusplus )
4342 FILE *stream );
4443
4544 void export_text(
46 const libcstring_system_character_t *string,
45 const system_character_t *string,
4746 size_t string_size,
4847 FILE *stream );
4948
6463 }
6564 #endif
6665
67 #endif
66 #endif /* !defined( _EXPORT_H ) */
6867
00 /*
11 * Export handle
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2121 #include <common.h>
2222 #include <file_stream.h>
2323 #include <memory.h>
24 #include <narrow_string.h>
25 #include <system_string.h>
2426 #include <types.h>
27 #include <wide_string.h>
2528
2629 #include "esedbtools_libcerror.h"
2730 #include "esedbtools_libclocale.h"
2831 #include "esedbtools_libcnotify.h"
2932 #include "esedbtools_libcfile.h"
3033 #include "esedbtools_libcpath.h"
31 #include "esedbtools_libcstring.h"
32 #include "esedbtools_libcsystem.h"
3334 #include "esedbtools_libesedb.h"
3435 #include "esedbtools_libfdatetime.h"
36 #include "esedbtools_system_string.h"
3537 #include "exchange.h"
3638 #include "export.h"
3739 #include "export_handle.h"
215217 */
216218 int export_handle_set_export_mode(
217219 export_handle_t *export_handle,
218 const libcstring_system_character_t *string,
220 const system_character_t *string,
219221 libcerror_error_t **error )
220222 {
221223 static char *function = "export_handle_set_export_mode";
244246
245247 return( -1 );
246248 }
247 string_length = libcstring_system_string_length(
249 string_length = system_string_length(
248250 string );
249251
250252 if( string_length == 3 )
251253 {
252 if( libcstring_system_string_compare(
254 if( system_string_compare(
253255 string,
254 _LIBCSTRING_SYSTEM_STRING( "all" ),
256 _SYSTEM_STRING( "all" ),
255257 3 ) == 0 )
256258 {
257259 export_handle->export_mode = EXPORT_MODE_ALL;
261263 }
262264 else if( string_length == 6 )
263265 {
264 if( libcstring_system_string_compare(
266 if( system_string_compare(
265267 string,
266 _LIBCSTRING_SYSTEM_STRING( "tables" ),
268 _SYSTEM_STRING( "tables" ),
267269 6 ) == 0 )
268270 {
269271 export_handle->export_mode = EXPORT_MODE_TABLES;
279281 */
280282 int export_handle_set_ascii_codepage(
281283 export_handle_t *export_handle,
282 const libcstring_system_character_t *string,
284 const system_character_t *string,
283285 libcerror_error_t **error )
284286 {
285287 static char *function = "export_handle_set_ascii_codepage";
301303 feature_flags = LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_KOI8
302304 | LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_WINDOWS;
303305
304 string_length = libcstring_system_string_length(
306 string_length = system_string_length(
305307 string );
306308
307 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
309 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
308310 result = libclocale_codepage_copy_from_string_wide(
309311 &( export_handle->ascii_codepage ),
310312 string,
338340 */
339341 int export_handle_set_target_path(
340342 export_handle_t *export_handle,
341 const libcstring_system_character_t *target_path,
343 const system_character_t *target_path,
342344 libcerror_error_t **error )
343345 {
344 static char *function = "export_handle_set_target_path";
345 size_t target_path_length = 0;
346 static char *function = "export_handle_set_target_path";
347 size_t target_path_length = 0;
346348
347349 #if defined( WINAPI )
348 libcstring_system_character_t *full_target_path = NULL;
349 size_t full_target_path_size = 0;
350 int result = 0;
350 system_character_t *full_target_path = NULL;
351 size_t full_target_path_size = 0;
352 int result = 0;
351353 #endif
352354
353355 if( export_handle == NULL )
380382 export_handle->target_path = NULL;
381383 export_handle->target_path_size = 0;
382384 }
383 target_path_length = libcstring_system_string_length(
385 target_path_length = system_string_length(
384386 target_path );
385387
386388 #if defined( WINAPI )
387 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
389 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
388390 result = libcpath_path_get_full_path_wide(
389391 target_path,
390392 target_path_length,
418420 #endif
419421 if( target_path_length > 0 )
420422 {
421 export_handle->target_path = libcstring_system_string_allocate(
423 export_handle->target_path = system_string_allocate(
422424 target_path_length + 1 );
423425
424426 if( export_handle->target_path == NULL )
432434
433435 goto on_error;
434436 }
435 if( libcstring_system_string_copy(
437 if( system_string_copy(
436438 export_handle->target_path,
437439 target_path,
438440 target_path_length ) == NULL )
480482 */
481483 int export_handle_set_export_path(
482484 export_handle_t *export_handle,
483 const libcstring_system_character_t *base_path,
485 const system_character_t *base_path,
484486 size_t base_path_length,
485 const libcstring_system_character_t *suffix,
487 const system_character_t *suffix,
486488 size_t suffix_length,
487 libcstring_system_character_t **export_path,
489 system_character_t **export_path,
488490 size_t *export_path_size,
489491 libcerror_error_t **error )
490492 {
577579 }
578580 *export_path_size = base_path_length + suffix_length + 1;
579581
580 *export_path = libcstring_system_string_allocate(
582 *export_path = system_string_allocate(
581583 *export_path_size );
582584
583585 if( *export_path == NULL )
591593
592594 goto on_error;
593595 }
594 if( libcstring_system_string_copy(
596 if( system_string_copy(
595597 *export_path,
596598 base_path,
597599 base_path_length ) == NULL )
605607
606608 goto on_error;
607609 }
608 if( libcstring_system_string_copy(
610 if( system_string_copy(
609611 &( ( *export_path )[ base_path_length ] ),
610612 suffix,
611613 suffix_length ) == NULL )
660662 export_handle,
661663 export_handle->target_path,
662664 export_handle->target_path_size - 1,
663 _LIBCSTRING_SYSTEM_STRING( ".export" ),
665 _SYSTEM_STRING( ".export" ),
664666 7,
665667 &( export_handle->items_export_path ),
666668 &( export_handle->items_export_path_size ),
675677
676678 return( -1 );
677679 }
678 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
680 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
679681 result = libcfile_file_exists_wide(
680682 export_handle->items_export_path,
681683 error );
690692 error,
691693 LIBCERROR_ERROR_DOMAIN_IO,
692694 LIBCERROR_IO_ERROR_GENERIC,
693 "%s: unable to determine if %" PRIs_LIBCSTRING_SYSTEM " exists.",
695 "%s: unable to determine if %" PRIs_SYSTEM " exists.",
694696 function,
695697 export_handle->items_export_path );
696698
708710 */
709711 int export_handle_open(
710712 export_handle_t *export_handle,
711 const libcstring_system_character_t *filename,
713 const system_character_t *filename,
712714 libcerror_error_t **error )
713715 {
714716 static char *function = "export_handle_open";
724726
725727 return( -1 );
726728 }
727 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
729 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
728730 if( libesedb_file_open_wide(
729731 export_handle->input_file,
730732 filename,
792794 int export_handle_create_item_filename(
793795 export_handle_t *export_handle,
794796 int item_index,
795 const libcstring_system_character_t *item_name,
797 const system_character_t *item_name,
796798 size_t item_name_length,
797 libcstring_system_character_t **item_filename,
799 system_character_t **item_filename,
798800 size_t *item_filename_size,
799801 libcerror_error_t **error )
800802 {
869871
870872 *item_filename_size = item_name_length + number_of_digits + 2;
871873
872 *item_filename = libcstring_system_string_allocate(
874 *item_filename = system_string_allocate(
873875 *item_filename_size );
874876
875877 if( *item_filename == NULL )
883885
884886 goto on_error;
885887 }
886 if( libcstring_system_string_copy(
888 if( system_string_copy(
887889 *item_filename,
888890 item_name,
889891 item_name_length ) == NULL )
897899
898900 goto on_error;
899901 }
900 ( *item_filename )[ item_name_length++ ] = (libcstring_system_character_t) '.';
901
902 if( libcsystem_string_decimal_copy_from_64_bit(
902 ( *item_filename )[ item_name_length++ ] = (system_character_t) '.';
903
904 if( esedbtools_system_string_copy_from_64_bit_in_decimal(
903905 *item_filename,
904906 *item_filename_size,
905907 &item_name_length,
910912 error,
911913 LIBCERROR_ERROR_DOMAIN_RUNTIME,
912914 LIBCERROR_RUNTIME_ERROR_COPY_FAILED,
913 "%s: unable to copy item index.",
915 "%s: unable to copy item index to string.",
914916 function );
915917
916918 goto on_error;
937939 */
938940 int export_handle_create_text_item_file(
939941 export_handle_t *export_handle,
940 const libcstring_system_character_t *item_filename,
942 const system_character_t *item_filename,
941943 size_t item_filename_length,
942 const libcstring_system_character_t *export_path,
944 const system_character_t *export_path,
943945 size_t export_path_length,
944946 FILE **item_file_stream,
945947 libcerror_error_t **error )
946948 {
947 libcstring_system_character_t *item_filename_path = NULL;
948 static char *function = "export_handle_create_text_item_file";
949 size_t item_filename_path_size = 0;
950 int result = 0;
949 system_character_t *item_filename_path = NULL;
950 static char *function = "export_handle_create_text_item_file";
951 size_t item_filename_path_size = 0;
952 int result = 0;
951953
952954 if( export_handle == NULL )
953955 {
971973
972974 return( -1 );
973975 }
974 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
976 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
975977 if( libcpath_path_join_wide(
976978 &item_filename_path,
977979 &item_filename_path_size,
10001002
10011003 goto on_error;
10021004 }
1003 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1005 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
10041006 result = libcfile_file_exists_wide(
10051007 item_filename_path,
10061008 error );
10151017 error,
10161018 LIBCERROR_ERROR_DOMAIN_IO,
10171019 LIBCERROR_IO_ERROR_GENERIC,
1018 "%s: unable to determine if %" PRIs_LIBCSTRING_SYSTEM " exists.",
1020 "%s: unable to determine if %" PRIs_SYSTEM " exists.",
10191021 function,
10201022 item_filename_path );
10211023
10281030
10291031 return( 0 );
10301032 }
1031 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1033 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
10321034 *item_file_stream = file_stream_open_wide(
10331035 item_filename_path,
1034 _LIBCSTRING_SYSTEM_STRING( FILE_STREAM_OPEN_WRITE ) );
1036 _SYSTEM_STRING( FILE_STREAM_OPEN_WRITE ) );
10351037 #else
10361038 *item_file_stream = file_stream_open(
10371039 item_filename_path,
10441046 error,
10451047 LIBCERROR_ERROR_DOMAIN_IO,
10461048 LIBCERROR_IO_ERROR_OPEN_FAILED,
1047 "%s: unable to open: %" PRIs_LIBCSTRING_SYSTEM ".",
1049 "%s: unable to open: %" PRIs_SYSTEM ".",
10481050 function,
10491051 item_filename_path );
10501052
10711073 export_handle_t *export_handle,
10721074 libesedb_table_t *table,
10731075 int table_index,
1074 const libcstring_system_character_t *table_name,
1076 const system_character_t *table_name,
10751077 size_t table_name_length,
1076 const libcstring_system_character_t *export_path,
1078 const system_character_t *export_path,
10771079 size_t export_path_length,
10781080 log_handle_t *log_handle,
10791081 libcerror_error_t **error )
10801082 {
1081 libcstring_system_character_t *item_filename = NULL;
1082 libcstring_system_character_t *value_string = NULL;
1083 libesedb_column_t *column = NULL;
1084 libesedb_record_t *record = NULL;
1085 FILE *table_file_stream = NULL;
1086 static char *function = "export_handle_export_table";
1087 size_t item_filename_size = 0;
1088 size_t value_string_size = 0;
1089 int column_iterator = 0;
1090 int known_table = 0;
1091 int number_of_columns = 0;
1092 int number_of_records = 0;
1093 int record_iterator = 0;
1094 int result = 0;
1083 system_character_t *item_filename = NULL;
1084 system_character_t *value_string = NULL;
1085 libesedb_column_t *column = NULL;
1086 libesedb_record_t *record = NULL;
1087 FILE *table_file_stream = NULL;
1088 static char *function = "export_handle_export_table";
1089 size_t item_filename_size = 0;
1090 size_t value_string_size = 0;
1091 int column_iterator = 0;
1092 int known_table = 0;
1093 int number_of_columns = 0;
1094 int number_of_records = 0;
1095 int record_iterator = 0;
1096 int result = 0;
10951097
10961098 if( table == NULL )
10971099 {
11571159 {
11581160 log_handle_printf(
11591161 log_handle,
1160 "Skipping table: %" PRIs_LIBCSTRING_SYSTEM " it already exists.\n",
1162 "Skipping table: %" PRIs_SYSTEM " it already exists.\n",
11611163 item_filename );
11621164
11631165 memory_free(
12081210
12091211 goto on_error;
12101212 }
1211 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1213 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
12121214 result = libesedb_column_get_utf16_name_size(
12131215 column,
12141216 &value_string_size,
12411243
12421244 goto on_error;
12431245 }
1244 value_string = libcstring_system_string_allocate(
1246 value_string = system_string_allocate(
12451247 value_string_size );
12461248
12471249 if( value_string == NULL )
12551257
12561258 goto on_error;
12571259 }
1258 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1260 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
12591261 result = libesedb_column_get_utf16_name(
12601262 column,
12611263 (uint16_t *) value_string,
12811283 }
12821284 fprintf(
12831285 table_file_stream,
1284 "%" PRIs_LIBCSTRING_SYSTEM "",
1286 "%" PRIs_SYSTEM "",
12851287 value_string );
12861288
12871289 memory_free(
13551357
13561358 if( table_name_length == 3 )
13571359 {
1358 if( libcstring_system_string_compare(
1360 if( system_string_compare(
13591361 table_name,
1360 _LIBCSTRING_SYSTEM_STRING( "Msg" ),
1362 _SYSTEM_STRING( "Msg" ),
13611363 3 ) == 0 )
13621364 {
13631365 known_table = 1;
13711373 }
13721374 else if( table_name_length == 6 )
13731375 {
1374 if( libcstring_system_string_compare(
1376 if( system_string_compare(
13751377 table_name,
1376 _LIBCSTRING_SYSTEM_STRING( "Global" ),
1378 _SYSTEM_STRING( "Global" ),
13771379 6 ) == 0 )
13781380 {
13791381 known_table = 1;
13871389 }
13881390 else if( table_name_length == 7 )
13891391 {
1390 if( libcstring_system_string_compare(
1392 if( system_string_compare(
13911393 table_name,
1392 _LIBCSTRING_SYSTEM_STRING( "Folders" ),
1394 _SYSTEM_STRING( "Folders" ),
13931395 7 ) == 0 )
13941396 {
13951397 known_table = 1;
14001402 log_handle,
14011403 error );
14021404 }
1403 else if( libcstring_system_string_compare(
1405 else if( system_string_compare(
14041406 table_name,
1405 _LIBCSTRING_SYSTEM_STRING( "Mailbox" ),
1407 _SYSTEM_STRING( "Mailbox" ),
14061408 7 ) == 0 )
14071409 {
14081410 known_table = 1;
14161418 }
14171419 else if( table_name_length == 10 )
14181420 {
1419 if( libcstring_system_string_compare(
1421 if( system_string_compare(
14201422 table_name,
1421 _LIBCSTRING_SYSTEM_STRING( "Containers" ),
1423 _SYSTEM_STRING( "Containers" ),
14221424 10 ) == 0 )
14231425 {
14241426 known_table = 1;
14321434 }
14331435 else if( table_name_length == 11 )
14341436 {
1435 if( libcstring_system_string_compare(
1437 if( system_string_compare(
14361438 table_name,
1437 _LIBCSTRING_SYSTEM_STRING( "PerUserRead" ),
1439 _SYSTEM_STRING( "PerUserRead" ),
14381440 11 ) == 0 )
14391441 {
14401442 known_table = 1;
14481450 }
14491451 else if( table_name_length == 12 )
14501452 {
1451 if( libcstring_system_string_compare(
1453 if( system_string_compare(
14521454 table_name,
1453 _LIBCSTRING_SYSTEM_STRING( "SmTblSection" ),
1455 _SYSTEM_STRING( "SmTblSection" ),
14541456 12 ) == 0 )
14551457 {
14561458 known_table = 1;
14611463 log_handle,
14621464 error );
14631465 }
1464 else if( libcstring_system_string_compare(
1466 else if( system_string_compare(
14651467 table_name,
1466 _LIBCSTRING_SYSTEM_STRING( "SmTblVersion" ),
1468 _SYSTEM_STRING( "SmTblVersion" ),
14671469 12 ) == 0 )
14681470 {
14691471 known_table = 1;
14771479 }
14781480 else if( table_name_length == 14 )
14791481 {
1480 if( libcstring_system_string_compare(
1482 if( system_string_compare(
14811483 table_name,
1482 _LIBCSTRING_SYSTEM_STRING( "SystemIndex_0A" ),
1484 _SYSTEM_STRING( "SystemIndex_0A" ),
14831485 14 ) == 0 )
14841486 {
14851487 known_table = 1;
14941496 }
14951497 else if( table_name_length == 16 )
14961498 {
1497 if( libcstring_system_string_compare(
1499 if( system_string_compare(
14981500 table_name,
1499 _LIBCSTRING_SYSTEM_STRING( "SystemIndex_Gthr" ),
1501 _SYSTEM_STRING( "SystemIndex_Gthr" ),
15001502 16 ) == 0 )
15011503 {
15021504 known_table = 1;
15101512 }
15111513 if( table_name_length >= 10 )
15121514 {
1513 if( libcstring_system_string_compare(
1515 if( system_string_compare(
15141516 table_name,
1515 _LIBCSTRING_SYSTEM_STRING( "Container_" ),
1517 _SYSTEM_STRING( "Container_" ),
15161518 10 ) == 0 )
15171519 {
15181520 known_table = 1;
16391641 int export_handle_export_indexes(
16401642 export_handle_t *export_handle,
16411643 libesedb_table_t *table,
1642 const libcstring_system_character_t *table_name,
1644 const system_character_t *table_name,
16431645 size_t table_name_length,
1644 const libcstring_system_character_t *export_path,
1646 const system_character_t *export_path,
16451647 size_t export_path_length,
16461648 log_handle_t *log_handle,
16471649 libcerror_error_t **error )
16481650 {
1649 libcstring_system_character_t *index_directory_name = NULL;
1650 libcstring_system_character_t *index_name = NULL;
1651 libesedb_index_t *index = NULL;
1652 static char *function = "export_handle_export_indexes";
1653 size_t index_directory_name_size = 0;
1654 size_t index_name_size = 0;
1655 int index_iterator = 0;
1656 int number_of_indexes = 0;
1657 int result = 0;
1651 system_character_t *index_directory_name = NULL;
1652 system_character_t *index_name = NULL;
1653 libesedb_index_t *index = NULL;
1654 static char *function = "export_handle_export_indexes";
1655 size_t index_directory_name_size = 0;
1656 size_t index_name_size = 0;
1657 int index_iterator = 0;
1658 int number_of_indexes = 0;
1659 int result = 0;
16581660
16591661 if( table == NULL )
16601662 {
16671669
16681670 return( -1 );
16691671 }
1670 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1672 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
16711673 if( libcpath_path_join_wide(
16721674 &index_directory_name,
16731675 &index_directory_name_size,
16961698
16971699 goto on_error;
16981700 }
1699 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1701 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
17001702 result = libcfile_file_exists_wide(
17011703 index_directory_name,
17021704 error );
17111713 error,
17121714 LIBCERROR_ERROR_DOMAIN_IO,
17131715 LIBCERROR_IO_ERROR_GENERIC,
1714 "%s: unable to determine if %" PRIs_LIBCSTRING_SYSTEM " exists.",
1716 "%s: unable to determine if %" PRIs_SYSTEM " exists.",
17151717 function,
17161718 index_directory_name );
17171719
17281730
17291731 return( 1 );
17301732 }
1731 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1733 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
17321734 if( libcpath_path_make_directory_wide(
17331735 index_directory_name,
17341736 error ) != 1 )
17421744 error,
17431745 LIBCERROR_ERROR_DOMAIN_IO,
17441746 LIBCERROR_IO_ERROR_WRITE_FAILED,
1745 "%s: unable to make directory: %" PRIs_LIBCSTRING_SYSTEM ".",
1747 "%s: unable to make directory: %" PRIs_SYSTEM ".",
17461748 function,
17471749 index_directory_name );
17481750
17501752 }
17511753 log_handle_printf(
17521754 log_handle,
1753 "Created directory: %" PRIs_LIBCSTRING_SYSTEM ".\n",
1755 "Created directory: %" PRIs_SYSTEM ".\n",
17541756 index_directory_name );
17551757
17561758 memory_free(
17941796
17951797 goto on_error;
17961798 }
1797 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1799 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
17981800 result = libesedb_index_get_utf16_name_size(
17991801 index,
18001802 &index_name_size,
18271829
18281830 goto on_error;
18291831 }
1830 index_name = libcstring_system_string_allocate(
1832 index_name = system_string_allocate(
18311833 index_name_size );
18321834
18331835 if( index_name == NULL )
18411843
18421844 goto on_error;
18431845 }
1844 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1846 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
18451847 result = libesedb_index_get_utf16_name(
18461848 index,
18471849 (uint16_t *) index_name,
18671869 }
18681870 fprintf(
18691871 export_handle->notify_stream,
1870 "Exporting index %d (%" PRIs_LIBCSTRING_SYSTEM ")",
1872 "Exporting index %d (%" PRIs_SYSTEM ")",
18711873 index_iterator + 1,
18721874 index_name );
18731875
18831885 export_handle->notify_stream,
18841886 ".\n" );
18851887
1886 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1888 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
18871889 if( libcpath_path_sanitize_filename_wide(
18881890 index_name,
18891891 &index_name_size,
19731975 export_handle_t *export_handle,
19741976 libesedb_index_t *index,
19751977 int index_iterator,
1976 const libcstring_system_character_t *index_name,
1978 const system_character_t *index_name,
19771979 size_t index_name_length,
1978 const libcstring_system_character_t *export_path,
1980 const system_character_t *export_path,
19791981 size_t export_path_length,
19801982 log_handle_t *log_handle,
19811983 libcerror_error_t **error )
19821984 {
1983 libcstring_system_character_t *item_filename = NULL;
1984 libesedb_record_t *record = NULL;
1985 FILE *index_file_stream = NULL;
1986 static char *function = "export_handle_export_index";
1987 int known_index = 0;
1988 size_t item_filename_size = 0;
1989 int number_of_records = 0;
1990 int record_iterator = 0;
1991 int result = 0;
1985 system_character_t *item_filename = NULL;
1986 libesedb_record_t *record = NULL;
1987 FILE *index_file_stream = NULL;
1988 static char *function = "export_handle_export_index";
1989 int known_index = 0;
1990 size_t item_filename_size = 0;
1991 int number_of_records = 0;
1992 int record_iterator = 0;
1993 int result = 0;
19921994
19931995 if( index == NULL )
19941996 {
20542056 {
20552057 log_handle_printf(
20562058 log_handle,
2057 "Skipping index: %" PRIs_LIBCSTRING_SYSTEM " it already exists.\n",
2059 "Skipping index: %" PRIs_SYSTEM " it already exists.\n",
20582060 item_filename );
20592061
20602062 memory_free(
21062108
21072109 goto on_error;
21082110 }
2109 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
2111 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
21102112 result = libesedb_column_get_utf16_name_size(
21112113 column,
21122114 &value_string_size,
21392141
21402142 goto on_error;
21412143 }
2142 value_string = libcstring_system_string_allocate(
2144 value_string = system_string_allocate(
21432145 value_string_size );
21442146
21452147 if( value_string == NULL )
21532155
21542156 goto on_error;
21552157 }
2156 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
2158 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
21572159 result = libesedb_column_get_utf16_name(
21582160 column,
21592161 (uint16_t *) value_string,
21792181 }
21802182 fprintf(
21812183 index_file_stream,
2182 "%" PRIs_LIBCSTRING_SYSTEM "",
2184 "%" PRIs_SYSTEM "",
21832185 value_string );
21842186
21852187 memory_free(
24302432 log_handle_t *log_handle,
24312433 libcerror_error_t **error )
24322434 {
2433 libcstring_system_character_t *value_string = NULL;
2434 libesedb_multi_value_t *multi_value = NULL;
2435 uint8_t *binary_data = NULL;
2436 uint8_t *multi_value_data = NULL;
2437 uint8_t *value_data = NULL;
2438 static char *function = "export_handle_export_record_value";
2439 size_t binary_data_size = 0;
2440 size_t multi_value_data_size = 0;
2441 size_t value_data_size = 0;
2442 size_t value_string_size = 0;
2443 uint32_t column_identifier = 0;
2444 uint32_t column_type = 0;
2445 uint8_t value_data_flags = 0;
2446 int multi_value_iterator = 0;
2447 int number_of_multi_values = 0;
2448 int result = 0;
2435 system_character_t *value_string = NULL;
2436 libesedb_multi_value_t *multi_value = NULL;
2437 uint8_t *binary_data = NULL;
2438 uint8_t *multi_value_data = NULL;
2439 uint8_t *value_data = NULL;
2440 static char *function = "export_handle_export_record_value";
2441 size_t binary_data_size = 0;
2442 size_t multi_value_data_size = 0;
2443 size_t value_data_size = 0;
2444 size_t value_string_size = 0;
2445 uint32_t column_identifier = 0;
2446 uint32_t column_type = 0;
2447 uint8_t value_data_flags = 0;
2448 int multi_value_iterator = 0;
2449 int number_of_multi_values = 0;
2450 int result = 0;
24492451
24502452 if( record == NULL )
24512453 {
25432545 switch( column_type )
25442546 {
25452547 case LIBESEDB_COLUMN_TYPE_LARGE_TEXT:
2546 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
2548 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
25472549 result = libesedb_record_get_value_utf16_string_size(
25482550 record,
25492551 record_value_entry,
25822584
25832585 goto on_error;
25842586 }
2585 value_string = libcstring_system_string_allocate(
2587 value_string = system_string_allocate(
25862588 value_string_size );
25872589
25882590 if( value_string == NULL )
25962598
25972599 goto on_error;
25982600 }
2599 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
2601 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
26002602 result = libesedb_record_get_value_utf16_string(
26012603 record,
26022604 record_value_entry,
27882790 if( ( column_type == LIBESEDB_COLUMN_TYPE_TEXT )
27892791 || ( column_type == LIBESEDB_COLUMN_TYPE_LARGE_TEXT ) )
27902792 {
2791 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
2793 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
27922794 result = libesedb_multi_value_get_value_utf16_string_size(
27932795 multi_value,
27942796 multi_value_iterator,
28182820 }
28192821 else if( result != 0 )
28202822 {
2821 value_string = libcstring_system_string_allocate(
2823 value_string = system_string_allocate(
28222824 value_string_size );
28232825
28242826 if( value_string == NULL )
28322834
28332835 goto on_error;
28342836 }
2835 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
2837 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
28362838 result = libesedb_multi_value_get_value_utf16_string(
28372839 multi_value,
28382840 multi_value_iterator,
30063008 log_handle_t *log_handle,
30073009 libcerror_error_t **error )
30083010 {
3009 libcstring_system_character_t filetime_string[ 32 ];
3010
3011 libcstring_system_character_t *value_string = NULL;
3012 libfdatetime_filetime_t *filetime = NULL;
3013 uint8_t *value_data = NULL;
3014 static char *function = "export_handle_export_basic_record_value";
3015 size_t value_data_size = 0;
3016 size_t value_string_size = 0;
3017 double value_double = 0.0;
3018 float value_float = 0.0;
3019 uint64_t value_64bit = 0;
3020 uint32_t column_identifier = 0;
3021 uint32_t column_type = 0;
3022 uint32_t value_32bit = 0;
3023 uint16_t value_16bit = 0;
3024 uint8_t value_8bit = 0;
3025 uint8_t value_data_flags = 0;
3026 int result = 0;
3011 system_character_t filetime_string[ 32 ];
3012
3013 system_character_t *value_string = NULL;
3014 libfdatetime_filetime_t *filetime = NULL;
3015 uint8_t *value_data = NULL;
3016 static char *function = "export_handle_export_basic_record_value";
3017 size_t value_data_size = 0;
3018 size_t value_string_size = 0;
3019 double value_double = 0.0;
3020 float value_float = 0.0;
3021 uint64_t value_64bit = 0;
3022 uint32_t column_identifier = 0;
3023 uint32_t column_type = 0;
3024 uint32_t value_32bit = 0;
3025 uint16_t value_16bit = 0;
3026 uint8_t value_8bit = 0;
3027 uint8_t value_data_flags = 0;
3028 int result = 0;
30273029
30283030 if( record == NULL )
30293031 {
33393341
33403342 goto on_error;
33413343 }
3342 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
3344 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
33433345 result = libfdatetime_filetime_copy_to_utf16_string(
33443346 filetime,
33453347 (uint16_t *) filetime_string,
33803382 }
33813383 fprintf(
33823384 record_file_stream,
3383 "%" PRIs_LIBCSTRING_SYSTEM "",
3385 "%" PRIs_SYSTEM "",
33843386 filetime_string );
33853387 }
33863388 break;
34433445
34443446 case LIBESEDB_COLUMN_TYPE_TEXT:
34453447 case LIBESEDB_COLUMN_TYPE_LARGE_TEXT:
3446 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
3448 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
34473449 result = libesedb_record_get_value_utf16_string_size(
34483450 record,
34493451 record_value_entry,
34823484
34833485 goto on_error;
34843486 }
3485 value_string = libcstring_system_string_allocate(
3487 value_string = system_string_allocate(
34863488 value_string_size );
34873489
34883490 if( value_string == NULL )
34963498
34973499 goto on_error;
34983500 }
3499 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
3501 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
35003502 result = libesedb_record_get_value_utf16_string(
35013503 record,
35023504 record_value_entry,
36293631 log_handle_t *log_handle,
36303632 libcerror_error_t **error )
36313633 {
3632 libcstring_system_character_t *value_string = NULL;
3633 libesedb_long_value_t *long_value = NULL;
3634 uint8_t *value_data = NULL;
3635 static char *function = "export_handle_export_long_record_value";
3636 size64_t value_data_size = 0;
3637 size_t value_string_size = 0;
3638 uint32_t column_identifier = 0;
3639 uint32_t column_type = 0;
3640 uint8_t value_data_flags = 0;
3641 int result = 0;
3634 system_character_t *value_string = NULL;
3635 libesedb_long_value_t *long_value = NULL;
3636 uint8_t *value_data = NULL;
3637 static char *function = "export_handle_export_long_record_value";
3638 size64_t value_data_size = 0;
3639 size_t value_string_size = 0;
3640 uint32_t column_identifier = 0;
3641 uint32_t column_type = 0;
3642 uint8_t value_data_flags = 0;
3643 int result = 0;
36423644
36433645 if( record == NULL )
36443646 {
37843786 {
37853787 case LIBESEDB_COLUMN_TYPE_TEXT:
37863788 case LIBESEDB_COLUMN_TYPE_LARGE_TEXT:
3787 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
3789 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
37883790 result = libesedb_long_value_get_utf16_string_size(
37893791 long_value,
37903792 &value_string_size,
38213823
38223824 goto on_error;
38233825 }
3824 value_string = libcstring_system_string_allocate(
3826 value_string = system_string_allocate(
38253827 value_string_size );
38263828
38273829 if( value_string == NULL )
38353837
38363838 goto on_error;
38373839 }
3838 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
3840 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
38393841 result = libesedb_long_value_get_utf16_string(
38403842 long_value,
38413843 (uint16_t *) value_string,
39843986 */
39853987 int export_handle_export_file(
39863988 export_handle_t *export_handle,
3987 const libcstring_system_character_t *export_table_name,
3989 const system_character_t *export_table_name,
39883990 size_t export_table_name_length,
39893991 log_handle_t *log_handle,
39903992 libcerror_error_t **error )
39913993 {
3992 libcstring_system_character_t *table_name = NULL;
3993 libesedb_table_t *table = NULL;
3994 static char *function = "export_handle_export_file";
3995 size_t table_name_size = 0;
3996 int number_of_tables = 0;
3997 int result = 0;
3998 int table_exported = 0;
3999 int table_index = 0;
3994 system_character_t *table_name = NULL;
3995 libesedb_table_t *table = NULL;
3996 static char *function = "export_handle_export_file";
3997 size_t table_name_size = 0;
3998 int number_of_tables = 0;
3999 int result = 0;
4000 int table_exported = 0;
4001 int table_index = 0;
40004002
40014003 if( export_handle == NULL )
40024004 {
40474049
40484050 goto on_error;
40494051 }
4050 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
4052 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
40514053 result = libesedb_table_get_utf16_name_size(
40524054 table,
40534055 &table_name_size,
40804082
40814083 goto on_error;
40824084 }
4083 table_name = libcstring_system_string_allocate(
4085 table_name = system_string_allocate(
40844086 table_name_size );
40854087
40864088 if( table_name == NULL )
40944096
40954097 goto on_error;
40964098 }
4097 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
4099 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
40984100 result = libesedb_table_get_utf16_name(
40994101 table,
41004102 (uint16_t *) table_name,
41204122 }
41214123 if( ( export_table_name == NULL )
41224124 || ( ( table_name_size == ( export_table_name_length + 1 ) )
4123 && ( libcstring_system_string_compare(
4125 && ( system_string_compare(
41244126 table_name,
41254127 export_table_name,
41264128 export_table_name_length ) == 0 ) ) )
41274129 {
41284130 if( table_exported == 0 )
41294131 {
4130 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
4132 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
41314133 if( libcpath_path_make_directory_wide(
41324134 export_handle->items_export_path,
41334135 error ) != 1 )
41414143 error,
41424144 LIBCERROR_ERROR_DOMAIN_IO,
41434145 LIBCERROR_IO_ERROR_WRITE_FAILED,
4144 "%s: unable to make directory: %" PRIs_LIBCSTRING_SYSTEM ".",
4146 "%s: unable to make directory: %" PRIs_SYSTEM ".",
41454147 function,
41464148 export_handle->items_export_path );
41474149
41494151 }
41504152 log_handle_printf(
41514153 log_handle,
4152 "Created directory: %" PRIs_LIBCSTRING_SYSTEM ".\n",
4154 "Created directory: %" PRIs_SYSTEM ".\n",
41534155 export_handle->items_export_path );
41544156 }
41554157 fprintf(
41564158 export_handle->notify_stream,
4157 "Exporting table %d (%" PRIs_LIBCSTRING_SYSTEM ")",
4159 "Exporting table %d (%" PRIs_SYSTEM ")",
41584160 table_index + 1,
41594161 table_name );
41604162
41694171 export_handle->notify_stream,
41704172 ".\n" );
41714173
4172 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
4174 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
41734175 if( libcpath_path_sanitize_filename_wide(
41744176 table_name,
41754177 &table_name_size,
00 /*
11 * Export handle
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2626 #include <types.h>
2727
2828 #include "esedbtools_libcerror.h"
29 #include "esedbtools_libcstring.h"
3029 #include "esedbtools_libesedb.h"
3130 #include "log_handle.h"
3231
5453
5554 /* The target path
5655 */
57 libcstring_system_character_t *target_path;
56 system_character_t *target_path;
5857
5958 /* The target path size
6059 */
6261
6362 /* The items export path
6463 */
65 libcstring_system_character_t *items_export_path;
64 system_character_t *items_export_path;
6665
6766 /* The items export path size
6867 */
9594
9695 int export_handle_set_export_mode(
9796 export_handle_t *export_handle,
98 const libcstring_system_character_t *string,
97 const system_character_t *string,
9998 libcerror_error_t **error );
10099
101100 int export_handle_set_ascii_codepage(
102101 export_handle_t *export_handle,
103 const libcstring_system_character_t *string,
102 const system_character_t *string,
104103 libcerror_error_t **error );
105104
106105 int export_handle_set_target_path(
107106 export_handle_t *export_handle,
108 const libcstring_system_character_t *target_path,
107 const system_character_t *target_path,
109108 libcerror_error_t **error );
110109
111110 int export_handle_set_export_path(
112111 export_handle_t *export_handle,
113 const libcstring_system_character_t *base_path,
112 const system_character_t *base_path,
114113 size_t base_path_length,
115 const libcstring_system_character_t *suffix,
114 const system_character_t *suffix,
116115 size_t suffix_length,
117 libcstring_system_character_t **export_path,
116 system_character_t **export_path,
118117 size_t *export_path_size,
119118 libcerror_error_t **error );
120119
124123
125124 int export_handle_open(
126125 export_handle_t *export_handle,
127 const libcstring_system_character_t *filename,
126 const system_character_t *filename,
128127 libcerror_error_t **error );
129128
130129 int export_handle_close(
136135 int export_handle_create_item_filename(
137136 export_handle_t *export_handle,
138137 int item_index,
139 const libcstring_system_character_t *item_name,
138 const system_character_t *item_name,
140139 size_t item_name_length,
141 libcstring_system_character_t **item_filename,
140 system_character_t **item_filename,
142141 size_t *item_filename_size,
143142 libcerror_error_t **error );
144143
145144 int export_handle_create_text_item_file(
146145 export_handle_t *export_handle,
147 const libcstring_system_character_t *item_filename,
146 const system_character_t *item_filename,
148147 size_t item_filename_length,
149 const libcstring_system_character_t *export_path,
148 const system_character_t *export_path,
150149 size_t export_path_length,
151150 FILE **item_file_stream,
152151 libcerror_error_t **error );
155154 export_handle_t *export_handle,
156155 libesedb_table_t *table,
157156 int table_index,
158 const libcstring_system_character_t *table_name,
157 const system_character_t *table_name,
159158 size_t table_name_length,
160 const libcstring_system_character_t *export_path,
159 const system_character_t *export_path,
161160 size_t export_path_length,
162161 log_handle_t *log_handle,
163162 libcerror_error_t **error );
165164 int export_handle_export_indexes(
166165 export_handle_t *export_handle,
167166 libesedb_table_t *table,
168 const libcstring_system_character_t *table_name,
167 const system_character_t *table_name,
169168 size_t table_name_length,
170 const libcstring_system_character_t *export_path,
169 const system_character_t *export_path,
171170 size_t export_path_length,
172171 log_handle_t *log_handle,
173172 libcerror_error_t **error );
176175 export_handle_t *export_handle,
177176 libesedb_index_t *index,
178177 int index_iterator,
179 const libcstring_system_character_t *index_name,
178 const system_character_t *index_name,
180179 size_t index_name_length,
181 const libcstring_system_character_t *export_path,
180 const system_character_t *export_path,
182181 size_t export_path_length,
183182 log_handle_t *log_handle,
184183 libcerror_error_t **error );
212211
213212 int export_handle_export_file(
214213 export_handle_t *export_handle,
215 const libcstring_system_character_t *export_table_name,
214 const system_character_t *export_table_name,
216215 size_t export_table_name_length,
217216 log_handle_t *log_handle,
218217 libcerror_error_t **error );
221220 }
222221 #endif
223222
224 #endif
225
223 #endif /* !defined( _EXPORT_HANDLE_H ) */
224
00 /*
11 * Info handle
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2121 #include <common.h>
2222 #include <file_stream.h>
2323 #include <memory.h>
24 #include <narrow_string.h>
25 #include <system_string.h>
2426 #include <types.h>
27 #include <wide_string.h>
2528
2629 #include "esedbtools_libcerror.h"
2730 #include "esedbtools_libclocale.h"
28 #include "esedbtools_libcstring.h"
2931 #include "esedbtools_libfdatetime.h"
3032 #include "esedbtools_libesedb.h"
3133 #include "info_handle.h"
276278 */
277279 int info_handle_set_ascii_codepage(
278280 info_handle_t *info_handle,
279 const libcstring_system_character_t *string,
281 const system_character_t *string,
280282 libcerror_error_t **error )
281283 {
282284 static char *function = "info_handle_set_ascii_codepage";
298300 feature_flags = LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_KOI8
299301 | LIBCLOCALE_CODEPAGE_FEATURE_FLAG_HAVE_WINDOWS;
300302
301 string_length = libcstring_system_string_length(
303 string_length = system_string_length(
302304 string );
303305
304 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
306 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
305307 result = libclocale_codepage_copy_from_string_wide(
306308 &( info_handle->ascii_codepage ),
307309 string,
335337 */
336338 int info_handle_open(
337339 info_handle_t *info_handle,
338 const libcstring_system_character_t *filename,
340 const system_character_t *filename,
339341 libcerror_error_t **error )
340342 {
341343 static char *function = "info_handle_open";
351353
352354 return( -1 );
353355 }
354 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
356 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
355357 if( libesedb_file_open_wide(
356358 info_handle->input_file,
357359 filename,
420422 info_handle_t *info_handle,
421423 libcerror_error_t **error )
422424 {
423 libesedb_column_t *column = NULL;
424 libesedb_index_t *index = NULL;
425 libesedb_table_t *table = NULL;
426 libcstring_system_character_t *value_string = NULL;
427 static char *function = "esedbinfo_file_info_fprint";
428 size_t value_string_size = 0;
429 uint32_t file_type = 0;
430 uint32_t format_revision = 0;
431 uint32_t format_version = 0;
432 uint32_t column_identifier = 0;
433 uint32_t column_type = 0;
434 uint32_t index_identifier = 0;
435 uint32_t table_identifier = 0;
436 uint32_t page_size = 0;
437 int column_iterator = 0;
438 int index_iterator = 0;
439 int number_of_columns = 0;
440 int number_of_indexes = 0;
441 int number_of_tables = 0;
442 int result = 0;
443 int table_iterator = 0;
425 libesedb_column_t *column = NULL;
426 libesedb_index_t *index = NULL;
427 libesedb_table_t *table = NULL;
428 system_character_t *value_string = NULL;
429 static char *function = "esedbinfo_file_info_fprint";
430 size_t value_string_size = 0;
431 uint32_t file_type = 0;
432 uint32_t format_revision = 0;
433 uint32_t format_version = 0;
434 uint32_t column_identifier = 0;
435 uint32_t column_type = 0;
436 uint32_t index_identifier = 0;
437 uint32_t table_identifier = 0;
438 uint32_t page_size = 0;
439 int column_iterator = 0;
440 int index_iterator = 0;
441 int number_of_columns = 0;
442 int number_of_indexes = 0;
443 int number_of_tables = 0;
444 int result = 0;
445 int table_iterator = 0;
444446
445447 if( info_handle == NULL )
446448 {
632634
633635 return( -1 );
634636 }
635 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
637 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
636638 result = libesedb_table_get_utf16_name_size(
637639 table,
638640 &value_string_size,
674676
675677 return( -1 );
676678 }
677 value_string = libcstring_system_string_allocate(
679 value_string = system_string_allocate(
678680 value_string_size );
679681
680682 if( value_string == NULL )
692694
693695 return( -1 );
694696 }
695 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
697 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
696698 result = libesedb_table_get_utf16_name(
697699 table,
698700 (uint16_t *) value_string,
724726 }
725727 fprintf(
726728 info_handle->notify_stream,
727 "Table: %d\t\t\t%" PRIs_LIBCSTRING_SYSTEM " (%d)\n",
729 "Table: %d\t\t\t%" PRIs_SYSTEM " (%d)\n",
728730 table_iterator + 1,
729731 value_string,
730732 table_identifier );
732734 memory_free(
733735 value_string );
734736
735 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
737 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
736738 result = libesedb_table_get_utf16_template_name_size(
737739 table,
738740 &value_string_size,
760762 }
761763 if( value_string_size > 0 )
762764 {
763 value_string = libcstring_system_string_allocate(
765 value_string = system_string_allocate(
764766 value_string_size );
765767
766768 if( value_string == NULL )
778780
779781 return( -1 );
780782 }
781 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
783 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
782784 result = libesedb_table_get_utf16_template_name(
783785 table,
784786 (uint16_t *) value_string,
912914
913915 return( -1 );
914916 }
915 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
917 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
916918 result = libesedb_column_get_utf16_name_size(
917919 column,
918920 &value_string_size,
959961
960962 return( -1 );
961963 }
962 value_string = libcstring_system_string_allocate(
964 value_string = system_string_allocate(
963965 value_string_size );
964966
965967 if( value_string == NULL )
980982
981983 return( -1 );
982984 }
983 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
985 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
984986 result = libesedb_column_get_utf16_name(
985987 column,
986988 (uint16_t *) value_string,
10151017 }
10161018 fprintf(
10171019 info_handle->notify_stream,
1018 "\t%d\t%" PRIu32 "\t%" PRIs_LIBCSTRING_SYSTEM "\t%s\n",
1020 "\t%d\t%" PRIu32 "\t%" PRIs_SYSTEM "\t%s\n",
10191021 column_iterator + 1,
10201022 column_identifier,
10211023 value_string,
11161118
11171119 return( -1 );
11181120 }
1119 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1121 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
11201122 result = libesedb_index_get_utf16_name_size(
11211123 index,
11221124 &value_string_size,
11631165
11641166 return( -1 );
11651167 }
1166 value_string = libcstring_system_string_allocate(
1168 value_string = system_string_allocate(
11671169 value_string_size );
11681170
11691171 if( value_string == NULL )
11841186
11851187 return( -1 );
11861188 }
1187 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1189 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
11881190 result = libesedb_index_get_utf16_name(
11891191 index,
11901192 (uint16_t *) value_string,
12191221 }
12201222 fprintf(
12211223 info_handle->notify_stream,
1222 "\tIndex: %d\t\t%" PRIs_LIBCSTRING_SYSTEM " (%" PRIu32 ")\n",
1224 "\tIndex: %d\t\t%" PRIs_SYSTEM " (%" PRIu32 ")\n",
12231225 index_iterator + 1,
12241226 value_string,
12251227 index_identifier );
12951297
12961298 return( -1 );
12971299 }
1298 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1300 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
12991301 result = libesedb_index_get_utf16_name_size(
13001302 index,
13011303 &value_string_size,
13421344
13431345 return( -1 );
13441346 }
1345 value_string = libcstring_system_string_allocate(
1347 value_string = system_string_allocate(
13461348 value_string_size );
13471349
13481350 if( value_string == NULL )
13631365
13641366 return( -1 );
13651367 }
1366 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1368 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
13671369 result = libesedb_index_get_utf16_name(
13681370 index,
13691371 (uint16_t *) value_string,
13981400 }
13991401 fprintf(
14001402 info_handle->notify_stream,
1401 "Index: %d\t\t\t%" PRIs_LIBCSTRING_SYSTEM " (%d)\n",
1403 "Index: %d\t\t\t%" PRIs_SYSTEM " (%d)\n",
14021404 index_iterator + 1,
14031405 value_string,
14041406 index_identifier );
00 /*
11 * Info handle
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2626 #include <types.h>
2727
2828 #include "esedbtools_libcerror.h"
29 #include "esedbtools_libcstring.h"
3029 #include "esedbtools_libesedb.h"
3130
3231 #if defined( __cplusplus )
7170
7271 int info_handle_set_ascii_codepage(
7372 info_handle_t *info_handle,
74 const libcstring_system_character_t *string,
73 const system_character_t *string,
7574 libcerror_error_t **error );
7675
7776 int info_handle_open(
7877 info_handle_t *info_handle,
79 const libcstring_system_character_t *filename,
78 const system_character_t *filename,
8079 libcerror_error_t **error );
8180
8281 int info_handle_close(
9190 }
9291 #endif
9392
94 #endif
93 #endif /* !defined( _INFO_HANDLE_H ) */
9594
00 /*
11 * Log handle
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2222 #include <file_stream.h>
2323 #include <memory.h>
2424 #include <types.h>
25 #include <wide_string.h>
2526
2627 #if defined( HAVE_STDARG_H ) || defined( WINAPI )
2728 #include <stdarg.h>
3233 #endif
3334
3435 #include "esedbtools_libcerror.h"
35 #include "esedbtools_libcstring.h"
3636 #include "log_handle.h"
3737
3838 /* Creates a log handle
143143 */
144144 int log_handle_open(
145145 log_handle_t *log_handle,
146 const libcstring_system_character_t *filename,
146 const system_character_t *filename,
147147 libcerror_error_t **error )
148148 {
149149 static char *function = "log_handle_open";
161161 }
162162 if( filename != NULL )
163163 {
164 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
164 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
165165 log_handle->log_stream = file_stream_open_wide(
166166 filename,
167 _LIBCSTRING_SYSTEM_STRING( FILE_STREAM_OPEN_APPEND ) );
167 _WIDE_STRING( FILE_STREAM_OPEN_APPEND ) );
168168 #else
169169 log_handle->log_stream = file_stream_open(
170170 filename,
00 /*
11 * Log handle
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2626 #include <types.h>
2727
2828 #include "esedbtools_libcerror.h"
29 #include "esedbtools_libcstring.h"
3029
3130 #if defined( __cplusplus )
3231 extern "C" {
5150
5251 int log_handle_open(
5352 log_handle_t *log_handle,
54 const libcstring_system_character_t *filename,
53 const system_character_t *filename,
5554 libcerror_error_t **error );
5655
5756 int log_handle_close(
6766 }
6867 #endif
6968
70 #endif
69 #endif /* !defined( _LOG_HANDLE_H ) */
7170
00 /*
11 * MSIE web cache database export functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2222 #include <byte_stream.h>
2323 #include <file_stream.h>
2424 #include <memory.h>
25 #include <narrow_string.h>
26 #include <system_string.h>
2527 #include <types.h>
28 #include <wide_string.h>
2629
2730 #include "esedbtools_libcerror.h"
2831 #include "esedbtools_libcnotify.h"
29 #include "esedbtools_libcstring.h"
3032 #include "esedbtools_libesedb.h"
3133 #include "esedbtools_libfdatetime.h"
3234 #include "esedbtools_libuna.h"
4951 log_handle_t *log_handle,
5052 libcerror_error_t **error )
5153 {
52 libcstring_system_character_t column_name[ 256 ];
54 system_character_t column_name[ 256 ];
5355
5456 static char *function = "webcache_export_record_container";
5557 size_t column_name_size = 0;
100102 value_iterator < number_of_values;
101103 value_iterator++ )
102104 {
103 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
105 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
104106 result = libesedb_record_get_utf16_column_name_size(
105107 record,
106108 value_iterator,
140142
141143 return( -1 );
142144 }
143 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
145 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
144146 result = libesedb_record_get_utf16_column_name(
145147 record,
146148 value_iterator,
189191 {
190192 if( column_name_size == 9 )
191193 {
192 if( libcstring_system_string_compare(
194 if( system_string_compare(
193195 column_name,
194 _LIBCSTRING_SYSTEM_STRING( "SyncTime" ),
196 _SYSTEM_STRING( "SyncTime" ),
195197 8 ) == 0 )
196198 {
197199 known_column_type = WEBCACHE_KNOWN_COLUMN_TYPE_FILETIME;
199201 }
200202 else if( column_name_size == 11 )
201203 {
202 if( libcstring_system_string_compare(
204 if( system_string_compare(
203205 column_name,
204 _LIBCSTRING_SYSTEM_STRING( "ExpiryTime" ),
206 _SYSTEM_STRING( "ExpiryTime" ),
205207 10 ) == 0 )
206208 {
207209 known_column_type = WEBCACHE_KNOWN_COLUMN_TYPE_FILETIME;
209211 }
210212 else if( column_name_size == 13 )
211213 {
212 if( libcstring_system_string_compare(
214 if( system_string_compare(
213215 column_name,
214 _LIBCSTRING_SYSTEM_STRING( "AccessedTime" ),
216 _SYSTEM_STRING( "AccessedTime" ),
215217 12 ) == 0 )
216218 {
217219 known_column_type = WEBCACHE_KNOWN_COLUMN_TYPE_FILETIME;
218220 }
219 else if( libcstring_system_string_compare(
221 else if( system_string_compare(
220222 column_name,
221 _LIBCSTRING_SYSTEM_STRING( "CreationTime" ),
223 _SYSTEM_STRING( "CreationTime" ),
222224 12 ) == 0 )
223225 {
224226 known_column_type = WEBCACHE_KNOWN_COLUMN_TYPE_FILETIME;
225227 }
226 else if( libcstring_system_string_compare(
228 else if( system_string_compare(
227229 column_name,
228 _LIBCSTRING_SYSTEM_STRING( "ModifiedTime" ),
230 _SYSTEM_STRING( "ModifiedTime" ),
229231 12 ) == 0 )
230232 {
231233 known_column_type = WEBCACHE_KNOWN_COLUMN_TYPE_FILETIME;
287289 log_handle_t *log_handle,
288290 libcerror_error_t **error )
289291 {
290 libcstring_system_character_t column_name[ 256 ];
292 system_character_t column_name[ 256 ];
291293
292294 static char *function = "webcache_export_record_containers";
293295 size_t column_name_size = 0;
338340 value_iterator < number_of_values;
339341 value_iterator++ )
340342 {
341 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
343 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
342344 result = libesedb_record_get_utf16_column_name_size(
343345 record,
344346 value_iterator,
378380
379381 return( -1 );
380382 }
381 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
383 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
382384 result = libesedb_record_get_utf16_column_name(
383385 record,
384386 value_iterator,
427429 {
428430 if( column_name_size == 15 )
429431 {
430 if( libcstring_system_string_compare(
432 if( system_string_compare(
431433 column_name,
432 _LIBCSTRING_SYSTEM_STRING( "LastAccessTime" ),
434 _SYSTEM_STRING( "LastAccessTime" ),
433435 14 ) == 0 )
434436 {
435437 known_column_type = WEBCACHE_KNOWN_COLUMN_TYPE_FILETIME;
436438 }
437 else if( libcstring_system_string_compare(
439 else if( system_string_compare(
438440 column_name,
439 _LIBCSTRING_SYSTEM_STRING( "RequestHeaders" ),
441 _SYSTEM_STRING( "RequestHeaders" ),
440442 14 ) == 0 )
441443 {
442444 /* TODO */
444446 }
445447 else if( column_name_size == 16 )
446448 {
447 if( libcstring_system_string_compare(
449 if( system_string_compare(
448450 column_name,
449 _LIBCSTRING_SYSTEM_STRING( "ResponseHeaders" ),
451 _SYSTEM_STRING( "ResponseHeaders" ),
450452 15 ) == 0 )
451453 {
452454 /* TODO contains property sheets for History table */
455457 }
456458 else if( column_name_size == 17 )
457459 {
458 if( libcstring_system_string_compare(
460 if( system_string_compare(
459461 column_name,
460 _LIBCSTRING_SYSTEM_STRING( "LastScavengeTime" ),
462 _SYSTEM_STRING( "LastScavengeTime" ),
461463 16 ) == 0 )
462464 {
463465 known_column_type = WEBCACHE_KNOWN_COLUMN_TYPE_FILETIME;
00 /*
11 * MSIE web cache database export functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4949 }
5050 #endif
5151
52 #endif
52 #endif /* !defined( _WEBCACHE_H ) */
5353
00 /*
11 * Windows Search database export functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2222 #include <byte_stream.h>
2323 #include <file_stream.h>
2424 #include <memory.h>
25 #include <narrow_string.h>
26 #include <system_string.h>
2527 #include <types.h>
28 #include <wide_string.h>
2629
2730 #include "esedbtools_libcerror.h"
2831 #include "esedbtools_libcnotify.h"
29 #include "esedbtools_libcstring.h"
3032 #include "esedbtools_libesedb.h"
3133 #include "esedbtools_libfdatetime.h"
3234 #include "esedbtools_libuna.h"
11141116 FILE *record_file_stream,
11151117 libcerror_error_t **error )
11161118 {
1117 libcstring_system_character_t *value_string = NULL;
1118 uint8_t *decoded_value_data = NULL;
1119 uint8_t *decompressed_value_data = NULL;
1120 uint8_t *narrow_value_string = NULL;
1121 uint8_t *value_utf16_stream = NULL;
1122 static char *function = "windows_search_export_compressed_string_value";
1123 size_t decoded_value_data_size = 0;
1124 size_t decompressed_value_data_size = 0;
1125 size_t value_string_size = 0;
1126 size_t value_utf16_stream_size = 0;
1127 uint8_t compression_type = 0;
1128 int result = 0;
1119 system_character_t *value_string = NULL;
1120 uint8_t *decoded_value_data = NULL;
1121 uint8_t *decompressed_value_data = NULL;
1122 uint8_t *narrow_value_string = NULL;
1123 uint8_t *value_utf16_stream = NULL;
1124 static char *function = "windows_search_export_compressed_string_value";
1125 size_t decoded_value_data_size = 0;
1126 size_t decompressed_value_data_size = 0;
1127 size_t value_string_size = 0;
1128 size_t value_utf16_stream_size = 0;
1129 uint8_t compression_type = 0;
1130 int result = 0;
11291131
11301132 if( value_data == NULL )
11311133 {
14261428 memory_free(
14271429 decoded_value_data );
14281430
1429 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1431 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
14301432 result = libuna_utf16_string_size_from_utf16_stream(
14311433 value_utf16_stream,
14321434 value_utf16_stream_size,
14551457
14561458 return( -1 );
14571459 }
1458 value_string = libcstring_system_string_allocate(
1460 value_string = system_string_allocate(
14591461 value_string_size );
14601462
14611463 if( value_string == NULL )
14721474
14731475 return( -1 );
14741476 }
1475 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1477 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
14761478 result = libuna_utf16_string_copy_from_utf16_stream(
14771479 (uint16_t *) value_string,
14781480 value_string_size,
20732075 FILE *record_file_stream,
20742076 libcerror_error_t **error )
20752077 {
2076 libcstring_system_character_t filetime_string[ 32 ];
2078 system_character_t filetime_string[ 32 ];
20772079
20782080 libfdatetime_filetime_t *filetime = NULL;
20792081 uint8_t *value_data = NULL;
22442246
22452247 goto on_error;
22462248 }
2247 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
2249 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
22482250 result = libfdatetime_filetime_copy_to_utf16_string(
22492251 filetime,
22502252 (uint16_t *) filetime_string,
22852287 }
22862288 fprintf(
22872289 record_file_stream,
2288 "%" PRIs_LIBCSTRING_SYSTEM "",
2290 "%" PRIs_SYSTEM "",
22892291 filetime_string );
22902292 }
22912293 }
27702772 FILE *record_file_stream,
27712773 libcerror_error_t **error )
27722774 {
2773 libcstring_system_character_t *value_string = NULL;
2774 uint8_t *value_data = NULL;
2775 static char *function = "windows_search_export_record_value_utf16_string";
2776 size_t value_data_size = 0;
2777 size_t value_string_size = 0;
2778 uint32_t column_type = 0;
2779 uint8_t value_data_flags = 0;
2780 int result = 0;
2775 system_character_t *value_string = NULL;
2776 uint8_t *value_data = NULL;
2777 static char *function = "windows_search_export_record_value_utf16_string";
2778 size_t value_data_size = 0;
2779 size_t value_string_size = 0;
2780 uint32_t column_type = 0;
2781 uint8_t value_data_flags = 0;
2782 int result = 0;
27812783
27822784 if( record == NULL )
27832785 {
29002902 {
29012903 if( value_data != NULL )
29022904 {
2903 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
2905 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
29042906 result = libuna_utf16_string_size_from_utf16_stream(
29052907 value_data,
29062908 value_data_size,
29272929
29282930 goto on_error;
29292931 }
2930 value_string = libcstring_system_string_allocate(
2932 value_string = system_string_allocate(
29312933 value_string_size );
29322934
29332935 if( value_string == NULL )
29412943
29422944 goto on_error;
29432945 }
2944 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
2946 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
29452947 result = libuna_utf16_string_copy_from_utf16_stream(
29462948 (uint16_t *) value_string,
29472949 value_string_size,
30133015 log_handle_t *log_handle,
30143016 libcerror_error_t **error )
30153017 {
3016 libcstring_system_character_t column_name[ 256 ];
3018 system_character_t column_name[ 256 ];
30173019
30183020 static char *function = "windows_search_export_record_systemindex_0a";
30193021 size_t column_name_size = 0;
30653067 value_iterator < number_of_values;
30663068 value_iterator++ )
30673069 {
3068 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
3070 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
30693071 result = libesedb_record_get_utf16_column_name_size(
30703072 record,
30713073 value_iterator,
31053107
31063108 return( -1 );
31073109 }
3108 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
3110 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
31093111 result = libesedb_record_get_utf16_column_name(
31103112 record,
31113113 value_iterator,
31523154
31533155 if( column_type == LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_SIGNED )
31543156 {
3155 if( libcstring_system_string_compare(
3157 if( system_string_compare(
31563158 column_name,
3157 _LIBCSTRING_SYSTEM_STRING( "__SDID" ),
3159 _SYSTEM_STRING( "__SDID" ),
31583160 6 ) == 0 )
31593161 {
31603162 /* The byte order is set because the SystemIndex_0A table in the
31723174 {
31733175 if( column_name_size == 24 )
31743176 {
3175 if( libcstring_system_string_compare(
3177 if( system_string_compare(
31763178 column_name,
3177 _LIBCSTRING_SYSTEM_STRING( "System_ThumbnailCacheId" ),
3179 _SYSTEM_STRING( "System_ThumbnailCacheId" ),
31783180 23 ) == 0 )
31793181 {
31803182 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_INTEGER_64BIT;
31903192 {
31913193 if( column_name_size == 7 )
31923194 {
3193 if( libcstring_system_string_compare(
3195 if( system_string_compare(
31943196 column_name,
3195 _LIBCSTRING_SYSTEM_STRING( "__SDID" ),
3197 _SYSTEM_STRING( "__SDID" ),
31963198 6 ) == 0 )
31973199 {
31983200 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_INTEGER_32BIT;
32003202 }
32013203 else if( column_name_size == 12 )
32023204 {
3203 if( libcstring_system_string_compare(
3205 if( system_string_compare(
32043206 column_name,
3205 _LIBCSTRING_SYSTEM_STRING( "System_Kind" ),
3207 _SYSTEM_STRING( "System_Kind" ),
32063208 11 ) == 0 )
32073209 {
32083210 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
32093211 }
3210 else if( libcstring_system_string_compare(
3211 column_name,
3212 _LIBCSTRING_SYSTEM_STRING( "System_Size" ),
3212 else if( system_string_compare(
3213 column_name,
3214 _SYSTEM_STRING( "System_Size" ),
32133215 11 ) == 0 )
32143216 {
32153217 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_INTEGER_64BIT;
32183220 }
32193221 else if( column_name_size == 13 )
32203222 {
3221 if( libcstring_system_string_compare(
3223 if( system_string_compare(
32223224 column_name,
3223 _LIBCSTRING_SYSTEM_STRING( "System_Title" ),
3225 _SYSTEM_STRING( "System_Title" ),
32243226 12 ) == 0 )
32253227 {
32263228 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
32283230 }
32293231 else if( column_name_size == 14 )
32303232 {
3231 if( libcstring_system_string_compare(
3233 if( system_string_compare(
32323234 column_name,
3233 _LIBCSTRING_SYSTEM_STRING( "System_Author" ),
3235 _SYSTEM_STRING( "System_Author" ),
32343236 13 ) == 0 )
32353237 {
32363238 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
32383240 }
32393241 else if( column_name_size == 15 )
32403242 {
3241 if( libcstring_system_string_compare(
3243 if( system_string_compare(
32423244 column_name,
3243 _LIBCSTRING_SYSTEM_STRING( "System_Comment" ),
3245 _SYSTEM_STRING( "System_Comment" ),
32443246 14 ) == 0 )
32453247 {
32463248 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
32473249 }
3248 else if( libcstring_system_string_compare(
3249 column_name,
3250 _LIBCSTRING_SYSTEM_STRING( "System_DueDate" ),
3250 else if( system_string_compare(
3251 column_name,
3252 _SYSTEM_STRING( "System_DueDate" ),
32513253 14 ) == 0 )
32523254 {
32533255 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME;
32543256 }
3255 else if( libcstring_system_string_compare(
3256 column_name,
3257 _LIBCSTRING_SYSTEM_STRING( "System_EndDate" ),
3257 else if( system_string_compare(
3258 column_name,
3259 _SYSTEM_STRING( "System_EndDate" ),
32583260 14 ) == 0 )
32593261 {
32603262 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME;
32613263 }
3262 else if( libcstring_system_string_compare(
3263 column_name,
3264 _LIBCSTRING_SYSTEM_STRING( "System_ItemUrl" ),
3264 else if( system_string_compare(
3265 column_name,
3266 _SYSTEM_STRING( "System_ItemUrl" ),
32653267 14 ) == 0 )
32663268 {
32673269 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
32683270 }
3269 else if( libcstring_system_string_compare(
3270 column_name,
3271 _LIBCSTRING_SYSTEM_STRING( "System_Subject" ),
3271 else if( system_string_compare(
3272 column_name,
3273 _SYSTEM_STRING( "System_Subject" ),
32723274 14 ) == 0 )
32733275 {
32743276 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
32763278 }
32773279 else if( column_name_size == 16 )
32783280 {
3279 if( libcstring_system_string_compare(
3281 if( system_string_compare(
32803282 column_name,
3281 _LIBCSTRING_SYSTEM_STRING( "System_FileName" ),
3283 _SYSTEM_STRING( "System_FileName" ),
32823284 15 ) == 0 )
32833285 {
32843286 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
32853287 }
3286 else if( libcstring_system_string_compare(
3287 column_name,
3288 _LIBCSTRING_SYSTEM_STRING( "System_Identity" ),
3288 else if( system_string_compare(
3289 column_name,
3290 _SYSTEM_STRING( "System_Identity" ),
32893291 15 ) == 0 )
32903292 {
32913293 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
32923294 }
3293 else if( libcstring_system_string_compare(
3294 column_name,
3295 _LIBCSTRING_SYSTEM_STRING( "System_ItemDate" ),
3295 else if( system_string_compare(
3296 column_name,
3297 _SYSTEM_STRING( "System_ItemDate" ),
32963298 15 ) == 0 )
32973299 {
32983300 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME;
32993301 }
3300 else if( libcstring_system_string_compare(
3301 column_name,
3302 _LIBCSTRING_SYSTEM_STRING( "System_ItemName" ),
3302 else if( system_string_compare(
3303 column_name,
3304 _SYSTEM_STRING( "System_ItemName" ),
33033305 15 ) == 0 )
33043306 {
33053307 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
33063308 }
3307 else if( libcstring_system_string_compare(
3308 column_name,
3309 _LIBCSTRING_SYSTEM_STRING( "System_ItemType" ),
3309 else if( system_string_compare(
3310 column_name,
3311 _SYSTEM_STRING( "System_ItemType" ),
33103312 15 ) == 0 )
33113313 {
33123314 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
33133315 }
3314 else if( libcstring_system_string_compare(
3315 column_name,
3316 _LIBCSTRING_SYSTEM_STRING( "System_KindText" ),
3316 else if( system_string_compare(
3317 column_name,
3318 _SYSTEM_STRING( "System_KindText" ),
33173319 15 ) == 0 )
33183320 {
33193321 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
33203322 }
3321 else if( libcstring_system_string_compare(
3322 column_name,
3323 _LIBCSTRING_SYSTEM_STRING( "System_MIMEType" ),
3323 else if( system_string_compare(
3324 column_name,
3325 _SYSTEM_STRING( "System_MIMEType" ),
33243326 15 ) == 0 )
33253327 {
33263328 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
33283330 }
33293331 else if( column_name_size == 17 )
33303332 {
3331 if( libcstring_system_string_compare(
3333 if( system_string_compare(
33323334 column_name,
3333 _LIBCSTRING_SYSTEM_STRING( "System_Copyright" ),
3335 _SYSTEM_STRING( "System_Copyright" ),
33343336 16 ) == 0 )
33353337 {
33363338 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
33373339 }
3338 else if( libcstring_system_string_compare(
3339 column_name,
3340 _LIBCSTRING_SYSTEM_STRING( "System_FileOwner" ),
3340 else if( system_string_compare(
3341 column_name,
3342 _SYSTEM_STRING( "System_FileOwner" ),
33413343 16 ) == 0 )
33423344 {
33433345 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
33453347 }
33463348 else if( column_name_size == 18 )
33473349 {
3348 if( libcstring_system_string_compare(
3350 if( system_string_compare(
33493351 column_name,
3350 _LIBCSTRING_SYSTEM_STRING( "System_Media_MCDI" ),
3352 _SYSTEM_STRING( "System_Media_MCDI" ),
33513353 17 ) == 0 )
33523354 {
33533355 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
33543356 }
3355 else if( libcstring_system_string_compare(
3356 column_name,
3357 _LIBCSTRING_SYSTEM_STRING( "System_RatingText" ),
3357 else if( system_string_compare(
3358 column_name,
3359 _SYSTEM_STRING( "System_RatingText" ),
33583360 17 ) == 0 )
33593361 {
33603362 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
33623364 }
33633365 else if( column_name_size == 19 )
33643366 {
3365 if( libcstring_system_string_compare(
3367 if( system_string_compare(
33663368 column_name,
3367 _LIBCSTRING_SYSTEM_STRING( "System_DateCreated" ),
3369 _SYSTEM_STRING( "System_DateCreated" ),
33683370 18 ) == 0 )
33693371 {
33703372 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME;
33713373 }
3372 else if( libcstring_system_string_compare(
3373 column_name,
3374 _LIBCSTRING_SYSTEM_STRING( "System_ItemAuthors" ),
3374 else if( system_string_compare(
3375 column_name,
3376 _SYSTEM_STRING( "System_ItemAuthors" ),
33753377 18 ) == 0 )
33763378 {
33773379 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
33783380 }
3379 else if( libcstring_system_string_compare(
3380 column_name,
3381 _LIBCSTRING_SYSTEM_STRING( "System_Music_Genre" ),
3381 else if( system_string_compare(
3382 column_name,
3383 _SYSTEM_STRING( "System_Music_Genre" ),
33823384 18 ) == 0 )
33833385 {
33843386 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
33853387 }
3386 else if( libcstring_system_string_compare(
3387 column_name,
3388 _LIBCSTRING_SYSTEM_STRING( "System_ParsingName" ),
3388 else if( system_string_compare(
3389 column_name,
3390 _SYSTEM_STRING( "System_ParsingName" ),
33893391 18 ) == 0 )
33903392 {
33913393 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
33933395 }
33943396 else if( column_name_size == 20 )
33953397 {
3396 if( libcstring_system_string_compare(
3398 if( system_string_compare(
33973399 column_name,
3398 _LIBCSTRING_SYSTEM_STRING( "System_ComputerName" ),
3400 _SYSTEM_STRING( "System_ComputerName" ),
33993401 19 ) == 0 )
34003402 {
34013403 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
34023404 }
3403 else if( libcstring_system_string_compare(
3404 column_name,
3405 _LIBCSTRING_SYSTEM_STRING( "System_DateAccessed" ),
3405 else if( system_string_compare(
3406 column_name,
3407 _SYSTEM_STRING( "System_DateAccessed" ),
34063408 19 ) == 0 )
34073409 {
34083410 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME;
34093411 }
3410 else if( libcstring_system_string_compare(
3411 column_name,
3412 _LIBCSTRING_SYSTEM_STRING( "System_DateAcquired" ),
3412 else if( system_string_compare(
3413 column_name,
3414 _SYSTEM_STRING( "System_DateAcquired" ),
34133415 19 ) == 0 )
34143416 {
34153417 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME;
34163418 }
3417 else if( libcstring_system_string_compare(
3419 else if( system_string_compare(
34183420 column_name,
3419 _LIBCSTRING_SYSTEM_STRING( "System_DateImported" ),
3421 _SYSTEM_STRING( "System_DateImported" ),
34203422 19 ) == 0 )
34213423 {
34223424 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME;
34233425 }
3424 else if( libcstring_system_string_compare(
3426 else if( system_string_compare(
34253427 column_name,
3426 _LIBCSTRING_SYSTEM_STRING( "System_DateModified" ),
3428 _SYSTEM_STRING( "System_DateModified" ),
34273429 19 ) == 0 )
34283430 {
34293431 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME;
34303432 }
3431 else if( libcstring_system_string_compare(
3432 column_name,
3433 _LIBCSTRING_SYSTEM_STRING( "System_ItemTypeText" ),
3433 else if( system_string_compare(
3434 column_name,
3435 _SYSTEM_STRING( "System_ItemTypeText" ),
34343436 19 ) == 0 )
34353437 {
34363438 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
34373439 }
3438 else if( libcstring_system_string_compare(
3439 column_name,
3440 _LIBCSTRING_SYSTEM_STRING( "System_Music_Artist" ),
3440 else if( system_string_compare(
3441 column_name,
3442 _SYSTEM_STRING( "System_Music_Artist" ),
34413443 19 ) == 0 )
34423444 {
34433445 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
34443446 }
3445 else if( libcstring_system_string_compare(
3446 column_name,
3447 _LIBCSTRING_SYSTEM_STRING( "System_Search_Store" ),
3447 else if( system_string_compare(
3448 column_name,
3449 _SYSTEM_STRING( "System_Search_Store" ),
34483450 19 ) == 0 )
34493451 {
34503452 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
34523454 }
34533455 else if( column_name_size == 21 )
34543456 {
3455 if( libcstring_system_string_compare(
3457 if( system_string_compare(
34563458 column_name,
3457 _LIBCSTRING_SYSTEM_STRING( "System_FileExtension" ),
3459 _SYSTEM_STRING( "System_FileExtension" ),
34583460 20 ) == 0 )
34593461 {
34603462 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
34613463 }
3462 else if( libcstring_system_string_compare(
3463 column_name,
3464 _LIBCSTRING_SYSTEM_STRING( "System_Message_Store" ),
3464 else if( system_string_compare(
3465 column_name,
3466 _SYSTEM_STRING( "System_Message_Store" ),
34653467 20 ) == 0 )
34663468 {
34673469 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
34693471 }
34703472 else if( column_name_size == 22 )
34713473 {
3472 if( libcstring_system_string_compare(
3474 if( system_string_compare(
34733475 column_name,
3474 _LIBCSTRING_SYSTEM_STRING( "System_FlagStatusText" ),
3476 _SYSTEM_STRING( "System_FlagStatusText" ),
34753477 21 ) == 0 )
34763478 {
34773479 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
34783480 }
3479 else if( libcstring_system_string_compare(
3480 column_name,
3481 _LIBCSTRING_SYSTEM_STRING( "System_ImportanceText" ),
3481 else if( system_string_compare(
3482 column_name,
3483 _SYSTEM_STRING( "System_ImportanceText" ),
34823484 21 ) == 0 )
34833485 {
34843486 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
34853487 }
3486 else if( libcstring_system_string_compare(
3487 column_name,
3488 _LIBCSTRING_SYSTEM_STRING( "System_ItemNamePrefix" ),
3488 else if( system_string_compare(
3489 column_name,
3490 _SYSTEM_STRING( "System_ItemNamePrefix" ),
34893491 21 ) == 0 )
34903492 {
34913493 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
34923494 }
3493 else if( libcstring_system_string_compare(
3494 column_name,
3495 _LIBCSTRING_SYSTEM_STRING( "System_Media_SubTitle" ),
3495 else if( system_string_compare(
3496 column_name,
3497 _SYSTEM_STRING( "System_Media_SubTitle" ),
34963498 21 ) == 0 )
34973499 {
34983500 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
34993501 }
3500 else if( libcstring_system_string_compare(
3501 column_name,
3502 _LIBCSTRING_SYSTEM_STRING( "System_Message_ToName" ),
3502 else if( system_string_compare(
3503 column_name,
3504 _SYSTEM_STRING( "System_Message_ToName" ),
35033505 21 ) == 0 )
35043506 {
35053507 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
35063508 }
3507 else if( libcstring_system_string_compare(
3508 column_name,
3509 _LIBCSTRING_SYSTEM_STRING( "System_Music_Composer" ),
3509 else if( system_string_compare(
3510 column_name,
3511 _SYSTEM_STRING( "System_Music_Composer" ),
35103512 21 ) == 0 )
35113513 {
35123514 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
35143516 }
35153517 else if( column_name_size == 23 )
35163518 {
3517 if( libcstring_system_string_compare(
3519 if( system_string_compare(
35183520 column_name,
3519 _LIBCSTRING_SYSTEM_STRING( "System_ItemNameDisplay" ),
3521 _SYSTEM_STRING( "System_ItemNameDisplay" ),
35203522 22 ) == 0 )
35213523 {
35223524 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
35233525 }
3524 else if( libcstring_system_string_compare(
3525 column_name,
3526 _LIBCSTRING_SYSTEM_STRING( "System_ItemPathDisplay" ),
3526 else if( system_string_compare(
3527 column_name,
3528 _SYSTEM_STRING( "System_ItemPathDisplay" ),
35273529 22 ) == 0 )
35283530 {
35293531 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
35303532 }
3531 else if( libcstring_system_string_compare(
3532 column_name,
3533 _LIBCSTRING_SYSTEM_STRING( "System_Media_ContentID" ),
3533 else if( system_string_compare(
3534 column_name,
3535 _SYSTEM_STRING( "System_Media_ContentID" ),
35343536 22 ) == 0 )
35353537 {
35363538 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
35373539 }
3538 else if( libcstring_system_string_compare(
3539 column_name,
3540 _LIBCSTRING_SYSTEM_STRING( "System_Media_Publisher" ),
3540 else if( system_string_compare(
3541 column_name,
3542 _SYSTEM_STRING( "System_Media_Publisher" ),
35413543 22 ) == 0 )
35423544 {
35433545 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
35443546 }
3545 else if( libcstring_system_string_compare(
3546 column_name,
3547 _LIBCSTRING_SYSTEM_STRING( "System_Music_PartOfSet" ),
3547 else if( system_string_compare(
3548 column_name,
3549 _SYSTEM_STRING( "System_Music_PartOfSet" ),
35483550 22 ) == 0 )
35493551 {
35503552 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
35513553 }
3552 else if( libcstring_system_string_compare(
3553 column_name,
3554 _LIBCSTRING_SYSTEM_STRING( "System_Photo_DateTaken" ),
3554 else if( system_string_compare(
3555 column_name,
3556 _SYSTEM_STRING( "System_Photo_DateTaken" ),
35553557 22 ) == 0 )
35563558 {
35573559 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME;
35593561 }
35603562 else if( column_name_size == 24 )
35613563 {
3562 if( libcstring_system_string_compare(
3564 if( system_string_compare(
35633565 column_name,
3564 _LIBCSTRING_SYSTEM_STRING( "System_Image_Dimensions" ),
3566 _SYSTEM_STRING( "System_Image_Dimensions" ),
35653567 23 ) == 0 )
35663568 {
35673569 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
35683570 }
3569 else if( libcstring_system_string_compare(
3570 column_name,
3571 _LIBCSTRING_SYSTEM_STRING( "System_ItemParticipants" ),
3571 else if( system_string_compare(
3572 column_name,
3573 _SYSTEM_STRING( "System_ItemParticipants" ),
35723574 23 ) == 0 )
35733575 {
35743576 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
35753577 }
3576 else if( libcstring_system_string_compare(
3577 column_name,
3578 _LIBCSTRING_SYSTEM_STRING( "System_Message_DateSent" ),
3578 else if( system_string_compare(
3579 column_name,
3580 _SYSTEM_STRING( "System_Message_DateSent" ),
35793581 23 ) == 0 )
35803582 {
35813583 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME;
35823584 }
3583 else if( libcstring_system_string_compare(
3584 column_name,
3585 _LIBCSTRING_SYSTEM_STRING( "System_Message_FromName" ),
3585 else if( system_string_compare(
3586 column_name,
3587 _SYSTEM_STRING( "System_Message_FromName" ),
35863588 23 ) == 0 )
35873589 {
35883590 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
35893591 }
3590 else if( libcstring_system_string_compare(
3591 column_name,
3592 _LIBCSTRING_SYSTEM_STRING( "System_Music_AlbumTitle" ),
3592 else if( system_string_compare(
3593 column_name,
3594 _SYSTEM_STRING( "System_Music_AlbumTitle" ),
35933595 23 ) == 0 )
35943596 {
35953597 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
35973599 }
35983600 else if( column_name_size == 25 )
35993601 {
3600 if( libcstring_system_string_compare(
3602 if( system_string_compare(
36013603 column_name,
3602 _LIBCSTRING_SYSTEM_STRING( "System_Calendar_Location" ),
3604 _SYSTEM_STRING( "System_Calendar_Location" ),
36033605 24 ) == 0 )
36043606 {
36053607 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
36063608 }
3607 else if( libcstring_system_string_compare(
3608 column_name,
3609 _LIBCSTRING_SYSTEM_STRING( "System_Media_DateEncoded" ),
3609 else if( system_string_compare(
3610 column_name,
3611 _SYSTEM_STRING( "System_Media_DateEncoded" ),
36103612 24 ) == 0 )
36113613 {
36123614 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME;
36133615 }
3614 else if( libcstring_system_string_compare(
3615 column_name,
3616 _LIBCSTRING_SYSTEM_STRING( "System_Message_CcAddress" ),
3616 else if( system_string_compare(
3617 column_name,
3618 _SYSTEM_STRING( "System_Message_CcAddress" ),
36173619 24 ) == 0 )
36183620 {
36193621 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
36203622 }
3621 else if( libcstring_system_string_compare(
3622 column_name,
3623 _LIBCSTRING_SYSTEM_STRING( "System_Message_ToAddress" ),
3623 else if( system_string_compare(
3624 column_name,
3625 _SYSTEM_STRING( "System_Message_ToAddress" ),
36243626 24 ) == 0 )
36253627 {
36263628 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
36273629 }
3628 else if( libcstring_system_string_compare(
3629 column_name,
3630 _LIBCSTRING_SYSTEM_STRING( "System_Music_AlbumArtist" ),
3630 else if( system_string_compare(
3631 column_name,
3632 _SYSTEM_STRING( "System_Music_AlbumArtist" ),
36313633 24 ) == 0 )
36323634 {
36333635 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
36343636 }
3635 else if( libcstring_system_string_compare(
3636 column_name,
3637 _LIBCSTRING_SYSTEM_STRING( "System_Search_GatherTime" ),
3637 else if( system_string_compare(
3638 column_name,
3639 _SYSTEM_STRING( "System_Search_GatherTime" ),
36383640 24 ) == 0 )
36393641 {
36403642 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME;
36423644 }
36433645 else if( column_name_size == 26 )
36443646 {
3645 if( libcstring_system_string_compare(
3647 if( system_string_compare(
36463648 column_name,
3647 _LIBCSTRING_SYSTEM_STRING( "System_Document_DateSaved" ),
3649 _SYSTEM_STRING( "System_Document_DateSaved" ),
36483650 25 ) == 0 )
36493651 {
36503652 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME;
36513653 }
3652 else if( libcstring_system_string_compare(
3653 column_name,
3654 _LIBCSTRING_SYSTEM_STRING( "System_Media_CollectionID" ),
3654 else if( system_string_compare(
3655 column_name,
3656 _SYSTEM_STRING( "System_Media_CollectionID" ),
36553657 25 ) == 0 )
36563658 {
36573659 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
36583660 }
3659 else if( libcstring_system_string_compare(
3660 column_name,
3661 _LIBCSTRING_SYSTEM_STRING( "System_Media_DateReleased" ),
3661 else if( system_string_compare(
3662 column_name,
3663 _SYSTEM_STRING( "System_Media_DateReleased" ),
36623664 25 ) == 0 )
36633665 {
36643666 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
36653667 }
3666 else if( libcstring_system_string_compare(
3667 column_name,
3668 _LIBCSTRING_SYSTEM_STRING( "System_Message_SenderName" ),
3668 else if( system_string_compare(
3669 column_name,
3670 _SYSTEM_STRING( "System_Message_SenderName" ),
36693671 25 ) == 0 )
36703672 {
36713673 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
36723674 }
3673 else if( libcstring_system_string_compare(
3674 column_name,
3675 _LIBCSTRING_SYSTEM_STRING( "System_Search_AutoSummary" ),
3675 else if( system_string_compare(
3676 column_name,
3677 _SYSTEM_STRING( "System_Search_AutoSummary" ),
36763678 25 ) == 0 )
36773679 {
36783680 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
36803682 }
36813683 else if( column_name_size == 27 )
36823684 {
3683 if( libcstring_system_string_compare(
3685 if( system_string_compare(
36843686 column_name,
3685 _LIBCSTRING_SYSTEM_STRING( "System_Message_FromAddress" ),
3687 _SYSTEM_STRING( "System_Message_FromAddress" ),
36863688 26 ) == 0 )
36873689 {
36883690 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
36903692 }
36913693 else if( column_name_size == 28 )
36923694 {
3693 if( libcstring_system_string_compare(
3695 if( system_string_compare(
36943696 column_name,
3695 _LIBCSTRING_SYSTEM_STRING( "System_Document_DateCreated" ),
3697 _SYSTEM_STRING( "System_Document_DateCreated" ),
36963698 27 ) == 0 )
36973699 {
36983700 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME;
36993701 }
3700 else if( libcstring_system_string_compare(
3701 column_name,
3702 _LIBCSTRING_SYSTEM_STRING( "System_Media_ClassPrimaryID" ),
3702 else if( system_string_compare(
3703 column_name,
3704 _SYSTEM_STRING( "System_Media_ClassPrimaryID" ),
37033705 27 ) == 0 )
37043706 {
37053707 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
37063708 }
3707 else if( libcstring_system_string_compare(
3708 column_name,
3709 _LIBCSTRING_SYSTEM_STRING( "System_Message_DateReceived" ),
3709 else if( system_string_compare(
3710 column_name,
3711 _SYSTEM_STRING( "System_Message_DateReceived" ),
37103712 27 ) == 0 )
37113713 {
37123714 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME;
37133715 }
3714 else if( libcstring_system_string_compare(
3715 column_name,
3716 _LIBCSTRING_SYSTEM_STRING( "System_Message_MessageClass" ),
3716 else if( system_string_compare(
3717 column_name,
3718 _SYSTEM_STRING( "System_Message_MessageClass" ),
37173719 27 ) == 0 )
37183720 {
37193721 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
37213723 }
37223724 else if( column_name_size == 29 )
37233725 {
3724 if( libcstring_system_string_compare(
3726 if( system_string_compare(
37253727 column_name,
3726 _LIBCSTRING_SYSTEM_STRING( "System_ItemFolderNameDisplay" ),
3728 _SYSTEM_STRING( "System_ItemFolderNameDisplay" ),
37273729 28 ) == 0 )
37283730 {
37293731 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
37303732 }
3731 else if( libcstring_system_string_compare(
3732 column_name,
3733 _LIBCSTRING_SYSTEM_STRING( "System_ItemFolderPathDisplay" ),
3733 else if( system_string_compare(
3734 column_name,
3735 _SYSTEM_STRING( "System_ItemFolderPathDisplay" ),
37343736 28 ) == 0 )
37353737 {
37363738 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
37373739 }
3738 else if( libcstring_system_string_compare(
3739 column_name,
3740 _LIBCSTRING_SYSTEM_STRING( "System_ItemPathDisplayNarrow" ),
3740 else if( system_string_compare(
3741 column_name,
3742 _SYSTEM_STRING( "System_ItemPathDisplayNarrow" ),
37413743 28 ) == 0 )
37423744 {
37433745 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
37443746 }
3745 else if( libcstring_system_string_compare(
3746 column_name,
3747 _LIBCSTRING_SYSTEM_STRING( "System_Message_SenderAddress" ),
3747 else if( system_string_compare(
3748 column_name,
3749 _SYSTEM_STRING( "System_Message_SenderAddress" ),
37483750 28 ) == 0 )
37493751 {
37503752 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
37523754 }
37533755 else if( column_name_size == 30 )
37543756 {
3755 if( libcstring_system_string_compare(
3757 if( system_string_compare(
37563758 column_name,
3757 _LIBCSTRING_SYSTEM_STRING( "System_Link_TargetParsingPath" ),
3759 _SYSTEM_STRING( "System_Link_TargetParsingPath" ),
37583760 29 ) == 0 )
37593761 {
37603762 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
37613763 }
3762 else if( libcstring_system_string_compare(
3763 column_name,
3764 _LIBCSTRING_SYSTEM_STRING( "System_Media_ClassSecondaryID" ),
3764 else if( system_string_compare(
3765 column_name,
3766 _SYSTEM_STRING( "System_Media_ClassSecondaryID" ),
37653767 29 ) == 0 )
37663768 {
37673769 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
37683770 }
3769 else if( libcstring_system_string_compare(
3770 column_name,
3771 _LIBCSTRING_SYSTEM_STRING( "System_Message_ConversationID" ),
3771 else if( system_string_compare(
3772 column_name,
3773 _SYSTEM_STRING( "System_Message_ConversationID" ),
37723774 29 ) == 0 )
37733775 {
37743776 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
37753777 }
3776 else if( libcstring_system_string_compare(
3777 column_name,
3778 _LIBCSTRING_SYSTEM_STRING( "System_RecordedTV_EpisodeName" ),
3778 else if( system_string_compare(
3779 column_name,
3780 _SYSTEM_STRING( "System_RecordedTV_EpisodeName" ),
37793781 29 ) == 0 )
37803782 {
37813783 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
37833785 }
37843786 else if( column_name_size == 31 )
37853787 {
3786 if( libcstring_system_string_compare(
3788 if( system_string_compare(
37873789 column_name,
3788 _LIBCSTRING_SYSTEM_STRING( "System_Calendar_ShowTimeAsText" ),
3790 _SYSTEM_STRING( "System_Calendar_ShowTimeAsText" ),
37893791 30 ) == 0 )
37903792 {
37913793 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
37923794 }
3793 else if( libcstring_system_string_compare(
3794 column_name,
3795 _LIBCSTRING_SYSTEM_STRING( "System_Media_CollectionGroupID" ),
3795 else if( system_string_compare(
3796 column_name,
3797 _SYSTEM_STRING( "System_Media_CollectionGroupID" ),
37963798 30 ) == 0 )
37973799 {
37983800 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
38003802 }
38013803 else if( column_name_size == 32 )
38023804 {
3803 if( libcstring_system_string_compare(
3805 if( system_string_compare(
38043806 column_name,
3805 _LIBCSTRING_SYSTEM_STRING( "System_RecordedTV_RecordingTime" ),
3807 _SYSTEM_STRING( "System_RecordedTV_RecordingTime" ),
38063808 31 ) == 0 )
38073809 {
38083810 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME;
38103812 }
38113813 else if( column_name_size == 35 )
38123814 {
3813 if( libcstring_system_string_compare(
3815 if( system_string_compare(
38143816 column_name,
3815 _LIBCSTRING_SYSTEM_STRING( "System_ItemFolderPathDisplayNarrow" ),
3817 _SYSTEM_STRING( "System_ItemFolderPathDisplayNarrow" ),
38163818 34 ) == 0 )
38173819 {
38183820 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
38203822 }
38213823 else if( column_name_size == 37 )
38223824 {
3823 if( libcstring_system_string_compare(
3825 if( system_string_compare(
38243826 column_name,
3825 _LIBCSTRING_SYSTEM_STRING( "System_RecordedTV_ProgramDescription" ),
3827 _SYSTEM_STRING( "System_RecordedTV_ProgramDescription" ),
38263828 36 ) == 0 )
38273829 {
38283830 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_COMPRESSED;
39133915 log_handle_t *log_handle,
39143916 libcerror_error_t **error )
39153917 {
3916 libcstring_system_character_t column_name[ 256 ];
3918 system_character_t column_name[ 256 ];
39173919
39183920 static char *function = "windows_search_export_record_systemindex_gthr";
39193921 size_t column_name_size = 0;
39643966 value_iterator < number_of_values;
39653967 value_iterator++ )
39663968 {
3967 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
3969 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
39683970 result = libesedb_record_get_utf16_column_name_size(
39693971 record,
39703972 value_iterator,
40044006
40054007 return( -1 );
40064008 }
4007 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
4009 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
40084010 result = libesedb_record_get_utf16_column_name(
40094011 record,
40104012 value_iterator,
40574059 {
40584060 if( column_name_size == 10 )
40594061 {
4060 if( libcstring_system_string_compare(
4062 if( system_string_compare(
40614063 column_name,
4062 _LIBCSTRING_SYSTEM_STRING( "FileName1" ),
4064 _SYSTEM_STRING( "FileName1" ),
40634065 9 ) == 0 )
40644066 {
40654067 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_UTF16_LITTLE_ENDIAN;
40664068 }
4067 else if( libcstring_system_string_compare(
4069 else if( system_string_compare(
40684070 column_name,
4069 _LIBCSTRING_SYSTEM_STRING( "FileName2" ),
4071 _SYSTEM_STRING( "FileName2" ),
40704072 9 ) == 0 )
40714073 {
40724074 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_STRING_UTF16_LITTLE_ENDIAN;
40744076 }
40754077 else if( column_name_size == 13 )
40764078 {
4077 if( libcstring_system_string_compare(
4079 if( system_string_compare(
40784080 column_name,
4079 _LIBCSTRING_SYSTEM_STRING( "LastModified" ),
4081 _SYSTEM_STRING( "LastModified" ),
40804082 12 ) == 0 )
40814083 {
40824084 known_column_type = WINDOWS_SEARCH_KNOWN_COLUMN_TYPE_FILETIME;
00 /*
11 * Windows Search database export functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
127127 }
128128 #endif
129129
130 #endif
130 #endif /* !defined( _WINDOWS_SEARCH_H ) */
131131
00 /*
11 * Windows Security database export functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2222 #include <byte_stream.h>
2323 #include <file_stream.h>
2424 #include <memory.h>
25 #include <narrow_string.h>
26 #include <system_string.h>
2527 #include <types.h>
28 #include <wide_string.h>
2629
2730 #include "esedbtools_libcerror.h"
28 #include "esedbtools_libcstring.h"
2931 #include "esedbtools_libesedb.h"
3032 #include "esedbtools_libfdatetime.h"
3133 #include "esedbtools_libuna.h"
5052 FILE *record_file_stream,
5153 libcerror_error_t **error )
5254 {
53 libcstring_system_character_t filetime_string[ 32 ];
55 system_character_t filetime_string[ 32 ];
5456
5557 libfdatetime_filetime_t *filetime = NULL;
5658 uint8_t *value_data = NULL;
221223
222224 goto on_error;
223225 }
224 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
226 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
225227 result = libfdatetime_filetime_copy_to_utf16_string(
226228 filetime,
227229 (uint16_t *) filetime_string,
262264 }
263265 fprintf(
264266 record_file_stream,
265 "%" PRIs_LIBCSTRING_SYSTEM "",
267 "%" PRIs_SYSTEM "",
266268 filetime_string );
267269 }
268270 }
303305 FILE *record_file_stream,
304306 libcerror_error_t **error )
305307 {
306 libcstring_system_character_t *value_string = NULL;
307 uint8_t *value_data = NULL;
308 static char *function = "windows_security_export_record_value_utf16_string";
309 size_t value_data_size = 0;
310 size_t value_string_size = 0;
311 uint32_t column_type = 0;
312 uint8_t value_data_flags = 0;
313 int result = 0;
308 system_character_t *value_string = NULL;
309 uint8_t *value_data = NULL;
310 static char *function = "windows_security_export_record_value_utf16_string";
311 size_t value_data_size = 0;
312 size_t value_string_size = 0;
313 uint32_t column_type = 0;
314 uint8_t value_data_flags = 0;
315 int result = 0;
314316
315317 if( record == NULL )
316318 {
433435 {
434436 if( value_data != NULL )
435437 {
436 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
438 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
437439 result = libuna_utf16_string_size_from_utf16_stream(
438440 value_data,
439441 value_data_size,
460462
461463 goto on_error;
462464 }
463 value_string = (libcstring_system_character_t *) memory_allocate(
464 sizeof( libcstring_system_character_t ) * value_string_size );
465 value_string = system_string_allocate(
466 value_string_size );
465467
466468 if( value_string == NULL )
467469 {
474476
475477 return( -1 );
476478 }
477 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
479 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
478480 result = libuna_utf16_string_copy_from_utf16_stream(
479481 (uint16_t *) value_string,
480482 value_string_size,
545547 log_handle_t *log_handle,
546548 libcerror_error_t **error )
547549 {
548 libcstring_system_character_t column_name[ 256 ];
550 system_character_t column_name[ 256 ];
549551
550552 static char *function = "windows_security_export_record_smtblversion";
551553 size_t column_name_size = 0;
596598 value_iterator < number_of_values;
597599 value_iterator++ )
598600 {
599 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
601 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
600602 result = libesedb_record_get_utf16_column_name_size(
601603 record,
602604 value_iterator,
636638
637639 return( -1 );
638640 }
639 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
641 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
640642 result = libesedb_record_get_utf16_column_name(
641643 record,
642644 value_iterator,
689691 {
690692 if( column_name_size == 16 )
691693 {
692 if( libcstring_system_string_compare(
694 if( system_string_compare(
693695 column_name,
694 _LIBCSTRING_SYSTEM_STRING( "ConfigTimeStamp" ),
696 _SYSTEM_STRING( "ConfigTimeStamp" ),
695697 15 ) == 0 )
696698 {
697699 known_column_type = WINDOWS_SECURITY_KNOWN_COLUMN_TYPE_FILETIME;
699701 }
700702 else if( column_name_size == 17 )
701703 {
702 if( libcstring_system_string_compare(
704 if( system_string_compare(
703705 column_name,
704 _LIBCSTRING_SYSTEM_STRING( "AnalyzeTimeStamp" ),
706 _SYSTEM_STRING( "AnalyzeTimeStamp" ),
705707 16 ) == 0 )
706708 {
707709 known_column_type = WINDOWS_SECURITY_KNOWN_COLUMN_TYPE_FILETIME;
709711 }
710712 else if( column_name_size == 19 )
711713 {
712 if( libcstring_system_string_compare(
714 if( system_string_compare(
713715 column_name,
714 _LIBCSTRING_SYSTEM_STRING( "ProfileDescription" ),
716 _SYSTEM_STRING( "ProfileDescription" ),
715717 18 ) == 0 )
716718 {
717719 known_column_type = WINDOWS_SECURITY_KNOWN_COLUMN_TYPE_STRING_UTF16_LITTLE_ENDIAN;
782784 log_handle_t *log_handle,
783785 libcerror_error_t **error )
784786 {
785 libcstring_system_character_t column_name[ 256 ];
787 system_character_t column_name[ 256 ];
786788
787789 static char *function = "windows_security_export_record_smtblsection";
788790 size_t column_name_size = 0;
833835 value_iterator < number_of_values;
834836 value_iterator++ )
835837 {
836 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
838 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
837839 result = libesedb_record_get_utf16_column_name_size(
838840 record,
839841 value_iterator,
873875
874876 return( -1 );
875877 }
876 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
878 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
877879 result = libesedb_record_get_utf16_column_name(
878880 record,
879881 value_iterator,
926928 {
927929 if( column_name_size == 5 )
928930 {
929 if( libcstring_system_string_compare(
931 if( system_string_compare(
930932 column_name,
931 _LIBCSTRING_SYSTEM_STRING( "Name" ),
933 _SYSTEM_STRING( "Name" ),
932934 4 ) == 0 )
933935 {
934936 known_column_type = WINDOWS_SECURITY_KNOWN_COLUMN_TYPE_STRING_UTF16_LITTLE_ENDIAN;
00 /*
11 * Windows Security database export functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
6363 }
6464 #endif
6565
66 #endif
66 #endif /* !defined( _WINDOWS_SECURITY_H ) */
6767
9797 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9898 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9999 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101100 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102101 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103102 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
108107 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109108 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110109 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
110 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
111 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
113112 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114113 $(ACLOCAL_M4)
115114 DIST_COMMON = $(srcdir)/Makefile.am $(include_HEADERS) \
229228 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
230229 HAVE_LIBCPATH = @HAVE_LIBCPATH@
231230 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
232 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
233 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
234231 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
235232 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
236233 HAVE_LIBFDATA = @HAVE_LIBFDATA@
249246 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
250247 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
251248 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
252 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
253 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
254249 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
255250 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
256251 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
297292 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
298293 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
299294 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
300 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
301 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
302 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
303 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
304295 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
305296 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
306297 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
333324 LTLIBICONV = @LTLIBICONV@
334325 LTLIBINTL = @LTLIBINTL@
335326 LTLIBOBJS = @LTLIBOBJS@
327 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
336328 MAKEINFO = @MAKEINFO@
337329 MANIFEST_TOOL = @MANIFEST_TOOL@
338330 MKDIR_P = @MKDIR_P@
439431 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
440432 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
441433 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
442 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
443 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
444 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
445 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
446 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
447 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
448434 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
449435 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
450436 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
513499 libcpath_LIBS = @libcpath_LIBS@
514500 libcsplit_CFLAGS = @libcsplit_CFLAGS@
515501 libcsplit_LIBS = @libcsplit_LIBS@
516 libcstring_CFLAGS = @libcstring_CFLAGS@
517 libcstring_LIBS = @libcstring_LIBS@
518 libcsystem_CFLAGS = @libcsystem_CFLAGS@
519 libcsystem_LIBS = @libcsystem_LIBS@
520502 libcthreads_CFLAGS = @libcthreads_CFLAGS@
521503 libcthreads_LIBS = @libcthreads_LIBS@
522504 libdir = @libdir@
00 /*
11 * Codepage definitions for libesedb
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
100100
101101 #define LIBESEDB_CODEPAGE_WINDOWS_THAI LIBESEDB_CODEPAGE_WINDOWS_874
102102 #define LIBESEDB_CODEPAGE_WINDOWS_JAPANESE LIBESEDB_CODEPAGE_WINDOWS_932
103 #define LIBESEDB_CODEPAGE_WINDOWS_CHINESE LIBESEDB_CODEPAGE_WINDOWS_936
103 #define LIBESEDB_CODEPAGE_WINDOWS_CHINESE_SIMPLIFIED LIBESEDB_CODEPAGE_WINDOWS_936
104104 #define LIBESEDB_CODEPAGE_WINDOWS_KOREAN LIBESEDB_CODEPAGE_WINDOWS_949
105105 #define LIBESEDB_CODEPAGE_WINDOWS_CHINESE_TRADITIONAL LIBESEDB_CODEPAGE_WINDOWS_950
106106 #define LIBESEDB_CODEPAGE_WINDOWS_CENTRAL_EUROPEAN LIBESEDB_CODEPAGE_WINDOWS_1250
117117 }
118118 #endif
119119
120 #endif
120 #endif /* !defined( _LIBESEDB_CODEPAGE_H ) */
121121
00 /*
11 * Definitions for libesedb
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2323
2424 #include <libesedb/types.h>
2525
26 #define LIBESEDB_VERSION 20160622
26 #define LIBESEDB_VERSION 20170121
2727
2828 /* The version string
2929 */
30 #define LIBESEDB_VERSION_STRING "20160622"
30 #define LIBESEDB_VERSION_STRING "20170121"
3131
3232 /* The access flags definitions
3333 * bit 1 set to 1 for read access
3636 */
3737 enum LIBESEDB_ACCESS_FLAGS
3838 {
39 LIBESEDB_ACCESS_FLAG_READ = 0x01,
39 LIBESEDB_ACCESS_FLAG_READ = 0x01,
4040 /* Reserved: not supported yet */
41 LIBESEDB_ACCESS_FLAG_WRITE = 0x02
41 LIBESEDB_ACCESS_FLAG_WRITE = 0x02
4242 };
4343
4444 /* The file access macros
4545 */
46 #define LIBESEDB_OPEN_READ ( LIBESEDB_ACCESS_FLAG_READ )
46 #define LIBESEDB_OPEN_READ ( LIBESEDB_ACCESS_FLAG_READ )
4747 /* Reserved: not supported yet */
48 #define LIBESEDB_OPEN_WRITE ( LIBESEDB_ACCESS_FLAG_WRITE )
48 #define LIBESEDB_OPEN_WRITE ( LIBESEDB_ACCESS_FLAG_WRITE )
4949 /* Reserved: not supported yet */
50 #define LIBESEDB_OPEN_READ_WRITE ( LIBESEDB_ACCESS_FLAG_READ | LIBESEDB_ACCESS_FLAG_WRITE )
50 #define LIBESEDB_OPEN_READ_WRITE ( LIBESEDB_ACCESS_FLAG_READ | LIBESEDB_ACCESS_FLAG_WRITE )
5151
5252 /* The file types
5353 */
5454 enum LIBESEDB_FILE_TYPES
5555 {
56 LIBESEDB_FILE_TYPE_DATABASE = 0,
57 LIBESEDB_FILE_TYPE_STREAMING_FILE = 1
56 LIBESEDB_FILE_TYPE_DATABASE = 0,
57 LIBESEDB_FILE_TYPE_STREAMING_FILE = 1
5858 };
5959
6060 /* The get columns flags
6161 */
6262 enum LIBESEDB_GET_COLUMN_FLAGS
6363 {
64 LIBESEDB_GET_COLUMN_FLAG_IGNORE_TEMPLATE_TABLE = 0x01
64 LIBESEDB_GET_COLUMN_FLAG_IGNORE_TEMPLATE_TABLE = 0x01
6565 };
6666
6767 /* The column types
6868 */
6969 enum LIBESEDB_COLUMN_TYPES
7070 {
71 LIBESEDB_COLUMN_TYPE_NULL = 0,
72 LIBESEDB_COLUMN_TYPE_BOOLEAN = 1,
73 LIBESEDB_COLUMN_TYPE_INTEGER_8BIT_UNSIGNED = 2,
74 LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_SIGNED = 3,
75 LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_SIGNED = 4,
76 LIBESEDB_COLUMN_TYPE_CURRENCY = 5,
77 LIBESEDB_COLUMN_TYPE_FLOAT_32BIT = 6,
78 LIBESEDB_COLUMN_TYPE_DOUBLE_64BIT = 7,
79 LIBESEDB_COLUMN_TYPE_DATE_TIME = 8,
80 LIBESEDB_COLUMN_TYPE_BINARY_DATA = 9,
81 LIBESEDB_COLUMN_TYPE_TEXT = 10,
82 LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA = 11,
83 LIBESEDB_COLUMN_TYPE_LARGE_TEXT = 12,
84 LIBESEDB_COLUMN_TYPE_SUPER_LARGE_VALUE = 13,
85 LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_UNSIGNED = 14,
86 LIBESEDB_COLUMN_TYPE_INTEGER_64BIT_SIGNED = 15,
87 LIBESEDB_COLUMN_TYPE_GUID = 16,
88 LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_UNSIGNED = 17
71 LIBESEDB_COLUMN_TYPE_NULL = 0,
72 LIBESEDB_COLUMN_TYPE_BOOLEAN = 1,
73 LIBESEDB_COLUMN_TYPE_INTEGER_8BIT_UNSIGNED = 2,
74 LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_SIGNED = 3,
75 LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_SIGNED = 4,
76 LIBESEDB_COLUMN_TYPE_CURRENCY = 5,
77 LIBESEDB_COLUMN_TYPE_FLOAT_32BIT = 6,
78 LIBESEDB_COLUMN_TYPE_DOUBLE_64BIT = 7,
79 LIBESEDB_COLUMN_TYPE_DATE_TIME = 8,
80 LIBESEDB_COLUMN_TYPE_BINARY_DATA = 9,
81 LIBESEDB_COLUMN_TYPE_TEXT = 10,
82 LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA = 11,
83 LIBESEDB_COLUMN_TYPE_LARGE_TEXT = 12,
84 LIBESEDB_COLUMN_TYPE_SUPER_LARGE_VALUE = 13,
85 LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_UNSIGNED = 14,
86 LIBESEDB_COLUMN_TYPE_INTEGER_64BIT_SIGNED = 15,
87 LIBESEDB_COLUMN_TYPE_GUID = 16,
88 LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_UNSIGNED = 17
8989 };
9090
9191 /* The value flags
9292 */
9393 enum LIBESEDB_VALUE_FLAGS
9494 {
95 LIBESEDB_VALUE_FLAG_VARIABLE_SIZE = 0x01,
96 LIBESEDB_VALUE_FLAG_COMPRESSED = 0x02,
97 LIBESEDB_VALUE_FLAG_LONG_VALUE = 0x04,
98 LIBESEDB_VALUE_FLAG_MULTI_VALUE = 0x08,
95 LIBESEDB_VALUE_FLAG_VARIABLE_SIZE = 0x01,
96 LIBESEDB_VALUE_FLAG_COMPRESSED = 0x02,
97 LIBESEDB_VALUE_FLAG_LONG_VALUE = 0x04,
98 LIBESEDB_VALUE_FLAG_MULTI_VALUE = 0x08,
9999 };
100100
101 #endif
101 #endif /* !defined( _LIBESEDB_DEFINITIONS_H ) */
102102
00 /*
11 * Definitions for libesedb
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2323
2424 #include <libesedb/types.h>
2525
26 #define LIBESEDB_VERSION @VERSION@
26 #define LIBESEDB_VERSION @VERSION@
2727
2828 /* The version string
2929 */
30 #define LIBESEDB_VERSION_STRING "@VERSION@"
30 #define LIBESEDB_VERSION_STRING "@VERSION@"
3131
3232 /* The access flags definitions
3333 * bit 1 set to 1 for read access
3636 */
3737 enum LIBESEDB_ACCESS_FLAGS
3838 {
39 LIBESEDB_ACCESS_FLAG_READ = 0x01,
39 LIBESEDB_ACCESS_FLAG_READ = 0x01,
4040 /* Reserved: not supported yet */
41 LIBESEDB_ACCESS_FLAG_WRITE = 0x02
41 LIBESEDB_ACCESS_FLAG_WRITE = 0x02
4242 };
4343
4444 /* The file access macros
4545 */
46 #define LIBESEDB_OPEN_READ ( LIBESEDB_ACCESS_FLAG_READ )
46 #define LIBESEDB_OPEN_READ ( LIBESEDB_ACCESS_FLAG_READ )
4747 /* Reserved: not supported yet */
48 #define LIBESEDB_OPEN_WRITE ( LIBESEDB_ACCESS_FLAG_WRITE )
48 #define LIBESEDB_OPEN_WRITE ( LIBESEDB_ACCESS_FLAG_WRITE )
4949 /* Reserved: not supported yet */
50 #define LIBESEDB_OPEN_READ_WRITE ( LIBESEDB_ACCESS_FLAG_READ | LIBESEDB_ACCESS_FLAG_WRITE )
50 #define LIBESEDB_OPEN_READ_WRITE ( LIBESEDB_ACCESS_FLAG_READ | LIBESEDB_ACCESS_FLAG_WRITE )
5151
5252 /* The file types
5353 */
5454 enum LIBESEDB_FILE_TYPES
5555 {
56 LIBESEDB_FILE_TYPE_DATABASE = 0,
57 LIBESEDB_FILE_TYPE_STREAMING_FILE = 1
56 LIBESEDB_FILE_TYPE_DATABASE = 0,
57 LIBESEDB_FILE_TYPE_STREAMING_FILE = 1
5858 };
5959
6060 /* The get columns flags
6161 */
6262 enum LIBESEDB_GET_COLUMN_FLAGS
6363 {
64 LIBESEDB_GET_COLUMN_FLAG_IGNORE_TEMPLATE_TABLE = 0x01
64 LIBESEDB_GET_COLUMN_FLAG_IGNORE_TEMPLATE_TABLE = 0x01
6565 };
6666
6767 /* The column types
6868 */
6969 enum LIBESEDB_COLUMN_TYPES
7070 {
71 LIBESEDB_COLUMN_TYPE_NULL = 0,
72 LIBESEDB_COLUMN_TYPE_BOOLEAN = 1,
73 LIBESEDB_COLUMN_TYPE_INTEGER_8BIT_UNSIGNED = 2,
74 LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_SIGNED = 3,
75 LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_SIGNED = 4,
76 LIBESEDB_COLUMN_TYPE_CURRENCY = 5,
77 LIBESEDB_COLUMN_TYPE_FLOAT_32BIT = 6,
78 LIBESEDB_COLUMN_TYPE_DOUBLE_64BIT = 7,
79 LIBESEDB_COLUMN_TYPE_DATE_TIME = 8,
80 LIBESEDB_COLUMN_TYPE_BINARY_DATA = 9,
81 LIBESEDB_COLUMN_TYPE_TEXT = 10,
82 LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA = 11,
83 LIBESEDB_COLUMN_TYPE_LARGE_TEXT = 12,
84 LIBESEDB_COLUMN_TYPE_SUPER_LARGE_VALUE = 13,
85 LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_UNSIGNED = 14,
86 LIBESEDB_COLUMN_TYPE_INTEGER_64BIT_SIGNED = 15,
87 LIBESEDB_COLUMN_TYPE_GUID = 16,
88 LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_UNSIGNED = 17
71 LIBESEDB_COLUMN_TYPE_NULL = 0,
72 LIBESEDB_COLUMN_TYPE_BOOLEAN = 1,
73 LIBESEDB_COLUMN_TYPE_INTEGER_8BIT_UNSIGNED = 2,
74 LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_SIGNED = 3,
75 LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_SIGNED = 4,
76 LIBESEDB_COLUMN_TYPE_CURRENCY = 5,
77 LIBESEDB_COLUMN_TYPE_FLOAT_32BIT = 6,
78 LIBESEDB_COLUMN_TYPE_DOUBLE_64BIT = 7,
79 LIBESEDB_COLUMN_TYPE_DATE_TIME = 8,
80 LIBESEDB_COLUMN_TYPE_BINARY_DATA = 9,
81 LIBESEDB_COLUMN_TYPE_TEXT = 10,
82 LIBESEDB_COLUMN_TYPE_LARGE_BINARY_DATA = 11,
83 LIBESEDB_COLUMN_TYPE_LARGE_TEXT = 12,
84 LIBESEDB_COLUMN_TYPE_SUPER_LARGE_VALUE = 13,
85 LIBESEDB_COLUMN_TYPE_INTEGER_32BIT_UNSIGNED = 14,
86 LIBESEDB_COLUMN_TYPE_INTEGER_64BIT_SIGNED = 15,
87 LIBESEDB_COLUMN_TYPE_GUID = 16,
88 LIBESEDB_COLUMN_TYPE_INTEGER_16BIT_UNSIGNED = 17
8989 };
9090
9191 /* The value flags
9292 */
9393 enum LIBESEDB_VALUE_FLAGS
9494 {
95 LIBESEDB_VALUE_FLAG_VARIABLE_SIZE = 0x01,
96 LIBESEDB_VALUE_FLAG_COMPRESSED = 0x02,
97 LIBESEDB_VALUE_FLAG_LONG_VALUE = 0x04,
98 LIBESEDB_VALUE_FLAG_MULTI_VALUE = 0x08,
95 LIBESEDB_VALUE_FLAG_VARIABLE_SIZE = 0x01,
96 LIBESEDB_VALUE_FLAG_COMPRESSED = 0x02,
97 LIBESEDB_VALUE_FLAG_LONG_VALUE = 0x04,
98 LIBESEDB_VALUE_FLAG_MULTI_VALUE = 0x08,
9999 };
100100
101 #endif
101 #endif /* !defined( _LIBESEDB_DEFINITIONS_H ) */
102102
00 /*
11 * The error code definitions for libesedb
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3838 LIBESEDB_ERROR_DOMAIN_INPUT = (int) 'i',
3939 LIBESEDB_ERROR_DOMAIN_MEMORY = (int) 'm',
4040 LIBESEDB_ERROR_DOMAIN_OUTPUT = (int) 'o',
41 LIBESEDB_ERROR_DOMAIN_RUNTIME = (int) 'r',
41 LIBESEDB_ERROR_DOMAIN_RUNTIME = (int) 'r'
4242 };
4343
4444 /* The argument error codes
207207 LIBESEDB_MEMORY_ERROR_SET_FAILED = 3
208208 };
209209
210 /* The output error codes
211 */
212 enum LIBESEDB_OUTPUT_ERROR
213 {
214 LIBESEDB_OUTPUT_ERROR_GENERIC = 0,
215
216 /* There is insuficient space to write the output
217 */
218 LIBESEDB_OUTPUT_ERROR_INSUFFICIENT_SPACE = 1
219 };
220
210221 /* The runtime error codes
211222 * to signify errors regarding runtime processing
212223 */
275286 LIBESEDB_RUNTIME_ERROR_ABORT_REQUESTED = 15
276287 };
277288
278 /* The output error codes
279 */
280 enum LIBESEDB_OUTPUT_ERROR
281 {
282 LIBESEDB_OUTPUT_ERROR_GENERIC = 0,
283
284 /* There is insuficient space to write the output
285 */
286 LIBESEDB_OUTPUT_ERROR_INSUFFICIENT_SPACE = 1
287 };
288
289 #endif
290
289 #endif /* !defined( _LIBESEDB_ERROR_H ) */
290
00 /*
11 * The extern definition
2 *
23 * This header should be included in header files that export or import
34 * library functions
45 *
5 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
6 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
67 *
78 * Refer to AUTHORS for acknowledgements.
89 *
3839
3940 #endif
4041
41 #endif
42 #endif /* !defined( _LIBESEDB_EXTERN_H ) */
4243
00 /*
11 * Features of libesedb
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2323
2424 /* The libesedb type support features
2525 */
26 #if 0 || defined( HAVE_WIDE_CHARACTER_TYPE )
27 #define LIBESEDB_HAVE_WIDE_CHARACTER_TYPE 1
26 #if defined( WINAPI ) || 0
27 #define LIBESEDB_HAVE_WIDE_CHARACTER_TYPE 1
28 #endif
2829
30 #if defined( WINAPI ) || 1
31 #define LIBESEDB_HAVE_MULTI_THREAD_SUPPORT 1
2932 #endif
3033
3134 #if defined( HAVE_LIBBFIO ) || ( !defined( WINAPI ) && 0 )
4245 #endif
4346 #endif
4447
45 #endif
48 #endif /* !defined( _LIBESEDB_FEATURES_H ) */
4649
00 /*
11 * Features of libesedb
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2323
2424 /* The libesedb type support features
2525 */
26 #if @HAVE_WIDE_CHARACTER_TYPE@ || defined( HAVE_WIDE_CHARACTER_TYPE )
27 #define LIBESEDB_HAVE_WIDE_CHARACTER_TYPE 1
26 #if defined( WINAPI ) || @HAVE_WIDE_CHARACTER_TYPE@
27 #define LIBESEDB_HAVE_WIDE_CHARACTER_TYPE 1
28 #endif
2829
30 #if defined( WINAPI ) || @HAVE_MULTI_THREAD_SUPPORT@
31 #define LIBESEDB_HAVE_MULTI_THREAD_SUPPORT 1
2932 #endif
3033
3134 #if defined( HAVE_LIBBFIO ) || ( !defined( WINAPI ) && @HAVE_LIBBFIO@ )
4245 #endif
4346 #endif
4447
45 #endif
48 #endif /* !defined( _LIBESEDB_FEATURES_H ) */
4649
00 /*
11 * Type definitions for libesedb
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
180180 #elif defined( WINAPI )
181181 #include <wchar.h>
182182
183 #elif 0 || defined( HAVE_WCHAR_H )
183 #elif 1 || defined( HAVE_WCHAR_H )
184184
185185 /* __USE_UNIX98 is required to add swprintf definition
186186 */
187187 #if !defined( __USE_UNIX98 )
188188 #define __USE_UNIX98
189 #define LIBCSTRING_DEFINITION_UNIX98
189 #define LIBESEDB_DEFINITION_UNIX98
190190 #endif
191191
192192 #include <wchar.h>
193193
194 #if defined( LIBCSTRING_DEFINITION_UNIX98 )
194 #if defined( LIBESEDB_DEFINITION_UNIX98 )
195195 #undef __USE_UNIX98
196 #undef LIBCSTRING_DEFINITION_UNIX98
196 #undef LIBESEDB_DEFINITION_UNIX98
197197 #endif
198198
199199 #endif
200200
201201 /* The following type definitions hide internal data structures
202202 */
203 typedef intptr_t libesedb_column_t;
203204 typedef intptr_t libesedb_file_t;
204 typedef intptr_t libesedb_table_t;
205 typedef intptr_t libesedb_column_t;
206205 typedef intptr_t libesedb_index_t;
207 typedef intptr_t libesedb_record_t;
208206 typedef intptr_t libesedb_long_value_t;
209207 typedef intptr_t libesedb_multi_value_t;
208 typedef intptr_t libesedb_record_t;
209 typedef intptr_t libesedb_table_t;
210210
211211 #ifdef __cplusplus
212212 }
213213 #endif
214214
215 #endif
216
215 #endif /* !defined( _LIBESEDB_TYPES_H ) */
216
00 /*
11 * Type definitions for libesedb
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
186186 */
187187 #if !defined( __USE_UNIX98 )
188188 #define __USE_UNIX98
189 #define LIBCSTRING_DEFINITION_UNIX98
189 #define LIBESEDB_DEFINITION_UNIX98
190190 #endif
191191
192192 #include <wchar.h>
193193
194 #if defined( LIBCSTRING_DEFINITION_UNIX98 )
194 #if defined( LIBESEDB_DEFINITION_UNIX98 )
195195 #undef __USE_UNIX98
196 #undef LIBCSTRING_DEFINITION_UNIX98
196 #undef LIBESEDB_DEFINITION_UNIX98
197197 #endif
198198
199199 #endif
200200
201201 /* The following type definitions hide internal data structures
202202 */
203 typedef intptr_t libesedb_column_t;
203204 typedef intptr_t libesedb_file_t;
204 typedef intptr_t libesedb_table_t;
205 typedef intptr_t libesedb_column_t;
206205 typedef intptr_t libesedb_index_t;
207 typedef intptr_t libesedb_record_t;
208206 typedef intptr_t libesedb_long_value_t;
209207 typedef intptr_t libesedb_multi_value_t;
208 typedef intptr_t libesedb_record_t;
209 typedef intptr_t libesedb_table_t;
210210
211211 #ifdef __cplusplus
212212 }
213213 #endif
214214
215 #endif
216
215 #endif /* !defined( _LIBESEDB_TYPES_H ) */
216
00 /*
11 * Library to access the Extensible Storage Engine (ESE) Database File (EDB) format
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
13361336 }
13371337 #endif
13381338
1339 #endif
1340
1339 #endif /* !defined( _LIBESEDB_H ) */
1340
00 /*
11 * Library to access the Extensible Storage Engine (ESE) Database File (EDB) format
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
13361336 }
13371337 #endif
13381338
1339 #endif
1340
1339 #endif /* !defined( _LIBESEDB_H ) */
1340
11 AM_CPPFLAGS = \
22 -I$(top_srcdir)/include \
33 -I$(top_srcdir)/common \
4 @LIBCSTRING_CPPFLAGS@ \
54 @LIBCERROR_CPPFLAGS@ \
65 @LIBCTHREADS_CPPFLAGS@ \
76 @LIBCLOCALE_CPPFLAGS@ \
2928 libbfio_libcfile.h \
3029 libbfio_libclocale.h \
3130 libbfio_libcpath.h \
32 libbfio_libcstring.h \
3331 libbfio_libcthreads.h \
3432 libbfio_libuna.h \
3533 libbfio_memory_range.c libbfio_memory_range.h \
3634 libbfio_pool.c libbfio_pool.h \
3735 libbfio_support.c libbfio_support.h \
36 libbfio_system_string.c libbfio_system_string.h \
3837 libbfio_types.h \
3938 libbfio_unused.h
4039 endif
41
4240
4341 MAINTAINERCLEANFILES = \
4442 Makefile.in
9797 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9898 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9999 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101100 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102101 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103102 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
108107 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109108 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110109 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
110 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
111 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
113112 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114113 $(ACLOCAL_M4)
115114 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
125124 libbfio_file_pool.h libbfio_file_range.c libbfio_file_range.h \
126125 libbfio_handle.c libbfio_handle.h libbfio_libcdata.h \
127126 libbfio_libcerror.h libbfio_libcfile.h libbfio_libclocale.h \
128 libbfio_libcpath.h libbfio_libcstring.h libbfio_libcthreads.h \
129 libbfio_libuna.h libbfio_memory_range.c libbfio_memory_range.h \
130 libbfio_pool.c libbfio_pool.h libbfio_support.c \
131 libbfio_support.h libbfio_types.h libbfio_unused.h
127 libbfio_libcpath.h libbfio_libcthreads.h libbfio_libuna.h \
128 libbfio_memory_range.c libbfio_memory_range.h libbfio_pool.c \
129 libbfio_pool.h libbfio_support.c libbfio_support.h \
130 libbfio_system_string.c libbfio_system_string.h \
131 libbfio_types.h libbfio_unused.h
132132 @HAVE_LOCAL_LIBBFIO_TRUE@am_libbfio_la_OBJECTS = libbfio_error.lo \
133133 @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_file.lo libbfio_file_pool.lo \
134134 @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_file_range.lo \
135135 @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_handle.lo \
136136 @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_memory_range.lo \
137 @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_pool.lo libbfio_support.lo
137 @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_pool.lo libbfio_support.lo \
138 @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_system_string.lo
138139 libbfio_la_OBJECTS = $(am_libbfio_la_OBJECTS)
139140 AM_V_lt = $(am__v_lt_@AM_V@)
140141 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
244245 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
245246 HAVE_LIBCPATH = @HAVE_LIBCPATH@
246247 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
247 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
248 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
249248 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
250249 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
251250 HAVE_LIBFDATA = @HAVE_LIBFDATA@
264263 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
265264 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
266265 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
267 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
268 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
269266 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
270267 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
271268 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
312309 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
313310 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
314311 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
315 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
316 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
317 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
318 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
319312 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
320313 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
321314 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
348341 LTLIBICONV = @LTLIBICONV@
349342 LTLIBINTL = @LTLIBINTL@
350343 LTLIBOBJS = @LTLIBOBJS@
344 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
351345 MAKEINFO = @MAKEINFO@
352346 MANIFEST_TOOL = @MANIFEST_TOOL@
353347 MKDIR_P = @MKDIR_P@
454448 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
455449 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
456450 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
457 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
458 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
459 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
460 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
461 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
462 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
463451 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
464452 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
465453 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
528516 libcpath_LIBS = @libcpath_LIBS@
529517 libcsplit_CFLAGS = @libcsplit_CFLAGS@
530518 libcsplit_LIBS = @libcsplit_LIBS@
531 libcstring_CFLAGS = @libcstring_CFLAGS@
532 libcstring_LIBS = @libcstring_LIBS@
533 libcsystem_CFLAGS = @libcsystem_CFLAGS@
534 libcsystem_LIBS = @libcsystem_LIBS@
535519 libcthreads_CFLAGS = @libcthreads_CFLAGS@
536520 libcthreads_LIBS = @libcthreads_LIBS@
537521 libdir = @libdir@
583567 @HAVE_LOCAL_LIBBFIO_TRUE@AM_CPPFLAGS = \
584568 @HAVE_LOCAL_LIBBFIO_TRUE@ -I$(top_srcdir)/include \
585569 @HAVE_LOCAL_LIBBFIO_TRUE@ -I$(top_srcdir)/common \
586 @HAVE_LOCAL_LIBBFIO_TRUE@ @LIBCSTRING_CPPFLAGS@ \
587570 @HAVE_LOCAL_LIBBFIO_TRUE@ @LIBCERROR_CPPFLAGS@ \
588571 @HAVE_LOCAL_LIBBFIO_TRUE@ @LIBCTHREADS_CPPFLAGS@ \
589572 @HAVE_LOCAL_LIBBFIO_TRUE@ @LIBCLOCALE_CPPFLAGS@ \
610593 @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_libcfile.h \
611594 @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_libclocale.h \
612595 @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_libcpath.h \
613 @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_libcstring.h \
614596 @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_libcthreads.h \
615597 @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_libuna.h \
616598 @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_memory_range.c libbfio_memory_range.h \
617599 @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_pool.c libbfio_pool.h \
618600 @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_support.c libbfio_support.h \
601 @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_system_string.c libbfio_system_string.h \
619602 @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_types.h \
620603 @HAVE_LOCAL_LIBBFIO_TRUE@ libbfio_unused.h
621604
684667 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_memory_range.Plo@am__quote@
685668 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_pool.Plo@am__quote@
686669 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_support.Plo@am__quote@
670 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libbfio_system_string.Plo@am__quote@
687671
688672 .c.o:
689673 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
4242 */
4343 enum LIBBFIO_CODEPAGES
4444 {
45 LIBBFIO_CODEPAGE_ASCII = 20127,
45 LIBBFIO_CODEPAGE_ASCII = 20127,
4646
47 LIBBFIO_CODEPAGE_ISO_8859_1 = 28591,
48 LIBBFIO_CODEPAGE_ISO_8859_2 = 28592,
49 LIBBFIO_CODEPAGE_ISO_8859_3 = 28593,
50 LIBBFIO_CODEPAGE_ISO_8859_4 = 28594,
51 LIBBFIO_CODEPAGE_ISO_8859_5 = 28595,
52 LIBBFIO_CODEPAGE_ISO_8859_6 = 28596,
53 LIBBFIO_CODEPAGE_ISO_8859_7 = 28597,
54 LIBBFIO_CODEPAGE_ISO_8859_8 = 28598,
55 LIBBFIO_CODEPAGE_ISO_8859_9 = 28599,
56 LIBBFIO_CODEPAGE_ISO_8859_10 = 28600,
57 LIBBFIO_CODEPAGE_ISO_8859_11 = 28601,
58 LIBBFIO_CODEPAGE_ISO_8859_13 = 28603,
59 LIBBFIO_CODEPAGE_ISO_8859_14 = 28604,
60 LIBBFIO_CODEPAGE_ISO_8859_15 = 28605,
61 LIBBFIO_CODEPAGE_ISO_8859_16 = 28606,
47 LIBBFIO_CODEPAGE_ISO_8859_1 = 28591,
48 LIBBFIO_CODEPAGE_ISO_8859_2 = 28592,
49 LIBBFIO_CODEPAGE_ISO_8859_3 = 28593,
50 LIBBFIO_CODEPAGE_ISO_8859_4 = 28594,
51 LIBBFIO_CODEPAGE_ISO_8859_5 = 28595,
52 LIBBFIO_CODEPAGE_ISO_8859_6 = 28596,
53 LIBBFIO_CODEPAGE_ISO_8859_7 = 28597,
54 LIBBFIO_CODEPAGE_ISO_8859_8 = 28598,
55 LIBBFIO_CODEPAGE_ISO_8859_9 = 28599,
56 LIBBFIO_CODEPAGE_ISO_8859_10 = 28600,
57 LIBBFIO_CODEPAGE_ISO_8859_11 = 28601,
58 LIBBFIO_CODEPAGE_ISO_8859_13 = 28603,
59 LIBBFIO_CODEPAGE_ISO_8859_14 = 28604,
60 LIBBFIO_CODEPAGE_ISO_8859_15 = 28605,
61 LIBBFIO_CODEPAGE_ISO_8859_16 = 28606,
6262
63 LIBBFIO_CODEPAGE_KOI8_R = 20866,
64 LIBBFIO_CODEPAGE_KOI8_U = 21866,
63 LIBBFIO_CODEPAGE_KOI8_R = 20866,
64 LIBBFIO_CODEPAGE_KOI8_U = 21866,
6565
66 LIBBFIO_CODEPAGE_WINDOWS_874 = 874,
67 LIBBFIO_CODEPAGE_WINDOWS_932 = 932,
68 LIBBFIO_CODEPAGE_WINDOWS_936 = 936,
69 LIBBFIO_CODEPAGE_WINDOWS_949 = 949,
70 LIBBFIO_CODEPAGE_WINDOWS_950 = 950,
71 LIBBFIO_CODEPAGE_WINDOWS_1250 = 1250,
72 LIBBFIO_CODEPAGE_WINDOWS_1251 = 1251,
73 LIBBFIO_CODEPAGE_WINDOWS_1252 = 1252,
74 LIBBFIO_CODEPAGE_WINDOWS_1253 = 1253,
75 LIBBFIO_CODEPAGE_WINDOWS_1254 = 1254,
76 LIBBFIO_CODEPAGE_WINDOWS_1255 = 1255,
77 LIBBFIO_CODEPAGE_WINDOWS_1256 = 1256,
78 LIBBFIO_CODEPAGE_WINDOWS_1257 = 1257,
79 LIBBFIO_CODEPAGE_WINDOWS_1258 = 1258
66 LIBBFIO_CODEPAGE_WINDOWS_874 = 874,
67 LIBBFIO_CODEPAGE_WINDOWS_932 = 932,
68 LIBBFIO_CODEPAGE_WINDOWS_936 = 936,
69 LIBBFIO_CODEPAGE_WINDOWS_949 = 949,
70 LIBBFIO_CODEPAGE_WINDOWS_950 = 950,
71 LIBBFIO_CODEPAGE_WINDOWS_1250 = 1250,
72 LIBBFIO_CODEPAGE_WINDOWS_1251 = 1251,
73 LIBBFIO_CODEPAGE_WINDOWS_1252 = 1252,
74 LIBBFIO_CODEPAGE_WINDOWS_1253 = 1253,
75 LIBBFIO_CODEPAGE_WINDOWS_1254 = 1254,
76 LIBBFIO_CODEPAGE_WINDOWS_1255 = 1255,
77 LIBBFIO_CODEPAGE_WINDOWS_1256 = 1256,
78 LIBBFIO_CODEPAGE_WINDOWS_1257 = 1257,
79 LIBBFIO_CODEPAGE_WINDOWS_1258 = 1258
8080 };
8181
8282 #endif /* !defined( HAVE_LOCAL_LIBBFIO ) */
3232 * for local use of libbfio
3333 */
3434 #else
35 #define LIBBFIO_VERSION 20160528
35 #define LIBBFIO_VERSION 20161216
3636
3737 /* The libbfio version string
3838 */
39 #define LIBBFIO_VERSION_STRING "20160528"
39 #define LIBBFIO_VERSION_STRING "20161216"
4040
4141 /* The library flags definitions
4242 */
4343 libbfio_error_t *error,
4444 FILE *stream )
4545 {
46 return( libcerror_error_fprint(
47 (libcerror_error_t *) error,
48 stream ) );
46 int print_count = 0;
47
48 print_count = libcerror_error_fprint(
49 (libcerror_error_t *) error,
50 stream );
51
52 return( print_count );
4953 }
5054
5155 /* Prints a descriptive string of the error to the string
5761 char *string,
5862 size_t size )
5963 {
60 return( libcerror_error_sprint(
61 (libcerror_error_t *) error,
62 string,
63 size ) );
64 int print_count = 0;
65
66 print_count = libcerror_error_sprint(
67 (libcerror_error_t *) error,
68 string,
69 size );
70
71 return( print_count );
6472 }
6573
6674 /* Prints a backtrace of the error to the stream
7078 libbfio_error_t *error,
7179 FILE *stream )
7280 {
73 return( libcerror_error_backtrace_fprint(
74 (libcerror_error_t *) error,
75 stream ) );
81 int print_count = 0;
82
83 print_count = libcerror_error_backtrace_fprint(
84 (libcerror_error_t *) error,
85 stream );
86
87 return( print_count );
7688 }
7789
7890 /* Prints a backtrace of the error to the string
8496 char *string,
8597 size_t size )
8698 {
87 return( libcerror_error_backtrace_sprint(
88 (libcerror_error_t *) error,
89 string,
90 size ) );
99 int print_count = 0;
100
101 print_count = libcerror_error_backtrace_sprint(
102 (libcerror_error_t *) error,
103 string,
104 size );
105
106 return( print_count );
91107 }
92108
93109 #endif /* !defined( HAVE_LOCAL_LIBBFIO ) */
3737 #include <libbfio/extern.h>
3838
3939 #else
40 #define LIBBFIO_EXTERN /* extern */
4041
41 #define LIBBFIO_EXTERN extern
42 #endif /* !defined( HAVE_LOCAL_LIBBFIO ) */
4243
43 #endif
44 #endif /* !defined( _LIBBFIO_INTERNAL_EXTERN_H ) */
4445
45 #endif
46
2020
2121 #include <common.h>
2222 #include <memory.h>
23 #include <narrow_string.h>
24 #include <system_string.h>
2325 #include <types.h>
26 #include <wide_string.h>
2427
2528 #include "libbfio_definitions.h"
2629 #include "libbfio_file.h"
2730 #include "libbfio_handle.h"
2831 #include "libbfio_libcerror.h"
2932 #include "libbfio_libcfile.h"
30 #include "libbfio_libclocale.h"
3133 #include "libbfio_libcpath.h"
32 #include "libbfio_libcstring.h"
33 #include "libbfio_libuna.h"
34 #include "libbfio_system_string.h"
3435 #include "libbfio_types.h"
3536
3637 /* Creates a file IO handle
316317 if( source_file_io_handle->name_size > 0 )
317318 {
318319 if( ( source_file_io_handle->name_size > (size_t) SSIZE_MAX )
319 || ( ( sizeof( libcstring_system_character_t ) * source_file_io_handle->name_size ) > (size_t) SSIZE_MAX ) )
320 || ( ( sizeof( system_character_t ) * source_file_io_handle->name_size ) > (size_t) SSIZE_MAX ) )
320321 {
321322 libcerror_error_set(
322323 error,
327328
328329 goto on_error;
329330 }
330 ( *destination_file_io_handle )->name = libcstring_system_string_allocate(
331 ( *destination_file_io_handle )->name = system_string_allocate(
331332 source_file_io_handle->name_size );
332333
333334 if( ( *destination_file_io_handle )->name == NULL )
343344 }
344345 if( source_file_io_handle->name_size > 1 )
345346 {
346 if( libcstring_system_string_copy(
347 if( system_string_copy(
347348 ( *destination_file_io_handle )->name,
348349 source_file_io_handle->name,
349350 source_file_io_handle->name_size ) == NULL )
547548 {
548549 static char *function = "libbfio_file_io_handle_get_name_size";
549550
550 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
551 int result = 0;
552 #endif
553
554551 if( file_io_handle == NULL )
555552 {
556553 libcerror_error_set(
562559
563560 return( -1 );
564561 }
565 if( file_io_handle->name == NULL )
566 {
567 libcerror_error_set(
568 error,
569 LIBCERROR_ERROR_DOMAIN_RUNTIME,
570 LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,
571 "%s: invalid file IO handle - missing name.",
572 function );
573
574 return( -1 );
575 }
576 if( name_size == NULL )
577 {
578 libcerror_error_set(
579 error,
580 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
581 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
582 "%s: invalid name size.",
583 function );
584
585 return( -1 );
586 }
587 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
588 if( libclocale_codepage == 0 )
589 {
590 #if SIZEOF_WCHAR_T == 4
591 result = libuna_utf8_string_size_from_utf32(
592 (libuna_utf32_character_t *) file_io_handle->name,
593 file_io_handle->name_size,
594 name_size,
595 error );
596 #elif SIZEOF_WCHAR_T == 2
597 result = libuna_utf8_string_size_from_utf16(
598 (libuna_utf16_character_t *) file_io_handle->name,
599 file_io_handle->name_size,
600 name_size,
601 error );
602 #else
603 #error Unsupported size of wchar_t
604 #endif /* SIZEOF_WCHAR_T */
605 }
606 else
607 {
608 #if SIZEOF_WCHAR_T == 4
609 result = libuna_byte_stream_size_from_utf32(
610 (libuna_utf32_character_t *) file_io_handle->name,
611 file_io_handle->name_size,
612 libclocale_codepage,
613 name_size,
614 error );
615 #elif SIZEOF_WCHAR_T == 2
616 result = libuna_byte_stream_size_from_utf16(
617 (libuna_utf16_character_t *) file_io_handle->name,
618 file_io_handle->name_size,
619 libclocale_codepage,
620 name_size,
621 error );
622 #else
623 #error Unsupported size of wchar_t
624 #endif /* SIZEOF_WCHAR_T */
625 }
626 if( result != 1 )
562 if( libbfio_system_string_size_to_narrow_string(
563 file_io_handle->name,
564 file_io_handle->name_size,
565 name_size,
566 error ) != 1 )
627567 {
628568 libcerror_error_set(
629569 error,
634574
635575 return( -1 );
636576 }
637 #else
638 *name_size = file_io_handle->name_size;
639 #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */
640
641577 return( 1 );
642578 }
643579
651587 size_t name_size,
652588 libcerror_error_t **error )
653589 {
654 static char *function = "libbfio_file_io_handle_get_name";
655 size_t narrow_name_size = 0;
656
657 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
658 int result = 0;
659 #endif
590 static char *function = "libbfio_file_io_handle_get_name";
660591
661592 if( file_io_handle == NULL )
662593 {
669600
670601 return( -1 );
671602 }
672 if( file_io_handle->name == NULL )
673 {
674 libcerror_error_set(
675 error,
676 LIBCERROR_ERROR_DOMAIN_RUNTIME,
677 LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,
678 "%s: invalid file IO handle - missing name.",
679 function );
680
681 return( -1 );
682 }
683 if( name == NULL )
684 {
685 libcerror_error_set(
686 error,
687 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
688 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
689 "%s: invalid name.",
690 function );
691
692 return( -1 );
693 }
694 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
695 if( libclocale_codepage == 0 )
696 {
697 #if SIZEOF_WCHAR_T == 4
698 result = libuna_utf8_string_size_from_utf32(
699 (libuna_utf32_character_t *) file_io_handle->name,
700 file_io_handle->name_size,
701 &narrow_name_size,
702 error );
703 #elif SIZEOF_WCHAR_T == 2
704 result = libuna_utf8_string_size_from_utf16(
705 (libuna_utf16_character_t *) file_io_handle->name,
706 file_io_handle->name_size,
707 &narrow_name_size,
708 error );
709 #else
710 #error Unsupported size of wchar_t
711 #endif /* SIZEOF_WCHAR_T */
712 }
713 else
714 {
715 #if SIZEOF_WCHAR_T == 4
716 result = libuna_byte_stream_size_from_utf32(
717 (libuna_utf32_character_t *) file_io_handle->name,
718 file_io_handle->name_size,
719 libclocale_codepage,
720 &narrow_name_size,
721 error );
722 #elif SIZEOF_WCHAR_T == 2
723 result = libuna_byte_stream_size_from_utf16(
724 (libuna_utf16_character_t *) file_io_handle->name,
725 file_io_handle->name_size,
726 libclocale_codepage,
727 &narrow_name_size,
728 error );
729 #else
730 #error Unsupported size of wchar_t
731 #endif /* SIZEOF_WCHAR_T */
732 }
733 if( result != 1 )
734 {
735 libcerror_error_set(
736 error,
737 LIBCERROR_ERROR_DOMAIN_CONVERSION,
738 LIBCERROR_CONVERSION_ERROR_GENERIC,
739 "%s: unable to determine name size.",
740 function );
741
742 return( -1 );
743 }
744 #else
745 narrow_name_size = file_io_handle->name_size;
746 #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */
747
748 if( name_size < narrow_name_size )
749 {
750 libcerror_error_set(
751 error,
752 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
753 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
754 "%s: name too small.",
755 function );
756
757 return( -1 );
758 }
759 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
760 if( libclocale_codepage == 0 )
761 {
762 #if SIZEOF_WCHAR_T == 4
763 result = libuna_utf8_string_copy_from_utf32(
764 (libuna_utf8_character_t *) name,
765 name_size,
766 (libuna_utf32_character_t *) file_io_handle->name,
767 file_io_handle->name_size,
768 error );
769 #elif SIZEOF_WCHAR_T == 2
770 result = libuna_utf8_string_copy_from_utf16(
771 (libuna_utf8_character_t *) name,
772 name_size,
773 (libuna_utf16_character_t *) file_io_handle->name,
774 file_io_handle->name_size,
775 error );
776 #else
777 #error Unsupported size of wchar_t
778 #endif /* SIZEOF_WCHAR_T */
779 }
780 else
781 {
782 #if SIZEOF_WCHAR_T == 4
783 result = libuna_byte_stream_copy_from_utf32(
784 (uint8_t *) name,
785 name_size,
786 libclocale_codepage,
787 (libuna_utf32_character_t *) file_io_handle->name,
788 file_io_handle->name_size,
789 error );
790 #elif SIZEOF_WCHAR_T == 2
791 result = libuna_byte_stream_copy_from_utf16(
792 (uint8_t *) name,
793 name_size,
794 libclocale_codepage,
795 (libuna_utf16_character_t *) file_io_handle->name,
796 file_io_handle->name_size,
797 error );
798 #else
799 #error Unsupported size of wchar_t
800 #endif /* SIZEOF_WCHAR_T */
801 }
802 if( result != 1 )
603 if( libbfio_system_string_copy_to_narrow_string(
604 file_io_handle->name,
605 file_io_handle->name_size,
606 name,
607 name_size,
608 error ) != 1 )
803609 {
804610 libcerror_error_set(
805611 error,
810616
811617 return( -1 );
812618 }
813 #else
814 if( file_io_handle->name_size > 0 )
815 {
816 if( file_io_handle->name_size > 1 )
817 {
818 if( libcstring_system_string_copy(
819 name,
820 file_io_handle->name,
821 file_io_handle->name_size ) == NULL )
822 {
823 libcerror_error_set(
824 error,
825 LIBCERROR_ERROR_DOMAIN_MEMORY,
826 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
827 "%s: unable to set name.",
828 function );
829
830 return( -1 );
831 }
832 }
833 name[ file_io_handle->name_size - 1 ] = 0;
834 }
835 #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */
836
837619 return( 1 );
838620 }
839621
860642
861643 return( -1 );
862644 }
863 if( name == NULL )
864 {
865 libcerror_error_set(
866 error,
867 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
868 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
869 "%s: invalid name.",
870 function );
871
872 return( -1 );
873 }
874645 if( name_length == 0 )
875646 {
876647 libcerror_error_set(
878649 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
879650 LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS,
880651 "%s: invalid name length is zero.",
881 function );
882
883 return( -1 );
884 }
885 if( name_length >= (size_t) SSIZE_MAX )
886 {
887 libcerror_error_set(
888 error,
889 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
890 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
891 "%s: invalid name length value exceeds maximum.",
892652 function );
893653
894654 return( -1 );
927687 file_io_handle->name = NULL;
928688 file_io_handle->name_size = 0;
929689 }
930 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
931 if( libclocale_codepage == 0 )
932 {
933 #if SIZEOF_WCHAR_T == 4
934 result = libuna_utf32_string_size_from_utf8(
935 (libuna_utf8_character_t *) name,
936 name_length + 1,
937 &( file_io_handle->name_size ),
938 error );
939 #elif SIZEOF_WCHAR_T == 2
940 result = libuna_utf16_string_size_from_utf8(
941 (libuna_utf8_character_t *) name,
942 name_length + 1,
943 &( file_io_handle->name_size ),
944 error );
945 #else
946 #error Unsupported size of wchar_t
947 #endif /* SIZEOF_WCHAR_T */
948 }
949 else
950 {
951 #if SIZEOF_WCHAR_T == 4
952 result = libuna_utf32_string_size_from_byte_stream(
953 (uint8_t *) name,
954 name_length + 1,
955 libclocale_codepage,
956 &( file_io_handle->name_size ),
957 error );
958 #elif SIZEOF_WCHAR_T == 2
959 result = libuna_utf16_string_size_from_byte_stream(
960 (uint8_t *) name,
961 name_length + 1,
962 libclocale_codepage,
963 &( file_io_handle->name_size ),
964 error );
965 #else
966 #error Unsupported size of wchar_t
967 #endif /* SIZEOF_WCHAR_T */
968 }
969 if( result != 1 )
690 if( libbfio_system_string_size_from_narrow_string(
691 name,
692 name_length + 1,
693 &( file_io_handle->name_size ),
694 error ) != 1 )
970695 {
971696 libcerror_error_set(
972697 error,
977702
978703 goto on_error;
979704 }
980 #else
981 file_io_handle->name_size = name_length + 1;
982 #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */
983
984705 if( ( file_io_handle->name_size > (size_t) SSIZE_MAX )
985 || ( ( sizeof( libcstring_system_character_t ) * file_io_handle->name_size ) > (size_t) SSIZE_MAX ) )
706 || ( ( sizeof( system_character_t ) * file_io_handle->name_size ) > (size_t) SSIZE_MAX ) )
986707 {
987708 libcerror_error_set(
988709 error,
993714
994715 goto on_error;
995716 }
996 file_io_handle->name = libcstring_system_string_allocate(
717 file_io_handle->name = system_string_allocate(
997718 file_io_handle->name_size );
998719
999720 if( file_io_handle->name == NULL )
1007728
1008729 goto on_error;
1009730 }
1010 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1011 if( libclocale_codepage == 0 )
1012 {
1013 #if SIZEOF_WCHAR_T == 4
1014 result = libuna_utf32_string_copy_from_utf8(
1015 (libuna_utf32_character_t *) file_io_handle->name,
1016 file_io_handle->name_size,
1017 (libuna_utf8_character_t *) name,
1018 name_length + 1,
1019 error );
1020 #elif SIZEOF_WCHAR_T == 2
1021 result = libuna_utf16_string_copy_from_utf8(
1022 (libuna_utf16_character_t *) file_io_handle->name,
1023 file_io_handle->name_size,
1024 (libuna_utf8_character_t *) name,
1025 name_length + 1,
1026 error );
1027 #else
1028 #error Unsupported size of wchar_t
1029 #endif /* SIZEOF_WCHAR_T */
1030 }
1031 else
1032 {
1033 #if SIZEOF_WCHAR_T == 4
1034 result = libuna_utf32_string_copy_from_byte_stream(
1035 (libuna_utf32_character_t *) file_io_handle->name,
1036 file_io_handle->name_size,
1037 (uint8_t *) name,
1038 name_length + 1,
1039 libclocale_codepage,
1040 error );
1041 #elif SIZEOF_WCHAR_T == 2
1042 result = libuna_utf16_string_copy_from_byte_stream(
1043 (libuna_utf16_character_t *) file_io_handle->name,
1044 file_io_handle->name_size,
1045 (uint8_t *) name,
1046 name_length + 1,
1047 libclocale_codepage,
1048 error );
1049 #else
1050 #error Unsupported size of wchar_t
1051 #endif /* SIZEOF_WCHAR_T */
1052 }
1053 if( result != 1 )
731 if( libbfio_system_string_copy_from_narrow_string(
732 file_io_handle->name,
733 file_io_handle->name_size,
734 name,
735 name_length + 1,
736 error ) != 1 )
1054737 {
1055738 libcerror_error_set(
1056739 error,
1061744
1062745 goto on_error;
1063746 }
1064 #else
1065 if( name_length > 1 )
1066 {
1067 if( libcstring_system_string_copy(
1068 file_io_handle->name,
1069 name,
1070 name_length ) == NULL )
1071 {
1072 libcerror_error_set(
1073 error,
1074 LIBCERROR_ERROR_DOMAIN_MEMORY,
1075 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
1076 "%s: unable to set name.",
1077 function );
1078
1079 goto on_error;
1080 }
1081 }
1082 file_io_handle->name[ name_length ] = 0;
1083
1084 #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */
1085747 return( 1 );
1086748
1087749 on_error:
1090752 memory_free(
1091753 file_io_handle->name );
1092754
1093 file_io_handle->name = NULL;
1094 file_io_handle->name_size = 0;
1095 }
755 file_io_handle->name = NULL;
756 }
757 file_io_handle->name_size = 0;
758
1096759 return( -1 );
1097760 }
1098761
1271934 {
1272935 static char *function = "libbfio_file_io_handle_get_name_size_wide";
1273936
1274 #if !defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1275 int result = 0;
1276 #endif
1277
1278937 if( file_io_handle == NULL )
1279938 {
1280939 libcerror_error_set(
1286945
1287946 return( -1 );
1288947 }
1289 if( file_io_handle->name == NULL )
1290 {
1291 libcerror_error_set(
1292 error,
1293 LIBCERROR_ERROR_DOMAIN_RUNTIME,
1294 LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,
1295 "%s: invalid handle - invalid IO handle - missing name.",
1296 function );
1297
1298 return( -1 );
1299 }
1300 if( name_size == NULL )
1301 {
1302 libcerror_error_set(
1303 error,
1304 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
1305 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
1306 "%s: invalid name size.",
1307 function );
1308
1309 return( -1 );
1310 }
1311 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1312 *name_size = file_io_handle->name_size;
1313 #else
1314 if( libclocale_codepage == 0 )
1315 {
1316 #if SIZEOF_WCHAR_T == 4
1317 result = libuna_utf32_string_size_from_utf8(
1318 (libuna_utf8_character_t *) file_io_handle->name,
1319 file_io_handle->name_size,
1320 name_size,
1321 error );
1322 #elif SIZEOF_WCHAR_T == 2
1323 result = libuna_utf16_string_size_from_utf8(
1324 (libuna_utf8_character_t *) file_io_handle->name,
1325 file_io_handle->name_size,
1326 name_size,
1327 error );
1328 #else
1329 #error Unsupported size of wchar_t
1330 #endif /* SIZEOF_WCHAR_T */
1331 }
1332 else
1333 {
1334 #if SIZEOF_WCHAR_T == 4
1335 result = libuna_utf32_string_size_from_byte_stream(
1336 (uint8_t *) file_io_handle->name,
1337 file_io_handle->name_size,
1338 libclocale_codepage,
1339 name_size,
1340 error );
1341 #elif SIZEOF_WCHAR_T == 2
1342 result = libuna_utf16_string_size_from_byte_stream(
1343 (uint8_t *) file_io_handle->name,
1344 file_io_handle->name_size,
1345 libclocale_codepage,
1346 name_size,
1347 error );
1348 #else
1349 #error Unsupported size of wchar_t
1350 #endif /* SIZEOF_WCHAR_T */
1351 }
1352 if( result != 1 )
948 if( libbfio_system_string_size_to_wide_string(
949 file_io_handle->name,
950 file_io_handle->name_size,
951 name_size,
952 error ) != 1 )
1353953 {
1354954 libcerror_error_set(
1355955 error,
1360960
1361961 return( -1 );
1362962 }
1363 #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */
1364
1365963 return( 1 );
1366964 }
1367965
1376974 libcerror_error_t **error )
1377975 {
1378976 static char *function = "libbfio_file_io_handle_get_name_wide";
1379 size_t wide_name_size = 0;
1380
1381 #if !defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1382 int result = 0;
1383 #endif
1384977
1385978 if( file_io_handle == NULL )
1386979 {
1393986
1394987 return( -1 );
1395988 }
1396 if( file_io_handle->name == NULL )
1397 {
1398 libcerror_error_set(
1399 error,
1400 LIBCERROR_ERROR_DOMAIN_RUNTIME,
1401 LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,
1402 "%s: invalid handle - invalid IO handle - missing name.",
1403 function );
1404
1405 return( -1 );
1406 }
1407 if( name == NULL )
1408 {
1409 libcerror_error_set(
1410 error,
1411 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
1412 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
1413 "%s: invalid name.",
1414 function );
1415
1416 return( -1 );
1417 }
1418 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1419 wide_name_size = file_io_handle->name_size;
1420 #else
1421 if( libclocale_codepage == 0 )
1422 {
1423 #if SIZEOF_WCHAR_T == 4
1424 result = libuna_utf32_string_size_from_utf8(
1425 (libuna_utf8_character_t *) file_io_handle->name,
1426 file_io_handle->name_size,
1427 &wide_name_size,
1428 error );
1429 #elif SIZEOF_WCHAR_T == 2
1430 result = libuna_utf16_string_size_from_utf8(
1431 (libuna_utf8_character_t *) file_io_handle->name,
1432 file_io_handle->name_size,
1433 &wide_name_size,
1434 error );
1435 #else
1436 #error Unsupported size of wchar_t
1437 #endif /* SIZEOF_WCHAR_T */
1438 }
1439 else
1440 {
1441 #if SIZEOF_WCHAR_T == 4
1442 result = libuna_utf32_string_size_from_byte_stream(
1443 (uint8_t *) file_io_handle->name,
1444 file_io_handle->name_size,
1445 libclocale_codepage,
1446 &wide_name_size,
1447 error );
1448 #elif SIZEOF_WCHAR_T == 2
1449 result = libuna_utf16_string_size_from_byte_stream(
1450 (uint8_t *) file_io_handle->name,
1451 file_io_handle->name_size,
1452 libclocale_codepage,
1453 &wide_name_size,
1454 error );
1455 #else
1456 #error Unsupported size of wchar_t
1457 #endif /* SIZEOF_WCHAR_T */
1458 }
1459 if( result != 1 )
1460 {
1461 libcerror_error_set(
1462 error,
1463 LIBCERROR_ERROR_DOMAIN_CONVERSION,
1464 LIBCERROR_CONVERSION_ERROR_GENERIC,
1465 "%s: unable to determine name size.",
1466 function );
1467
1468 return( -1 );
1469 }
1470 #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */
1471
1472 if( name_size < wide_name_size )
1473 {
1474 libcerror_error_set(
1475 error,
1476 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
1477 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
1478 "%s: name too small.",
1479 function );
1480
1481 return( -1 );
1482 }
1483 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1484 if( file_io_handle->name_size > 0 )
1485 {
1486 if( file_io_handle->name_size > 1 )
1487 {
1488 if( libcstring_system_string_copy(
1489 name,
1490 file_io_handle->name,
1491 file_io_handle->name_size ) == NULL )
1492 {
1493 libcerror_error_set(
1494 error,
1495 LIBCERROR_ERROR_DOMAIN_MEMORY,
1496 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
1497 "%s: unable to set name.",
1498 function );
1499
1500 return( -1 );
1501 }
1502 }
1503 name[ file_io_handle->name_size - 1 ] = 0;
1504 }
1505 #else
1506 if( libclocale_codepage == 0 )
1507 {
1508 #if SIZEOF_WCHAR_T == 4
1509 result = libuna_utf32_string_copy_from_utf8(
1510 (libuna_utf32_character_t *) name,
1511 name_size,
1512 (libuna_utf8_character_t *) file_io_handle->name,
1513 file_io_handle->name_size,
1514 error );
1515 #elif SIZEOF_WCHAR_T == 2
1516 result = libuna_utf16_string_copy_from_utf8(
1517 (libuna_utf16_character_t *) name,
1518 name_size,
1519 (libuna_utf8_character_t *) file_io_handle->name,
1520 file_io_handle->name_size,
1521 error );
1522 #else
1523 #error Unsupported size of wchar_t
1524 #endif /* SIZEOF_WCHAR_T */
1525 }
1526 else
1527 {
1528 #if SIZEOF_WCHAR_T == 4
1529 result = libuna_utf32_string_copy_from_byte_stream(
1530 (libuna_utf32_character_t *) name,
1531 name_size,
1532 (uint8_t *) file_io_handle->name,
1533 file_io_handle->name_size,
1534 libclocale_codepage,
1535 error );
1536 #elif SIZEOF_WCHAR_T == 2
1537 result = libuna_utf16_string_copy_from_byte_stream(
1538 (libuna_utf16_character_t *) name,
1539 name_size,
1540 (uint8_t *) file_io_handle->name,
1541 file_io_handle->name_size,
1542 libclocale_codepage,
1543 error );
1544 #else
1545 #error Unsupported size of wchar_t
1546 #endif /* SIZEOF_WCHAR_T */
1547 }
1548 if( result != 1 )
989 if( libbfio_system_string_copy_to_wide_string(
990 file_io_handle->name,
991 file_io_handle->name_size,
992 name,
993 name_size,
994 error ) != 1 )
1549995 {
1550996 libcerror_error_set(
1551997 error,
15561002
15571003 return( -1 );
15581004 }
1559 #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */
1560
15611005 return( 1 );
15621006 }
15631007
15841028
15851029 return( -1 );
15861030 }
1587 if( name == NULL )
1588 {
1589 libcerror_error_set(
1590 error,
1591 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
1592 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
1593 "%s: invalid name.",
1594 function );
1595
1596 return( -1 );
1597 }
15981031 if( name_length == 0 )
15991032 {
16001033 libcerror_error_set(
16021035 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
16031036 LIBCERROR_ARGUMENT_ERROR_VALUE_ZERO_OR_LESS,
16041037 "%s: invalid name length is zero.",
1605 function );
1606
1607 return( -1 );
1608 }
1609 if( name_length >= (size_t) SSIZE_MAX )
1610 {
1611 libcerror_error_set(
1612 error,
1613 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
1614 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
1615 "%s: invalid name length value exceeds maximum.",
16161038 function );
16171039
16181040 return( -1 );
16511073 file_io_handle->name = NULL;
16521074 file_io_handle->name_size = 0;
16531075 }
1654 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1655 file_io_handle->name_size = name_length + 1;
1656 #else
1657 if( libclocale_codepage == 0 )
1658 {
1659 #if SIZEOF_WCHAR_T == 4
1660 result = libuna_utf8_string_size_from_utf32(
1661 (libuna_utf32_character_t *) name,
1662 name_length + 1,
1663 &( file_io_handle->name_size ),
1664 error );
1665 #elif SIZEOF_WCHAR_T == 2
1666 result = libuna_utf8_string_size_from_utf16(
1667 (libuna_utf16_character_t *) name,
1668 name_length + 1,
1669 &( file_io_handle->name_size ),
1670 error );
1671 #else
1672 #error Unsupported size of wchar_t
1673 #endif /* SIZEOF_WCHAR_T */
1674 }
1675 else
1676 {
1677 #if SIZEOF_WCHAR_T == 4
1678 result = libuna_byte_stream_size_from_utf32(
1679 (libuna_utf32_character_t *) name,
1680 name_length + 1,
1681 libclocale_codepage,
1682 &( file_io_handle->name_size ),
1683 error );
1684 #elif SIZEOF_WCHAR_T == 2
1685 result = libuna_byte_stream_size_from_utf16(
1686 (libuna_utf16_character_t *) name,
1687 name_length + 1,
1688 libclocale_codepage,
1689 &( file_io_handle->name_size ),
1690 error );
1691 #else
1692 #error Unsupported size of wchar_t
1693 #endif /* SIZEOF_WCHAR_T */
1694 }
1695 if( result != 1 )
1076 if( libbfio_system_string_size_from_wide_string(
1077 name,
1078 name_length + 1,
1079 &( file_io_handle->name_size ),
1080 error ) != 1 )
16961081 {
16971082 libcerror_error_set(
16981083 error,
17031088
17041089 goto on_error;
17051090 }
1706 #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */
1707
17081091 if( ( file_io_handle->name_size > (size_t) SSIZE_MAX )
1709 || ( ( sizeof( libcstring_system_character_t ) * file_io_handle->name_size ) > (size_t) SSIZE_MAX ) )
1092 || ( ( sizeof( system_character_t ) * file_io_handle->name_size ) > (size_t) SSIZE_MAX ) )
17101093 {
17111094 libcerror_error_set(
17121095 error,
17171100
17181101 goto on_error;
17191102 }
1720 file_io_handle->name = libcstring_system_string_allocate(
1103 file_io_handle->name = system_string_allocate(
17211104 file_io_handle->name_size );
17221105
17231106 if( file_io_handle->name == NULL )
17311114
17321115 goto on_error;
17331116 }
1734 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1735 if( name_length > 1 )
1736 {
1737 if( libcstring_system_string_copy(
1738 file_io_handle->name,
1739 name,
1740 name_length ) == NULL )
1741 {
1742 libcerror_error_set(
1743 error,
1744 LIBCERROR_ERROR_DOMAIN_MEMORY,
1745 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
1746 "%s: unable to set name.",
1747 function );
1748
1749 goto on_error;
1750 }
1751 }
1752 file_io_handle->name[ name_length ] = 0;
1753 #else
1754 if( libclocale_codepage == 0 )
1755 {
1756 #if SIZEOF_WCHAR_T == 4
1757 result = libuna_utf8_string_copy_from_utf32(
1758 (libuna_utf8_character_t *) file_io_handle->name,
1759 file_io_handle->name_size,
1760 (libuna_utf32_character_t *) name,
1761 name_length + 1,
1762 error );
1763 #elif SIZEOF_WCHAR_T == 2
1764 result = libuna_utf8_string_copy_from_utf16(
1765 (libuna_utf8_character_t *) file_io_handle->name,
1766 file_io_handle->name_size,
1767 (libuna_utf16_character_t *) name,
1768 name_length + 1,
1769 error );
1770 #else
1771 #error Unsupported size of wchar_t
1772 #endif /* SIZEOF_WCHAR_T */
1773 }
1774 else
1775 {
1776 #if SIZEOF_WCHAR_T == 4
1777 result = libuna_byte_stream_copy_from_utf32(
1778 (uint8_t *) file_io_handle->name,
1779 file_io_handle->name_size,
1780 libclocale_codepage,
1781 (libuna_utf32_character_t *) name,
1782 name_length + 1,
1783 error );
1784 #elif SIZEOF_WCHAR_T == 2
1785 result = libuna_byte_stream_copy_from_utf16(
1786 (uint8_t *) file_io_handle->name,
1787 file_io_handle->name_size,
1788 libclocale_codepage,
1789 (libuna_utf16_character_t *) name,
1790 name_length + 1,
1791 error );
1792 #else
1793 #error Unsupported size of wchar_t
1794 #endif /* SIZEOF_WCHAR_T */
1795 }
1796 if( result != 1 )
1117 if( libbfio_system_string_copy_from_wide_string(
1118 file_io_handle->name,
1119 file_io_handle->name_size,
1120 name,
1121 name_length + 1,
1122 error ) != 1 )
17971123 {
17981124 libcerror_error_set(
17991125 error,
18041130
18051131 goto on_error;
18061132 }
1807 #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */
1808
18091133 return( 1 );
18101134
18111135 on_error:
18141138 memory_free(
18151139 file_io_handle->name );
18161140
1817 file_io_handle->name = NULL;
1818 file_io_handle->name_size = 0;
1819 }
1141 file_io_handle->name = NULL;
1142 }
1143 file_io_handle->name_size = 0;
1144
18201145 return( -1 );
18211146 }
18221147
18551180
18561181 return( -1 );
18571182 }
1858 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1183 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
18591184 result = libcfile_file_open_wide(
18601185 file_io_handle->file,
18611186 file_io_handle->name,
18741199 error,
18751200 LIBCERROR_ERROR_DOMAIN_IO,
18761201 LIBCERROR_IO_ERROR_OPEN_FAILED,
1877 "%s: unable to open file: %" PRIs_LIBCSTRING_SYSTEM ".",
1202 "%s: unable to open file: %" PRIs_SYSTEM ".",
18781203 function,
18791204 file_io_handle->name );
1205
1206 return( -1 );
18801207 }
18811208 file_io_handle->access_flags = access_flags;
18821209
19221249 error,
19231250 LIBCERROR_ERROR_DOMAIN_IO,
19241251 LIBCERROR_IO_ERROR_OPEN_FAILED,
1925 "%s: unable to close file: %" PRIs_LIBCSTRING_SYSTEM ".",
1252 "%s: unable to close file: %" PRIs_SYSTEM ".",
19261253 function,
19271254 file_io_handle->name );
19281255
19791306 error,
19801307 LIBCERROR_ERROR_DOMAIN_IO,
19811308 LIBCERROR_IO_ERROR_READ_FAILED,
1982 "%s: unable to read from file: %" PRIs_LIBCSTRING_SYSTEM ".",
1309 "%s: unable to read from file: %" PRIs_SYSTEM ".",
19831310 function,
19841311 file_io_handle->name );
19851312
20341361 error,
20351362 LIBCERROR_ERROR_DOMAIN_IO,
20361363 LIBCERROR_IO_ERROR_WRITE_FAILED,
2037 "%s: unable to write to file: %" PRIs_LIBCSTRING_SYSTEM ".",
1364 "%s: unable to write to file: %" PRIs_SYSTEM ".",
20381365 function,
20391366 file_io_handle->name );
20401367
20891416 error,
20901417 LIBCERROR_ERROR_DOMAIN_IO,
20911418 LIBCERROR_IO_ERROR_SEEK_FAILED,
2092 "%s: unable to seek offset: %" PRIi64 " in file: %" PRIs_LIBCSTRING_SYSTEM ".",
1419 "%s: unable to seek offset: %" PRIi64 " in file: %" PRIs_SYSTEM ".",
20931420 function,
20941421 offset,
20951422 file_io_handle->name );
21311458
21321459 return( -1 );
21331460 }
2134 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1461 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
21351462 result = libcfile_file_exists_wide(
21361463 file_io_handle->name,
21371464 error );
21461473 error,
21471474 LIBCERROR_ERROR_DOMAIN_IO,
21481475 LIBCERROR_IO_ERROR_GENERIC,
2149 "%s: unable to determine if file: %" PRIs_LIBCSTRING_SYSTEM " exists.",
1476 "%s: unable to determine if file: %" PRIs_SYSTEM " exists.",
21501477 function,
21511478 file_io_handle->name );
21521479
22351562 error,
22361563 LIBCERROR_ERROR_DOMAIN_RUNTIME,
22371564 LIBCERROR_RUNTIME_ERROR_GET_FAILED,
2238 "%s: unable to retrieve size of file: %" PRIs_LIBCSTRING_SYSTEM ".",
1565 "%s: unable to retrieve size of file: %" PRIs_SYSTEM ".",
22391566 function,
22401567 file_io_handle->name );
22411568
2727 #include "libbfio_extern.h"
2828 #include "libbfio_libcerror.h"
2929 #include "libbfio_libcfile.h"
30 #include "libbfio_libcstring.h"
3130 #include "libbfio_types.h"
3231
3332 #if defined( __cplusplus )
4039 {
4140 /* The name
4241 */
43 libcstring_system_character_t *name;
42 system_character_t *name;
4443
4544 /* The size of the name
4645 */
194193 }
195194 #endif
196195
197 #endif
196 #endif /* !defined( _LIBBFIO_FILE_H ) */
198197
1919 */
2020
2121 #include <common.h>
22 #include <narrow_string.h>
2223 #include <types.h>
24 #include <wide_string.h>
2325
2426 #include "libbfio_definitions.h"
2527 #include "libbfio_file.h"
2628 #include "libbfio_file_pool.h"
2729 #include "libbfio_handle.h"
2830 #include "libbfio_libcerror.h"
29 #include "libbfio_libcstring.h"
3031 #include "libbfio_pool.h"
3132 #include "libbfio_types.h"
3233
8384 name_iterator < number_of_names;
8485 name_iterator++ )
8586 {
86 name_length = libcstring_narrow_string_length(
87 name_length = narrow_string_length(
8788 names[ name_iterator ] );
8889
8990 if( libbfio_file_initialize(
201202 name_iterator < number_of_names;
202203 name_iterator++ )
203204 {
204 name_length = libcstring_wide_string_length(
205 name_length = wide_string_length(
205206 names[ name_iterator ] );
206207
207208 if( libbfio_file_initialize(
5656 }
5757 #endif
5858
59 #endif
59 #endif /* !defined( _LIBBFIO_FILE_POOL_H ) */
6060
169169 }
170170 #endif
171171
172 #endif
172 #endif /* !defined( _LIBBFIO_FILE_RANGE_H ) */
173173
218218 internal_handle = (libbfio_internal_handle_t *) *handle;
219219 *handle = NULL;
220220
221 is_open = internal_handle->is_open(
222 internal_handle->io_handle,
223 error );
224
225 if( is_open == -1 )
226 {
227 libcerror_error_set(
228 error,
229 LIBCERROR_ERROR_DOMAIN_IO,
230 LIBCERROR_IO_ERROR_OPEN_FAILED,
231 "%s: unable to determine if handle is open.",
232 function );
233
234 result = -1;
235 }
236 else if( is_open != 0 )
237 {
238 if( internal_handle->close(
239 internal_handle->io_handle,
240 error ) != 0 )
221 if( internal_handle->is_open != NULL )
222 {
223 is_open = internal_handle->is_open(
224 internal_handle->io_handle,
225 error );
226
227 if( is_open == -1 )
241228 {
242229 libcerror_error_set(
243230 error,
244231 LIBCERROR_ERROR_DOMAIN_IO,
245 LIBCERROR_IO_ERROR_CLOSE_FAILED,
246 "%s: unable to close handle.",
232 LIBCERROR_IO_ERROR_OPEN_FAILED,
233 "%s: unable to determine if handle is open.",
247234 function );
248235
249236 result = -1;
237 }
238 }
239 if( is_open != 0 )
240 {
241 if( internal_handle->close != NULL )
242 {
243 if( internal_handle->close(
244 internal_handle->io_handle,
245 error ) != 0 )
246 {
247 libcerror_error_set(
248 error,
249 LIBCERROR_ERROR_DOMAIN_IO,
250 LIBCERROR_IO_ERROR_CLOSE_FAILED,
251 "%s: unable to close handle.",
252 function );
253
254 result = -1;
255 }
250256 }
251257 }
252258 #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( HAVE_LOCAL_LIBBFIO )
324324 }
325325 #endif
326326
327 #endif
328
327 #endif /* !defined( _LIBBFIO_INTERNAL_HANDLE_H ) */
328
+0
-51
libbfio/libbfio_libcstring.h less more
0 /*
1 * The internal libcstring header
2 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBBFIO_LIBCSTRING_H )
22 #define _LIBBFIO_LIBCSTRING_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring
27 */
28 #if defined( HAVE_LOCAL_LIBCSTRING )
29
30 #include <libcstring_definitions.h>
31 #include <libcstring_narrow_string.h>
32 #include <libcstring_system_string.h>
33 #include <libcstring_types.h>
34 #include <libcstring_wide_string.h>
35
36 #else
37
38 /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT
39 * before including libcstring.h
40 */
41 #if defined( _WIN32 ) && defined( DLL_IMPORT )
42 #define LIBCSTRING_DLL_IMPORT
43 #endif
44
45 #include <libcstring.h>
46
47 #endif /* defined( HAVE_LOCAL_LIBCSTRING ) */
48
49 #endif /* !defined( _LIBBFIO_LIBCSTRING_H ) */
50
133133 }
134134 #endif
135135
136 #endif
136 #endif /* !defined( _LIBBFIO_MEMORY_RANGE_H ) */
137137
222222 }
223223 #endif
224224
225 #endif
226
225 #endif /* !defined( _LIBBFIO_POOL_H ) */
226
2121 #include <common.h>
2222 #include <types.h>
2323
24 #include <stdio.h>
25
2624 #include "libbfio_definitions.h"
2725 #include "libbfio_libcerror.h"
2826 #include "libbfio_libclocale.h"
29 #include "libbfio_libcstring.h"
3027 #include "libbfio_support.h"
3128
3229 #if !defined( HAVE_LOCAL_LIBBFIO )
5353 }
5454 #endif
5555
56 #endif
56 #endif /* !defined( _LIBBFIO_SUPPORT_H ) */
5757
0 /*
1 * System string functions
2 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <memory.h>
23 #include <narrow_string.h>
24 #include <system_string.h>
25 #include <types.h>
26 #include <wide_string.h>
27
28 #include "libbfio_libcerror.h"
29 #include "libbfio_libclocale.h"
30 #include "libbfio_libuna.h"
31 #include "libbfio_system_string.h"
32
33 #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) && SIZEOF_WCHAR_T != 2 && SIZEOF_WCHAR_T != 4
34 #error Unsupported size of wchar_t
35 #endif
36
37 /* Determines the size of a narrow string from a system string
38 * Returns 1 if successful or -1 on error
39 */
40 int libbfio_system_string_size_to_narrow_string(
41 const system_character_t *system_string,
42 size_t system_string_size,
43 size_t *narrow_string_size,
44 libcerror_error_t **error )
45 {
46 static char *function = "libbfio_system_string_size_to_narrow_string";
47
48 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
49 int result = 0;
50 #endif
51
52 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
53 if( libclocale_codepage == 0 )
54 {
55 #if SIZEOF_WCHAR_T == 4
56 result = libuna_utf8_string_size_from_utf32(
57 (libuna_utf32_character_t *) system_string,
58 system_string_size,
59 narrow_string_size,
60 error );
61 #elif SIZEOF_WCHAR_T == 2
62 result = libuna_utf8_string_size_from_utf16(
63 (libuna_utf16_character_t *) system_string,
64 system_string_size,
65 narrow_string_size,
66 error );
67 #endif /* SIZEOF_WCHAR_T */
68 }
69 else
70 {
71 #if SIZEOF_WCHAR_T == 4
72 result = libuna_byte_stream_size_from_utf32(
73 (libuna_utf32_character_t *) system_string,
74 system_string_size,
75 libclocale_codepage,
76 narrow_string_size,
77 error );
78 #elif SIZEOF_WCHAR_T == 2
79 result = libuna_byte_stream_size_from_utf16(
80 (libuna_utf16_character_t *) system_string,
81 system_string_size,
82 libclocale_codepage,
83 narrow_string_size,
84 error );
85 #endif /* SIZEOF_WCHAR_T */
86 }
87 if( result != 1 )
88 {
89 libcerror_error_set(
90 error,
91 LIBCERROR_ERROR_DOMAIN_CONVERSION,
92 LIBCERROR_CONVERSION_ERROR_GENERIC,
93 "%s: unable to determine narrow string size.",
94 function );
95
96 return( -1 );
97 }
98 #else
99 if( system_string == NULL )
100 {
101 libcerror_error_set(
102 error,
103 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
104 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
105 "%s: invalid system string.",
106 function );
107
108 return( -1 );
109 }
110 if( system_string_size > (size_t) SSIZE_MAX )
111 {
112 libcerror_error_set(
113 error,
114 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
115 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
116 "%s: invalid system string size value exceeds maximum.",
117 function );
118
119 return( -1 );
120 }
121 if( narrow_string_size == NULL )
122 {
123 libcerror_error_set(
124 error,
125 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
126 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
127 "%s: invalid narrow string size.",
128 function );
129
130 return( -1 );
131 }
132 *narrow_string_size = system_string_size;
133
134 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
135
136 return( 1 );
137 }
138
139 /* Copies a system string to a narrow string
140 * Returns 1 if successful or -1 on error
141 */
142 int libbfio_system_string_copy_to_narrow_string(
143 const system_character_t *system_string,
144 size_t system_string_size,
145 char *narrow_string,
146 size_t narrow_string_size,
147 libcerror_error_t **error )
148 {
149 static char *function = "libbfio_system_string_copy_to_narrow_string";
150
151 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
152 int result = 0;
153 #endif
154
155 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
156 if( libclocale_codepage == 0 )
157 {
158 #if SIZEOF_WCHAR_T == 4
159 result = libuna_utf8_string_copy_from_utf32(
160 (libuna_utf8_character_t *) narrow_string,
161 narrow_string_size,
162 (libuna_utf32_character_t *) system_string,
163 system_string_size,
164 error );
165 #elif SIZEOF_WCHAR_T == 2
166 result = libuna_utf8_string_copy_from_utf16(
167 (libuna_utf8_character_t *) narrow_string,
168 narrow_string_size,
169 (libuna_utf16_character_t *) system_string,
170 system_string_size,
171 error );
172 #endif /* SIZEOF_WCHAR_T */
173 }
174 else
175 {
176 #if SIZEOF_WCHAR_T == 4
177 result = libuna_byte_stream_copy_from_utf32(
178 (uint8_t *) narrow_string,
179 narrow_string_size,
180 libclocale_codepage,
181 (libuna_utf32_character_t *) system_string,
182 system_string_size,
183 error );
184 #elif SIZEOF_WCHAR_T == 2
185 result = libuna_byte_stream_copy_from_utf16(
186 (uint8_t *) narrow_string,
187 narrow_string_size,
188 libclocale_codepage,
189 (libuna_utf16_character_t *) system_string,
190 system_string_size,
191 error );
192 #endif /* SIZEOF_WCHAR_T */
193 }
194 if( result != 1 )
195 {
196 libcerror_error_set(
197 error,
198 LIBCERROR_ERROR_DOMAIN_CONVERSION,
199 LIBCERROR_CONVERSION_ERROR_GENERIC,
200 "%s: unable to set narrow string.",
201 function );
202
203 return( -1 );
204 }
205 #else
206 if( system_string == NULL )
207 {
208 libcerror_error_set(
209 error,
210 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
211 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
212 "%s: invalid system string.",
213 function );
214
215 return( -1 );
216 }
217 if( system_string_size > (size_t) SSIZE_MAX )
218 {
219 libcerror_error_set(
220 error,
221 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
222 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
223 "%s: invalid system string size value exceeds maximum.",
224 function );
225
226 return( -1 );
227 }
228 if( narrow_string == NULL )
229 {
230 libcerror_error_set(
231 error,
232 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
233 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
234 "%s: invalid narrow string.",
235 function );
236
237 return( -1 );
238 }
239 if( narrow_string_size > (size_t) SSIZE_MAX )
240 {
241 libcerror_error_set(
242 error,
243 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
244 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
245 "%s: invalid narrow string size value exceeds maximum.",
246 function );
247
248 return( -1 );
249 }
250 if( narrow_string_size < system_string_size )
251 {
252 libcerror_error_set(
253 error,
254 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
255 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
256 "%s: invalid narrow string size value too small.",
257 function );
258
259 return( -1 );
260 }
261 if( system_string_copy(
262 narrow_string,
263 system_string,
264 system_string_size ) == NULL )
265 {
266 libcerror_error_set(
267 error,
268 LIBCERROR_ERROR_DOMAIN_MEMORY,
269 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
270 "%s: unable to set narrow string.",
271 function );
272
273 return( -1 );
274 }
275 narrow_string[ system_string_size - 1 ] = 0;
276
277 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
278
279 return( 1 );
280 }
281
282 /* Determines the size of a system string from a narrow string
283 * Returns 1 if successful or -1 on error
284 */
285 int libbfio_system_string_size_from_narrow_string(
286 const char *narrow_string,
287 size_t narrow_string_size,
288 size_t *system_string_size,
289 libcerror_error_t **error )
290 {
291 static char *function = "libbfio_system_string_size_from_narrow_string";
292
293 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
294 int result = 0;
295 #endif
296
297 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
298 if( libclocale_codepage == 0 )
299 {
300 #if SIZEOF_WCHAR_T == 4
301 result = libuna_utf32_string_size_from_utf8(
302 (libuna_utf8_character_t *) narrow_string,
303 narrow_string_size,
304 system_string_size,
305 error );
306 #elif SIZEOF_WCHAR_T == 2
307 result = libuna_utf16_string_size_from_utf8(
308 (libuna_utf8_character_t *) narrow_string,
309 narrow_string_size,
310 system_string_size,
311 error );
312 #endif /* SIZEOF_WCHAR_T */
313 }
314 else
315 {
316 #if SIZEOF_WCHAR_T == 4
317 result = libuna_utf32_string_size_from_byte_stream(
318 (uint8_t *) narrow_string,
319 narrow_string_size,
320 libclocale_codepage,
321 system_string_size,
322 error );
323 #elif SIZEOF_WCHAR_T == 2
324 result = libuna_utf16_string_size_from_byte_stream(
325 (uint8_t *) narrow_string,
326 narrow_string_size,
327 libclocale_codepage,
328 system_string_size,
329 error );
330 #endif /* SIZEOF_WCHAR_T */
331 }
332 if( result != 1 )
333 {
334 libcerror_error_set(
335 error,
336 LIBCERROR_ERROR_DOMAIN_CONVERSION,
337 LIBCERROR_CONVERSION_ERROR_GENERIC,
338 "%s: unable to determine system string size.",
339 function );
340
341 return( -1 );
342 }
343 #else
344 if( narrow_string == NULL )
345 {
346 libcerror_error_set(
347 error,
348 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
349 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
350 "%s: invalid narrow string.",
351 function );
352
353 return( -1 );
354 }
355 if( narrow_string_size > (size_t) SSIZE_MAX )
356 {
357 libcerror_error_set(
358 error,
359 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
360 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
361 "%s: invalid narrow string size value exceeds maximum.",
362 function );
363
364 return( -1 );
365 }
366 if( system_string_size == NULL )
367 {
368 libcerror_error_set(
369 error,
370 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
371 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
372 "%s: invalid system string size.",
373 function );
374
375 return( -1 );
376 }
377 *system_string_size = narrow_string_size;
378
379 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
380
381 return( 1 );
382 }
383
384 /* Copies a system string from a narrow string
385 * Returns 1 if successful or -1 on error
386 */
387 int libbfio_system_string_copy_from_narrow_string(
388 system_character_t *system_string,
389 size_t system_string_size,
390 const char *narrow_string,
391 size_t narrow_string_size,
392 libcerror_error_t **error )
393 {
394 static char *function = "libbfio_system_string_copy_from_narrow_string";
395
396 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
397 int result = 0;
398 #endif
399
400 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
401 if( libclocale_codepage == 0 )
402 {
403 #if SIZEOF_WCHAR_T == 4
404 result = libuna_utf32_string_copy_from_utf8(
405 (libuna_utf32_character_t *) system_string,
406 system_string_size,
407 (libuna_utf8_character_t *) narrow_string,
408 narrow_string_size,
409 error );
410 #elif SIZEOF_WCHAR_T == 2
411 result = libuna_utf16_string_copy_from_utf8(
412 (libuna_utf16_character_t *) system_string,
413 system_string_size,
414 (libuna_utf8_character_t *) narrow_string,
415 narrow_string_size,
416 error );
417 #endif /* SIZEOF_WCHAR_T */
418 }
419 else
420 {
421 #if SIZEOF_WCHAR_T == 4
422 result = libuna_utf32_string_copy_from_byte_stream(
423 (libuna_utf32_character_t *) system_string,
424 system_string_size,
425 (uint8_t *) narrow_string,
426 narrow_string_size,
427 libclocale_codepage,
428 error );
429 #elif SIZEOF_WCHAR_T == 2
430 result = libuna_utf16_string_copy_from_byte_stream(
431 (libuna_utf16_character_t *) system_string,
432 system_string_size,
433 (uint8_t *) narrow_string,
434 narrow_string_size,
435 libclocale_codepage,
436 error );
437 #endif /* SIZEOF_WCHAR_T */
438 }
439 if( result != 1 )
440 {
441 libcerror_error_set(
442 error,
443 LIBCERROR_ERROR_DOMAIN_CONVERSION,
444 LIBCERROR_CONVERSION_ERROR_GENERIC,
445 "%s: unable to set system string.",
446 function );
447
448 return( -1 );
449 }
450 #else
451 if( system_string == NULL )
452 {
453 libcerror_error_set(
454 error,
455 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
456 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
457 "%s: invalid system string.",
458 function );
459
460 return( -1 );
461 }
462 if( system_string_size > (size_t) SSIZE_MAX )
463 {
464 libcerror_error_set(
465 error,
466 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
467 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
468 "%s: invalid system string size value exceeds maximum.",
469 function );
470
471 return( -1 );
472 }
473 if( narrow_string == NULL )
474 {
475 libcerror_error_set(
476 error,
477 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
478 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
479 "%s: invalid narrow string.",
480 function );
481
482 return( -1 );
483 }
484 if( narrow_string_size > (size_t) SSIZE_MAX )
485 {
486 libcerror_error_set(
487 error,
488 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
489 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
490 "%s: invalid narrow string size value exceeds maximum.",
491 function );
492
493 return( -1 );
494 }
495 if( system_string_size < narrow_string_size )
496 {
497 libcerror_error_set(
498 error,
499 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
500 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
501 "%s: invalid system string size value too small.",
502 function );
503
504 return( -1 );
505 }
506 if( system_string_copy(
507 system_string,
508 narrow_string,
509 narrow_string_size ) == NULL )
510 {
511 libcerror_error_set(
512 error,
513 LIBCERROR_ERROR_DOMAIN_MEMORY,
514 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
515 "%s: unable to set narrow_string.",
516 function );
517
518 return( -1 );
519 }
520 system_string[ narrow_string_size - 1 ] = 0;
521
522 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
523
524 return( 1 );
525 }
526
527 #if defined( HAVE_WIDE_CHARACTER_TYPE )
528
529 /* Determines the size of a wide string from a system string
530 * Returns 1 if successful or -1 on error
531 */
532 int libbfio_system_string_size_to_wide_string(
533 const system_character_t *system_string,
534 size_t system_string_size,
535 size_t *wide_string_size,
536 libcerror_error_t **error )
537 {
538 static char *function = "libbfio_system_string_size_to_wide_string";
539
540 #if !defined( HAVE_WIDE_SYSTEM_CHARACTER )
541 int result = 0;
542 #endif
543
544 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
545 if( system_string == NULL )
546 {
547 libcerror_error_set(
548 error,
549 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
550 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
551 "%s: invalid system string.",
552 function );
553
554 return( -1 );
555 }
556 if( system_string_size > (size_t) SSIZE_MAX )
557 {
558 libcerror_error_set(
559 error,
560 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
561 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
562 "%s: invalid system string size value exceeds maximum.",
563 function );
564
565 return( -1 );
566 }
567 if( wide_string_size == NULL )
568 {
569 libcerror_error_set(
570 error,
571 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
572 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
573 "%s: invalid wide string size.",
574 function );
575
576 return( -1 );
577 }
578 *wide_string_size = system_string_size;
579 #else
580 if( libclocale_codepage == 0 )
581 {
582 #if SIZEOF_WCHAR_T == 4
583 result = libuna_utf32_string_size_from_utf8(
584 (libuna_utf8_character_t *) system_string,
585 system_string_size,
586 wide_string_size,
587 error );
588 #elif SIZEOF_WCHAR_T == 2
589 result = libuna_utf16_string_size_from_utf8(
590 (libuna_utf8_character_t *) system_string,
591 system_string_size,
592 wide_string_size,
593 error );
594 #endif /* SIZEOF_WCHAR_T */
595 }
596 else
597 {
598 #if SIZEOF_WCHAR_T == 4
599 result = libuna_utf32_string_size_from_byte_stream(
600 (uint8_t *) system_string,
601 system_string_size,
602 libclocale_codepage,
603 wide_string_size,
604 error );
605 #elif SIZEOF_WCHAR_T == 2
606 result = libuna_utf16_string_size_from_byte_stream(
607 (uint8_t *) system_string,
608 system_string_size,
609 libclocale_codepage,
610 wide_string_size,
611 error );
612 #endif /* SIZEOF_WCHAR_T */
613 }
614 if( result != 1 )
615 {
616 libcerror_error_set(
617 error,
618 LIBCERROR_ERROR_DOMAIN_CONVERSION,
619 LIBCERROR_CONVERSION_ERROR_GENERIC,
620 "%s: unable to determine wide string size.",
621 function );
622
623 return( -1 );
624 }
625 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
626
627 return( 1 );
628 }
629
630 /* Copies a system string to a wide string
631 * Returns 1 if successful or -1 on error
632 */
633 int libbfio_system_string_copy_to_wide_string(
634 const system_character_t *system_string,
635 size_t system_string_size,
636 wchar_t *wide_string,
637 size_t wide_string_size,
638 libcerror_error_t **error )
639 {
640 static char *function = "libbfio_system_string_copy_to_wide_string";
641
642 #if !defined( HAVE_WIDE_SYSTEM_CHARACTER )
643 int result = 0;
644 #endif
645
646 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
647 if( system_string == NULL )
648 {
649 libcerror_error_set(
650 error,
651 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
652 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
653 "%s: invalid system string.",
654 function );
655
656 return( -1 );
657 }
658 if( system_string_size > (size_t) SSIZE_MAX )
659 {
660 libcerror_error_set(
661 error,
662 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
663 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
664 "%s: invalid system string size value exceeds maximum.",
665 function );
666
667 return( -1 );
668 }
669 if( wide_string == NULL )
670 {
671 libcerror_error_set(
672 error,
673 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
674 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
675 "%s: invalid wide string.",
676 function );
677
678 return( -1 );
679 }
680 if( wide_string_size > (size_t) SSIZE_MAX )
681 {
682 libcerror_error_set(
683 error,
684 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
685 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
686 "%s: invalid wide string size value exceeds maximum.",
687 function );
688
689 return( -1 );
690 }
691 if( wide_string_size < system_string_size )
692 {
693 libcerror_error_set(
694 error,
695 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
696 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
697 "%s: invalid wide string size value too small.",
698 function );
699
700 return( -1 );
701 }
702 if( system_string_copy(
703 wide_string,
704 system_string,
705 system_string_size ) == NULL )
706 {
707 libcerror_error_set(
708 error,
709 LIBCERROR_ERROR_DOMAIN_MEMORY,
710 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
711 "%s: unable to set wide string.",
712 function );
713
714 return( -1 );
715 }
716 wide_string[ system_string_size - 1 ] = 0;
717 #else
718 if( libclocale_codepage == 0 )
719 {
720 #if SIZEOF_WCHAR_T == 4
721 result = libuna_utf32_string_copy_from_utf8(
722 (libuna_utf32_character_t *) wide_string,
723 wide_string_size,
724 (libuna_utf8_character_t *) system_string,
725 system_string_size,
726 error );
727 #elif SIZEOF_WCHAR_T == 2
728 result = libuna_utf16_string_copy_from_utf8(
729 (libuna_utf16_character_t *) wide_string,
730 wide_string_size,
731 (libuna_utf8_character_t *) system_string,
732 system_string_size,
733 error );
734 #endif /* SIZEOF_WCHAR_T */
735 }
736 else
737 {
738 #if SIZEOF_WCHAR_T == 4
739 result = libuna_utf32_string_copy_from_byte_stream(
740 (libuna_utf32_character_t *) wide_string,
741 wide_string_size,
742 (uint8_t *) system_string,
743 system_string_size,
744 libclocale_codepage,
745 error );
746 #elif SIZEOF_WCHAR_T == 2
747 result = libuna_utf16_string_copy_from_byte_stream(
748 (libuna_utf16_character_t *) wide_string,
749 wide_string_size,
750 (uint8_t *) system_string,
751 system_string_size,
752 libclocale_codepage,
753 error );
754 #endif /* SIZEOF_WCHAR_T */
755 }
756 if( result != 1 )
757 {
758 libcerror_error_set(
759 error,
760 LIBCERROR_ERROR_DOMAIN_CONVERSION,
761 LIBCERROR_CONVERSION_ERROR_GENERIC,
762 "%s: unable to set wide string.",
763 function );
764
765 return( -1 );
766 }
767 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
768
769 return( 1 );
770 }
771
772 /* Determines the size of a system string from a wide string
773 * Returns 1 if successful or -1 on error
774 */
775 int libbfio_system_string_size_from_wide_string(
776 const wchar_t *wide_string,
777 size_t wide_string_size,
778 size_t *system_string_size,
779 libcerror_error_t **error )
780 {
781 static char *function = "libbfio_system_string_size_from_wide_string";
782
783 #if !defined( HAVE_WIDE_SYSTEM_CHARACTER )
784 int result = 0;
785 #endif
786
787 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
788 if( wide_string == NULL )
789 {
790 libcerror_error_set(
791 error,
792 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
793 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
794 "%s: invalid wide string.",
795 function );
796
797 return( -1 );
798 }
799 if( wide_string_size > (size_t) SSIZE_MAX )
800 {
801 libcerror_error_set(
802 error,
803 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
804 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
805 "%s: invalid wide string size value exceeds maximum.",
806 function );
807
808 return( -1 );
809 }
810 if( system_string_size == NULL )
811 {
812 libcerror_error_set(
813 error,
814 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
815 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
816 "%s: invalid system string size.",
817 function );
818
819 return( -1 );
820 }
821 *system_string_size = wide_string_size;
822 #else
823 if( libclocale_codepage == 0 )
824 {
825 #if SIZEOF_WCHAR_T == 4
826 result = libuna_utf8_string_size_from_utf32(
827 (libuna_utf32_character_t *) wide_string,
828 wide_string_size,
829 system_string_size,
830 error );
831 #elif SIZEOF_WCHAR_T == 2
832 result = libuna_utf8_string_size_from_utf16(
833 (libuna_utf16_character_t *) wide_string,
834 wide_string_size,
835 system_string_size,
836 error );
837 #endif /* SIZEOF_WCHAR_T */
838 }
839 else
840 {
841 #if SIZEOF_WCHAR_T == 4
842 result = libuna_byte_stream_size_from_utf32(
843 (libuna_utf32_character_t *) wide_string,
844 wide_string_size,
845 libclocale_codepage,
846 system_string_size,
847 error );
848 #elif SIZEOF_WCHAR_T == 2
849 result = libuna_byte_stream_size_from_utf16(
850 (libuna_utf16_character_t *) wide_string,
851 wide_string_size,
852 libclocale_codepage,
853 system_string_size,
854 error );
855 #endif /* SIZEOF_WCHAR_T */
856 }
857 if( result != 1 )
858 {
859 libcerror_error_set(
860 error,
861 LIBCERROR_ERROR_DOMAIN_CONVERSION,
862 LIBCERROR_CONVERSION_ERROR_GENERIC,
863 "%s: unable to determine wide string size.",
864 function );
865
866 return( -1 );
867 }
868 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
869
870 return( 1 );
871 }
872
873 /* Copies a system string from a wide string
874 * Returns 1 if successful or -1 on error
875 */
876 int libbfio_system_string_copy_from_wide_string(
877 system_character_t *system_string,
878 size_t system_string_size,
879 const wchar_t *wide_string,
880 size_t wide_string_size,
881 libcerror_error_t **error )
882 {
883 static char *function = "libbfio_system_string_copy_from_wide_string";
884
885 #if !defined( HAVE_WIDE_SYSTEM_CHARACTER )
886 int result = 0;
887 #endif
888
889 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
890 if( system_string == NULL )
891 {
892 libcerror_error_set(
893 error,
894 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
895 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
896 "%s: invalid system string.",
897 function );
898
899 return( -1 );
900 }
901 if( system_string_size > (size_t) SSIZE_MAX )
902 {
903 libcerror_error_set(
904 error,
905 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
906 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
907 "%s: invalid system string size value exceeds maximum.",
908 function );
909
910 return( -1 );
911 }
912 if( wide_string == NULL )
913 {
914 libcerror_error_set(
915 error,
916 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
917 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
918 "%s: invalid wide string.",
919 function );
920
921 return( -1 );
922 }
923 if( wide_string_size > (size_t) SSIZE_MAX )
924 {
925 libcerror_error_set(
926 error,
927 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
928 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
929 "%s: invalid wide string size value exceeds maximum.",
930 function );
931
932 return( -1 );
933 }
934 if( system_string_size < wide_string_size )
935 {
936 libcerror_error_set(
937 error,
938 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
939 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
940 "%s: invalid system string size value too small.",
941 function );
942
943 return( -1 );
944 }
945 if( system_string_copy(
946 system_string,
947 wide_string,
948 wide_string_size ) == NULL )
949 {
950 libcerror_error_set(
951 error,
952 LIBCERROR_ERROR_DOMAIN_MEMORY,
953 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
954 "%s: unable to set wide_string.",
955 function );
956
957 return( -1 );
958 }
959 system_string[ wide_string_size - 1 ] = 0;
960 #else
961 if( libclocale_codepage == 0 )
962 {
963 #if SIZEOF_WCHAR_T == 4
964 result = libuna_utf8_string_copy_from_utf32(
965 (libuna_utf8_character_t *) system_string,
966 system_string_size,
967 (libuna_utf32_character_t *) wide_string,
968 wide_string_size,
969 error );
970 #elif SIZEOF_WCHAR_T == 2
971 result = libuna_utf8_string_copy_from_utf16(
972 (libuna_utf8_character_t *) system_string,
973 system_string_size,
974 (libuna_utf16_character_t *) wide_string,
975 wide_string_size,
976 error );
977 #endif /* SIZEOF_WCHAR_T */
978 }
979 else
980 {
981 #if SIZEOF_WCHAR_T == 4
982 result = libuna_byte_stream_copy_from_utf32(
983 (uint8_t *) system_string,
984 system_string_size,
985 libclocale_codepage,
986 (libuna_utf32_character_t *) wide_string,
987 wide_string_size,
988 error );
989 #elif SIZEOF_WCHAR_T == 2
990 result = libuna_byte_stream_copy_from_utf16(
991 (uint8_t *) system_string,
992 system_string_size,
993 libclocale_codepage,
994 (libuna_utf16_character_t *) wide_string,
995 wide_string_size,
996 error );
997 #endif /* SIZEOF_WCHAR_T */
998 }
999 if( result != 1 )
1000 {
1001 libcerror_error_set(
1002 error,
1003 LIBCERROR_ERROR_DOMAIN_CONVERSION,
1004 LIBCERROR_CONVERSION_ERROR_GENERIC,
1005 "%s: unable to set wide string.",
1006 function );
1007
1008 return( -1 );
1009 }
1010 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
1011
1012 return( 1 );
1013 }
1014
1015 #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */
1016
0 /*
1 * System string functions
2 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBBFIO_SYSTEM_STRING_H )
22 #define _LIBBFIO_SYSTEM_STRING_H
23
24 #include <common.h>
25 #include <types.h>
26
27 #include "libbfio_libcerror.h"
28
29 #if defined( __cplusplus )
30 extern "C" {
31 #endif
32
33 int libbfio_system_string_size_to_narrow_string(
34 const system_character_t *system_string,
35 size_t system_string_size,
36 size_t *narrow_string_size,
37 libcerror_error_t **error );
38
39 int libbfio_system_string_copy_to_narrow_string(
40 const system_character_t *system_string,
41 size_t system_string_size,
42 char *narrow_string,
43 size_t narrow_string_size,
44 libcerror_error_t **error );
45
46 int libbfio_system_string_size_from_narrow_string(
47 const char *narrow_string,
48 size_t narrow_string_size,
49 size_t *system_string_size,
50 libcerror_error_t **error );
51
52 int libbfio_system_string_copy_from_narrow_string(
53 system_character_t *system_string,
54 size_t system_string_size,
55 const char *narrow_string,
56 size_t narrow_string_size,
57 libcerror_error_t **error );
58
59 #if defined( HAVE_WIDE_CHARACTER_TYPE )
60
61 int libbfio_system_string_size_to_wide_string(
62 const system_character_t *system_string,
63 size_t system_string_size,
64 size_t *wide_string_size,
65 libcerror_error_t **error );
66
67 int libbfio_system_string_copy_to_wide_string(
68 const system_character_t *system_string,
69 size_t system_string_size,
70 wchar_t *wide_string,
71 size_t wide_string_size,
72 libcerror_error_t **error );
73
74 int libbfio_system_string_size_from_wide_string(
75 const wchar_t *wide_string,
76 size_t wide_string_size,
77 size_t *system_string_size,
78 libcerror_error_t **error );
79
80 int libbfio_system_string_copy_from_wide_string(
81 system_character_t *system_string,
82 size_t system_string_size,
83 const wchar_t *wide_string,
84 size_t wide_string_size,
85 libcerror_error_t **error );
86
87 #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */
88
89 #if defined( __cplusplus )
90 }
91 #endif
92
93 #endif /* !defined( _LIBBFIO_SYSTEM_STRING_H ) */
94
11 AM_CPPFLAGS = \
22 -I$(top_srcdir)/include \
33 -I$(top_srcdir)/common \
4 @LIBCSTRING_CPPFLAGS@ \
54 @LIBCERROR_CPPFLAGS@ \
65 @LIBCTHREADS_CPPFLAGS@ \
76 @PTHREAD_CPPFLAGS@
1514 libcdata_error.c libcdata_error.h \
1615 libcdata_extern.h \
1716 libcdata_libcerror.h \
18 libcdata_libcstring.h \
1917 libcdata_libcthreads.h \
2018 libcdata_list.c libcdata_list.h \
2119 libcdata_list_element.c libcdata_list_element.h \
2725 libcdata_unused.h
2826 endif
2927
30
3128 MAINTAINERCLEANFILES = \
3229 Makefile.in
3330
9797 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9898 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9999 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101100 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102101 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103102 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
108107 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109108 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110109 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
110 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
111 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
113112 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114113 $(ACLOCAL_M4)
115114 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
122121 am__libcdata_la_SOURCES_DIST = libcdata_array.c libcdata_array.h \
123122 libcdata_btree.c libcdata_btree.h libcdata_definitions.h \
124123 libcdata_error.c libcdata_error.h libcdata_extern.h \
125 libcdata_libcerror.h libcdata_libcstring.h \
126 libcdata_libcthreads.h libcdata_list.c libcdata_list.h \
127 libcdata_list_element.c libcdata_list_element.h \
128 libcdata_range_list.c libcdata_range_list.h \
129 libcdata_range_list_value.c libcdata_range_list_value.h \
130 libcdata_support.c libcdata_support.h libcdata_tree_node.c \
131 libcdata_tree_node.h libcdata_types.h libcdata_unused.h
124 libcdata_libcerror.h libcdata_libcthreads.h libcdata_list.c \
125 libcdata_list.h libcdata_list_element.c \
126 libcdata_list_element.h libcdata_range_list.c \
127 libcdata_range_list.h libcdata_range_list_value.c \
128 libcdata_range_list_value.h libcdata_support.c \
129 libcdata_support.h libcdata_tree_node.c libcdata_tree_node.h \
130 libcdata_types.h libcdata_unused.h
132131 @HAVE_LOCAL_LIBCDATA_TRUE@am_libcdata_la_OBJECTS = libcdata_array.lo \
133132 @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_btree.lo libcdata_error.lo \
134133 @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_list.lo \
246245 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
247246 HAVE_LIBCPATH = @HAVE_LIBCPATH@
248247 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
249 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
250 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
251248 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
252249 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
253250 HAVE_LIBFDATA = @HAVE_LIBFDATA@
266263 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
267264 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
268265 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
269 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
270 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
271266 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
272267 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
273268 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
314309 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
315310 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
316311 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
317 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
318 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
319 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
320 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
321312 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
322313 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
323314 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
350341 LTLIBICONV = @LTLIBICONV@
351342 LTLIBINTL = @LTLIBINTL@
352343 LTLIBOBJS = @LTLIBOBJS@
344 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
353345 MAKEINFO = @MAKEINFO@
354346 MANIFEST_TOOL = @MANIFEST_TOOL@
355347 MKDIR_P = @MKDIR_P@
456448 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
457449 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
458450 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
459 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
460 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
461 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
462 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
463 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
464 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
465451 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
466452 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
467453 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
530516 libcpath_LIBS = @libcpath_LIBS@
531517 libcsplit_CFLAGS = @libcsplit_CFLAGS@
532518 libcsplit_LIBS = @libcsplit_LIBS@
533 libcstring_CFLAGS = @libcstring_CFLAGS@
534 libcstring_LIBS = @libcstring_LIBS@
535 libcsystem_CFLAGS = @libcsystem_CFLAGS@
536 libcsystem_LIBS = @libcsystem_LIBS@
537519 libcthreads_CFLAGS = @libcthreads_CFLAGS@
538520 libcthreads_LIBS = @libcthreads_LIBS@
539521 libdir = @libdir@
585567 @HAVE_LOCAL_LIBCDATA_TRUE@AM_CPPFLAGS = \
586568 @HAVE_LOCAL_LIBCDATA_TRUE@ -I$(top_srcdir)/include \
587569 @HAVE_LOCAL_LIBCDATA_TRUE@ -I$(top_srcdir)/common \
588 @HAVE_LOCAL_LIBCDATA_TRUE@ @LIBCSTRING_CPPFLAGS@ \
589570 @HAVE_LOCAL_LIBCDATA_TRUE@ @LIBCERROR_CPPFLAGS@ \
590571 @HAVE_LOCAL_LIBCDATA_TRUE@ @LIBCTHREADS_CPPFLAGS@ \
591572 @HAVE_LOCAL_LIBCDATA_TRUE@ @PTHREAD_CPPFLAGS@
598579 @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_error.c libcdata_error.h \
599580 @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_extern.h \
600581 @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_libcerror.h \
601 @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_libcstring.h \
602582 @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_libcthreads.h \
603583 @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_list.c libcdata_list.h \
604584 @HAVE_LOCAL_LIBCDATA_TRUE@ libcdata_list_element.c libcdata_list_element.h \
00 /*
11 * Array functions
22 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Array functions
22 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
1818 * along with this software. If not, see <http://www.gnu.org/licenses/>.
1919 */
2020
21 #if !defined( _LIBCDATA_INTERNAL_ARRAY_H )
22 #define _LIBCDATA_INTERNAL_ARRAY_H
21 #if !defined( _LIBCDATA_ARRAY_H )
22 #define _LIBCDATA_ARRAY_H
2323
2424 #include <common.h>
2525 #include <types.h>
195195 }
196196 #endif
197197
198 #endif
199
198 #endif /* !defined( _LIBCDATA_ARRAY_H ) */
199
00 /*
11 * Balanced tree type functions
22 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Balanced tree type functions
22 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
1818 * along with this software. If not, see <http://www.gnu.org/licenses/>.
1919 */
2020
21 #if !defined( _LIBCDATA_INTERNAL_BTREE_H )
22 #define _LIBCDATA_INTERNAL_BTREE_H
21 #if !defined( _LIBCDATA_BTREE_H )
22 #define _LIBCDATA_BTREE_H
2323
2424 #include <common.h>
2525 #include <types.h>
185185 }
186186 #endif
187187
188 #endif
188 #endif /* !defined( _LIBCDATA_BTREE_H ) */
189189
00 /*
11 * The internal definitions
22 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3434 */
3535 #else
3636
37 #define LIBCDATA_VERSION 20160425
37 #define LIBCDATA_VERSION 20170116
3838
39 /* The libcstring version string
39 /* The libcdata version string
4040 */
41 #define LIBCDATA_VERSION_STRING "20160425"
41 #define LIBCDATA_VERSION_STRING "20170116"
4242
4343 /* The comparison function definitions
4444 */
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4343 libcdata_error_t *error,
4444 FILE *stream )
4545 {
46 return( libcerror_error_fprint(
47 (libcerror_error_t *) error,
48 stream ) );
46 int print_count = 0;
47
48 print_count = libcerror_error_fprint(
49 (libcerror_error_t *) error,
50 stream );
51
52 return( print_count );
4953 }
5054
5155 /* Prints a descriptive string of the error to the string
5761 char *string,
5862 size_t size )
5963 {
60 return( libcerror_error_sprint(
61 (libcerror_error_t *) error,
62 string,
63 size ) );
64 int print_count = 0;
65
66 print_count = libcerror_error_sprint(
67 (libcerror_error_t *) error,
68 string,
69 size );
70
71 return( print_count );
6472 }
6573
6674 /* Prints a backtrace of the error to the stream
7078 libcdata_error_t *error,
7179 FILE *stream )
7280 {
73 return( libcerror_error_backtrace_fprint(
74 (libcerror_error_t *) error,
75 stream ) );
81 int print_count = 0;
82
83 print_count = libcerror_error_backtrace_fprint(
84 (libcerror_error_t *) error,
85 stream );
86
87 return( print_count );
7688 }
7789
7890 /* Prints a backtrace of the error to the string
8496 char *string,
8597 size_t size )
8698 {
87 return( libcerror_error_backtrace_sprint(
88 (libcerror_error_t *) error,
89 string,
90 size ) );
99 int print_count = 0;
100
101 print_count = libcerror_error_backtrace_sprint(
102 (libcerror_error_t *) error,
103 string,
104 size );
105
106 return( print_count );
91107 }
92108
93109 #endif /* !defined( HAVE_LOCAL_LIBCDATA ) */
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal extern definition
22 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 #include <libcdata/extern.h>
3838
3939 #else
40 #define LIBCDATA_EXTERN extern
40 #define LIBCDATA_EXTERN /* extern */
4141
42 #endif
42 #endif /* !defined( HAVE_LOCAL_LIBCDATA ) */
4343
44 #endif
44 #endif /* !defined( _LIBCDATA_INTERNAL_EXTERN_H ) */
4545
00 /*
11 * The internal libcerror header
22 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
+0
-51
libcdata/libcdata_libcstring.h less more
0 /*
1 * The internal libcstring header
2 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCDATA_LIBCSTRING_H )
22 #define _LIBCDATA_LIBCSTRING_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring
27 */
28 #if defined( HAVE_LOCAL_LIBCSTRING )
29
30 #include <libcstring_definitions.h>
31 #include <libcstring_narrow_string.h>
32 #include <libcstring_system_string.h>
33 #include <libcstring_types.h>
34 #include <libcstring_wide_string.h>
35
36 #else
37
38 /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT
39 * before including libcstring.h
40 */
41 #if defined( _WIN32 ) && defined( DLL_IMPORT )
42 #define LIBCSTRING_DLL_IMPORT
43 #endif
44
45 #include <libcstring.h>
46
47 #endif /* defined( HAVE_LOCAL_LIBCSTRING ) */
48
49 #endif /* !defined( _LIBCDATA_LIBCSTRING_H ) */
50
00 /*
11 * The internal libcthreads header
22 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * List functions
22 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * List functions
22 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
1818 * along with this software. If not, see <http://www.gnu.org/licenses/>.
1919 */
2020
21 #if !defined( _LIBCDATA_INTERNAL_LIST_H )
22 #define _LIBCDATA_INTERNAL_LIST_H
21 #if !defined( _LIBCDATA_LIST_H )
22 #define _LIBCDATA_LIST_H
2323
2424 #include <common.h>
2525 #include <types.h>
205205 }
206206 #endif
207207
208 #endif
209
208 #endif /* !defined( _LIBCDATA_LIST_H ) */
209
00 /*
11 * List element functions
22 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * List element functions
22 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
1818 * along with this software. If not, see <http://www.gnu.org/licenses/>.
1919 */
2020
21 #if !defined( _LIBCDATA_INTERNAL_LIST_ELEMENT_H )
22 #define _LIBCDATA_INTERNAL_LIST_ELEMENT_H
21 #if !defined( _LIBCDATA_LIST_ELEMENT_H )
22 #define _LIBCDATA_LIST_ELEMENT_H
2323
2424 #include <common.h>
2525 #include <types.h>
123123 }
124124 #endif
125125
126 #endif
126 #endif /* !defined( _LIBCDATA_LIST_ELEMENT_H ) */
127127
00 /*
11 * Range list
22 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Range list
22 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
1818 * along with this software. If not, see <http://www.gnu.org/licenses/>.
1919 */
2020
21 #if !defined( _LIBCDATA_INTERNAL_RANGE_LIST_H )
22 #define _LIBCDATA_INTERNAL_RANGE_LIST_H
21 #if !defined( _LIBCDATA_RANGE_LIST_H )
22 #define _LIBCDATA_RANGE_LIST_H
2323
2424 #include <common.h>
2525 #include <types.h>
238238 }
239239 #endif
240240
241 #endif
242
241 #endif /* !defined( _LIBCDATA_RANGE_LIST_H ) */
242
00 /*
11 * Range list value
22 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Range list value
22 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
8989 }
9090 #endif
9191
92 #endif
92 #endif /* !defined( _LIBCDATA_RANGE_LIST_VALUE_H ) */
9393
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2424 #include <common.h>
2525 #include <types.h>
2626
27 #include <stdio.h>
28
2927 #include "libcdata_extern.h"
3028
3129 #if defined( __cplusplus )
4442 }
4543 #endif
4644
47 #endif
45 #endif /* !defined( _LIBCDATA_SUPPORT_H ) */
4846
00 /*
11 * Tree functions
22 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Tree functions
22 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
1818 * along with this software. If not, see <http://www.gnu.org/licenses/>.
1919 */
2020
21 #if !defined( _LIBCDATA_INTERNAL_TREE_NODE_H )
22 #define _LIBCDATA_INTERNAL_TREE_NODE_H
21 #if !defined( _LIBCDATA_TREE_NODE_H )
22 #define _LIBCDATA_TREE_NODE_H
2323
2424 #include <common.h>
2525 #include <types.h>
232232 }
233233 #endif
234234
235 #endif
236
235 #endif /* !defined( _LIBCDATA_TREE_NODE_H ) */
236
00 /*
11 * The internal type definitions
22 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3838 typedef struct libcdata_list {} libcdata_list_t;
3939 typedef struct libcdata_list_element {} libcdata_list_element_t;
4040 typedef struct libcdata_range_list {} libcdata_range_list_t;
41 typedef struct libcdata_tree {} libcdata_tree_t;
4241 typedef struct libcdata_tree_node {} libcdata_tree_node_t;
4342
4443 #else
4746 typedef intptr_t libcdata_list_t;
4847 typedef intptr_t libcdata_list_element_t;
4948 typedef intptr_t libcdata_range_list_t;
50 typedef intptr_t libcdata_tree_t;
5149 typedef intptr_t libcdata_tree_node_t;
5250
5351 #endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */
00 /*
11 * The internal unused definition
22 *
3 * Copyright (C) 2006-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 if HAVE_LOCAL_LIBCERROR
11 AM_CPPFLAGS = \
22 -I$(top_srcdir)/include \
3 -I$(top_srcdir)/common \
4 @LIBCSTRING_CPPFLAGS@
3 -I$(top_srcdir)/common
54
65 noinst_LTLIBRARIES = libcerror.la
76
98 libcerror_definitions.h \
109 libcerror_extern.h \
1110 libcerror_error.c libcerror_error.h \
12 libcerror_libcstring.h \
1311 libcerror_support.c libcerror_support.h \
1412 libcerror_system.c libcerror_system.h \
1513 libcerror_types.h \
1614 libcerror_unused.h
1715 endif
18
1916
2017 MAINTAINERCLEANFILES = \
2118 Makefile.in
9797 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9898 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9999 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101100 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102101 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103102 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
108107 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109108 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110109 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
110 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
111 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
113112 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114113 $(ACLOCAL_M4)
115114 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
121120 libcerror_la_LIBADD =
122121 am__libcerror_la_SOURCES_DIST = libcerror_definitions.h \
123122 libcerror_extern.h libcerror_error.c libcerror_error.h \
124 libcerror_libcstring.h libcerror_support.c libcerror_support.h \
125 libcerror_system.c libcerror_system.h libcerror_types.h \
126 libcerror_unused.h
123 libcerror_support.c libcerror_support.h libcerror_system.c \
124 libcerror_system.h libcerror_types.h libcerror_unused.h
127125 @HAVE_LOCAL_LIBCERROR_TRUE@am_libcerror_la_OBJECTS = \
128126 @HAVE_LOCAL_LIBCERROR_TRUE@ libcerror_error.lo \
129127 @HAVE_LOCAL_LIBCERROR_TRUE@ libcerror_support.lo \
237235 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
238236 HAVE_LIBCPATH = @HAVE_LIBCPATH@
239237 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
240 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
241 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
242238 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
243239 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
244240 HAVE_LIBFDATA = @HAVE_LIBFDATA@
257253 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
258254 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
259255 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
260 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
261 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
262256 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
263257 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
264258 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
305299 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
306300 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
307301 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
308 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
309 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
310 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
311 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
312302 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
313303 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
314304 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
341331 LTLIBICONV = @LTLIBICONV@
342332 LTLIBINTL = @LTLIBINTL@
343333 LTLIBOBJS = @LTLIBOBJS@
334 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
344335 MAKEINFO = @MAKEINFO@
345336 MANIFEST_TOOL = @MANIFEST_TOOL@
346337 MKDIR_P = @MKDIR_P@
447438 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
448439 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
449440 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
450 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
451 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
452 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
453 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
454 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
455 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
456441 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
457442 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
458443 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
521506 libcpath_LIBS = @libcpath_LIBS@
522507 libcsplit_CFLAGS = @libcsplit_CFLAGS@
523508 libcsplit_LIBS = @libcsplit_LIBS@
524 libcstring_CFLAGS = @libcstring_CFLAGS@
525 libcstring_LIBS = @libcstring_LIBS@
526 libcsystem_CFLAGS = @libcsystem_CFLAGS@
527 libcsystem_LIBS = @libcsystem_LIBS@
528509 libcthreads_CFLAGS = @libcthreads_CFLAGS@
529510 libcthreads_LIBS = @libcthreads_LIBS@
530511 libdir = @libdir@
575556 top_srcdir = @top_srcdir@
576557 @HAVE_LOCAL_LIBCERROR_TRUE@AM_CPPFLAGS = \
577558 @HAVE_LOCAL_LIBCERROR_TRUE@ -I$(top_srcdir)/include \
578 @HAVE_LOCAL_LIBCERROR_TRUE@ -I$(top_srcdir)/common \
579 @HAVE_LOCAL_LIBCERROR_TRUE@ @LIBCSTRING_CPPFLAGS@
559 @HAVE_LOCAL_LIBCERROR_TRUE@ -I$(top_srcdir)/common
580560
581561 @HAVE_LOCAL_LIBCERROR_TRUE@noinst_LTLIBRARIES = libcerror.la
582562 @HAVE_LOCAL_LIBCERROR_TRUE@libcerror_la_SOURCES = \
583563 @HAVE_LOCAL_LIBCERROR_TRUE@ libcerror_definitions.h \
584564 @HAVE_LOCAL_LIBCERROR_TRUE@ libcerror_extern.h \
585565 @HAVE_LOCAL_LIBCERROR_TRUE@ libcerror_error.c libcerror_error.h \
586 @HAVE_LOCAL_LIBCERROR_TRUE@ libcerror_libcstring.h \
587566 @HAVE_LOCAL_LIBCERROR_TRUE@ libcerror_support.c libcerror_support.h \
588567 @HAVE_LOCAL_LIBCERROR_TRUE@ libcerror_system.c libcerror_system.h \
589568 @HAVE_LOCAL_LIBCERROR_TRUE@ libcerror_types.h \
00 /*
11 * The internal definitions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3434 */
3535 #else
3636
37 #define LIBCERROR_VERSION 20160422
38
39 /* The libcstring version string
40 */
41 #define LIBCERROR_VERSION_STRING "20160422"
37 #define LIBCERROR_VERSION 20170115
38
39 /* The libcerror version string
40 */
41 #define LIBCERROR_VERSION_STRING "20170115"
4242
4343 /* The error domains
4444 */
318318
319319 #endif /* !defined( HAVE_LOCAL_LIBCERROR ) */
320320
321 #endif
322
321 #endif /* !defined( LIBCERROR_INTERNAL_DEFINITIONS_H ) */
322
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2020
2121 #include <common.h>
2222 #include <memory.h>
23 #include <narrow_string.h>
24 #include <system_string.h>
2325 #include <types.h>
26 #include <wide_string.h>
2427
2528 #if defined( HAVE_STDARG_H ) || defined( WINAPI )
2629 #include <stdarg.h>
3235
3336 #include "libcerror_definitions.h"
3437 #include "libcerror_error.h"
35 #include "libcerror_libcstring.h"
3638 #include "libcerror_types.h"
3739
3840 /* Free an error and its elements
110112 {
111113 va_list argument_list;
112114
113 libcerror_internal_error_t *internal_error = NULL;
114 libcstring_system_character_t *system_format_string = NULL;
115 void *reallocation = NULL;
116 size_t format_string_length = 0;
117 size_t message_size = LIBCERROR_MESSAGE_INCREMENT_SIZE;
118 int message_index = 0;
119 int print_count = 0;
115 libcerror_internal_error_t *internal_error = NULL;
116 system_character_t *system_format_string = NULL;
117 void *reallocation = NULL;
118 size_t format_string_length = 0;
119 size_t message_size = LIBCERROR_MESSAGE_INCREMENT_SIZE;
120 int message_index = 0;
121 int print_count = 0;
120122
121123 #if defined( __BORLANDC__ ) || defined( _MSC_VER )
122 size_t string_index = 0;
124 size_t string_index = 0;
123125 #endif
124126
125127 if( error == NULL )
130132 {
131133 return;
132134 }
133 format_string_length = libcstring_narrow_string_length(
135 format_string_length = narrow_string_length(
134136 format_string );
135137
136138 if( format_string_length > message_size )
138140 message_size = ( ( format_string_length / LIBCERROR_MESSAGE_INCREMENT_SIZE ) + 1 )
139141 * LIBCERROR_MESSAGE_INCREMENT_SIZE;
140142 }
141 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
143 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
142144 do
143145 {
144146 reallocation = memory_reallocate(
145147 system_format_string,
146 sizeof( libcstring_system_character_t ) * ( format_string_length + 1 ) );
148 sizeof( system_character_t ) * ( format_string_length + 1 ) );
147149
148150 if( reallocation == NULL )
149151 {
150152 goto on_error;
151153 }
152 system_format_string = (libcstring_system_character_t *) reallocation;
154 system_format_string = (system_character_t *) reallocation;
153155
154156 #if defined( __BORLANDC__ ) || defined( _MSC_VER )
155 print_count = libcstring_wide_string_snwprintf(
157 print_count = wide_string_snwprintf(
156158 system_format_string,
157159 format_string_length + 1,
158160 L"%S",
159161 format_string );
160162 #else
161 print_count = libcstring_wide_string_snwprintf(
163 print_count = wide_string_snwprintf(
162164 system_format_string,
163165 format_string_length + 1,
164166 L"%s",
181183 }
182184 while( print_count <= -1 );
183185 #else
184 system_format_string = (libcstring_system_character_t *) format_string;
186 system_format_string = (system_character_t *) format_string;
185187 #endif
186188
187189 #if defined( __BORLANDC__ ) || defined( _MSC_VER )
195197 {
196198 break;
197199 }
198 else if( system_format_string[ string_index ] == (libcstring_system_character_t) '%' )
200 else if( system_format_string[ string_index ] == (system_character_t) '%' )
199201 {
200202 string_index++;
201203
202 if( system_format_string[ string_index ] == (libcstring_system_character_t) 's' )
203 {
204 system_format_string[ string_index ] = (libcstring_system_character_t) 'S';
204 if( system_format_string[ string_index ] == (system_character_t) 's' )
205 {
206 system_format_string[ string_index ] = (system_character_t) 'S';
205207 }
206208 }
207209 string_index++;
208210 }
209 #endif
211 #endif /* defined( __BORLANDC__ ) || defined( _MSC_VER ) */
212
210213 if( *error == NULL )
211214 {
212215 internal_error = memory_allocate_structure(
230233 }
231234 reallocation = memory_reallocate(
232235 internal_error->messages,
233 sizeof( libcstring_system_character_t * ) * ( internal_error->number_of_messages + 1 ) );
236 sizeof( system_character_t * ) * ( internal_error->number_of_messages + 1 ) );
234237
235238 if( reallocation == NULL )
236239 {
237240 goto on_error;
238241 }
239 internal_error->messages = (libcstring_system_character_t **) reallocation;
242 internal_error->messages = (system_character_t **) reallocation;
240243
241244 reallocation = memory_reallocate(
242245 internal_error->sizes,
257260 {
258261 reallocation = memory_reallocate(
259262 internal_error->messages[ message_index ],
260 sizeof( libcstring_system_character_t ) * message_size );
263 sizeof( system_character_t ) * message_size );
261264
262265 if( reallocation == NULL )
263266 {
268271
269272 break;
270273 }
271 internal_error->messages[ message_index ] = (libcstring_system_character_t *) reallocation;
274 internal_error->messages[ message_index ] = (system_character_t *) reallocation;
272275
273276 VASTART(
274277 argument_list,
275278 const char *,
276279 format_string );
277280
278 print_count = libcstring_system_string_vsprintf(
281 print_count = system_string_vsprintf(
279282 internal_error->messages[ message_index ],
280283 message_size,
281284 system_format_string,
289292 message_size += LIBCERROR_MESSAGE_INCREMENT_SIZE;
290293 }
291294 else if( ( (size_t) print_count >= message_size )
292 || ( ( internal_error->messages[ message_index ] )[ print_count ] != (libcstring_system_character_t) 0 ) )
295 || ( ( internal_error->messages[ message_index ] )[ print_count ] != (system_character_t) 0 ) )
293296 {
294297 message_size = (size_t) ( print_count + 1 );
295298 print_count = -1;
308311 }
309312 while( print_count <= -1 );
310313
311 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
314 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
312315 memory_free(
313316 system_format_string );
314317
317320 return;
318321
319322 on_error:
320 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
323 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
321324 if( system_format_string != NULL )
322325 {
323326 memory_free(
386389
387390 if( internal_error->messages[ message_index ] != NULL )
388391 {
392 #if defined( WINAPI )
389393 print_count = fprintf(
390394 stream,
391 "%" PRIs_LIBCSTRING_SYSTEM "\n",
395 "%" PRIs_SYSTEM "\r\n",
392396 internal_error->messages[ message_index ] );
393
397 #else
398 print_count = fprintf(
399 stream,
400 "%" PRIs_SYSTEM "\n",
401 internal_error->messages[ message_index ] );
402 #endif
394403 if( print_count <= -1 )
395404 {
396405 return( -1 );
438447
439448 if( internal_error->messages[ message_index ] != NULL )
440449 {
441 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
450 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
442451 #if defined( _MSC_VER )
443452 if( wcstombs_s(
444453 &print_count,
466475 return( -1 );
467476 }
468477 #else
469 if( internal_error->sizes[ message_index ] > size )
478 if( ( internal_error->sizes[ message_index ] + 1 ) >= size )
470479 {
471480 return( -1 );
472481 }
473 if( libcstring_narrow_string_copy(
482 if( narrow_string_copy(
474483 string,
475484 internal_error->messages[ message_index ],
476485 internal_error->sizes[ message_index ] ) == NULL )
477486 {
478 string[ 0 ] = (libcstring_system_character_t) 0;
487 string[ 0 ] = (system_character_t) 0;
479488
480489 return( -1 );
481490 }
482491 print_count = internal_error->sizes[ message_index ];
483492
484 string[ print_count ] = (libcstring_system_character_t) 0;
485
486 #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */
493 string[ print_count ] = (system_character_t) 0;
494
495 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
487496 }
488497 if( print_count > (size_t) INT_MAX )
489498 {
524533 {
525534 if( internal_error->messages[ message_index ] != NULL )
526535 {
536 #if defined( WINAPI )
527537 print_count = fprintf(
528538 stream,
529 "%" PRIs_LIBCSTRING_SYSTEM "\n",
539 "%" PRIs_SYSTEM "\r\n",
530540 internal_error->messages[ message_index ] );
531
541 #else
542 print_count = fprintf(
543 stream,
544 "%" PRIs_SYSTEM "\n",
545 internal_error->messages[ message_index ] );
546 #endif
532547 if( print_count <= -1 )
533548 {
534549 return( -1 );
552567 size_t string_index = 0;
553568 int message_index = 0;
554569
555 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
570 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
556571 size_t print_count = 0;
557572 #endif
558573
588603 {
589604 if( internal_error->messages[ message_index ] != NULL )
590605 {
591 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
606 if( string_index > 0 )
607 {
608 #if defined( WINAPI )
609 if( ( string_index + 2 ) >= size )
610 {
611 return( -1 );
612 }
613 string[ string_index++ ] = (system_character_t) '\r';
614 #else
615 if( ( string_index + 1 ) >= size )
616 {
617 return( -1 );
618 }
619 #endif /* defined( WINAPI ) */
620
621 string[ string_index++ ] = (system_character_t) '\n';
622 string[ string_index ] = (system_character_t) 0;
623 }
624 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
592625 #if defined( _MSC_VER )
593626 if( wcstombs_s(
594627 &print_count,
609642 {
610643 return( -1 );
611644 }
612 #endif
645 #endif /*defined( _MSC_VER ) */
646
613647 string_index += print_count;
614648
615649 if( string_index >= size )
616650 {
617651 return( -1 );
618652 }
619 #else
620 if( ( string_index + internal_error->sizes[ message_index ] ) > size )
653 if( string[ string_index - 1 ] == 0 )
654 {
655 string_index--;
656 }
657 #else
658 if( ( string_index + internal_error->sizes[ message_index ] + 1 ) >= size )
621659 {
622660 return( -1 );
623661 }
624 if( string_index > 0 )
625 {
626 string[ string_index++ ] = (libcstring_system_character_t) '\n';
627 }
628 if( libcstring_narrow_string_copy(
662 if( narrow_string_copy(
629663 &( string[ string_index ] ),
630664 internal_error->messages[ message_index ],
631665 internal_error->sizes[ message_index ] ) == NULL )
632666 {
633 string[ string_index ] = (libcstring_system_character_t) 0;
634
635667 return( -1 );
636668 }
637669 string_index += internal_error->sizes[ message_index ] - 1;
638670
639 string[ string_index ] = (libcstring_system_character_t) 0;
640 #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */
641 }
642 }
643 string_index += 1;
671 string[ string_index ] = (system_character_t) 0;
672
673 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
674 }
675 }
676 string_index++;
644677
645678 if( string_index > (size_t) INT_MAX )
646679 {
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2727 #include <stdio.h>
2828
2929 #include "libcerror_extern.h"
30 #include "libcerror_libcstring.h"
3130 #include "libcerror_types.h"
3231
3332 #if defined( __cplusplus )
5554
5655 /* A dynamic array containing the message strings
5756 */
58 libcstring_system_character_t **messages;
57 system_character_t **messages;
5958
6059 /* A dynamic array containing the message string sizes
6160 * without the end-of-string character
107106 }
108107 #endif
109108
110 #endif
109 #endif /* !defined( _LIBCERROR_INTERNAL_ERROR_H ) */
111110
00 /*
11 * The internal extern definition
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 #include <libcerror/extern.h>
3838
3939 #else
40 #define LIBCERROR_EXTERN /* extern */
4041
41 #define LIBCERROR_EXTERN extern
42 #endif /* !defined( HAVE_LOCAL_LIBCERROR ) */
4243
43 #endif
44 #endif /* !defined( _LIBCERROR_INTERNAL_EXTERN_H ) */
4445
45 #endif
46
+0
-51
libcerror/libcerror_libcstring.h less more
0 /*
1 * The internal libcstring header
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCERROR_LIBCSTRING_H )
22 #define _LIBCERROR_LIBCSTRING_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring
27 */
28 #if defined( HAVE_LOCAL_LIBCSTRING )
29
30 #include <libcstring_definitions.h>
31 #include <libcstring_narrow_string.h>
32 #include <libcstring_system_string.h>
33 #include <libcstring_types.h>
34 #include <libcstring_wide_string.h>
35
36 #else
37
38 /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT
39 * before including libcstring.h
40 */
41 #if defined( _WIN32 ) && defined( DLL_IMPORT )
42 #define LIBCSTRING_DLL_IMPORT
43 #endif
44
45 #include <libcstring.h>
46
47 #endif /* defined( HAVE_LOCAL_LIBCSTRING ) */
48
49 #endif /* !defined( _LIBCERROR_LIBCSTRING_H ) */
50
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2424 #include <common.h>
2525 #include <types.h>
2626
27 #include <stdio.h>
28
2927 #include "libcerror_extern.h"
3028
3129 #if defined( __cplusplus )
4442 }
4543 #endif
4644
47 #endif
45 #endif /* !defined( _LIBCERROR_SUPPORT_H ) */
4846
00 /*
11 * System functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2020
2121 #include <common.h>
2222 #include <memory.h>
23 #include <narrow_string.h>
24 #include <system_string.h>
2325 #include <types.h>
26 #include <wide_string.h>
2427
2528 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
2629 #include <stdlib.h>
3942 #endif
4043
4144 #include "libcerror_error.h"
42 #include "libcerror_libcstring.h"
4345 #include "libcerror_system.h"
4446 #include "libcerror_types.h"
4547
8183 return( FALSE );
8284 }
8385 library_handle = LoadLibrary(
84 _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) );
86 _SYSTEM_STRING( "kernel32.dll" ) );
8587
8688 if( library_handle == NULL )
8789 {
134136 return( FALSE );
135137 }
136138 library_handle = LoadLibrary(
137 _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) );
139 _SYSTEM_STRING( "kernel32.dll" ) );
138140
139141 if( library_handle == NULL )
140142 {
175177 * Returns the string_length if successful or -1 on error
176178 */
177179 int libcerror_system_copy_string_from_error_number(
178 libcstring_system_character_t *string,
180 system_character_t *string,
179181 size_t string_size,
180182 uint32_t error_number )
181183 {
193195 return( -1 );
194196 }
195197 #if ( WINVER <= 0x0500 )
196 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
198 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
197199 print_count = libcerror_FormatMessageW(
198200 flags,
199201 NULL,
217219 NULL );
218220 #endif
219221 #else
220 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
222 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
221223 print_count = FormatMessageW(
222224 flags,
223225 NULL,
257259 * Returns the string_length if successful or -1 on error
258260 */
259261 int libcerror_system_copy_string_from_error_number(
260 libcstring_system_character_t *string,
262 system_character_t *string,
261263 size_t string_size,
262264 uint32_t error_number )
263265 {
273275 }
274276 /* Sanity check
275277 */
276 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
278 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
277279 #error Missing wide character strerror_r function
278280 #endif
279281
291293 {
292294 return( -1 );
293295 }
294 string[ string_size - 1 ] = (libcstring_system_character_t) 0;
295
296 string_length = libcstring_system_string_length(
296 string[ string_size - 1 ] = (system_character_t) 0;
297
298 string_length = system_string_length(
297299 string );
298300
299301 return( (int) string_length );
306308 * Returns the string_length if successful or -1 on error
307309 */
308310 int libcerror_system_copy_string_from_error_number(
309 libcstring_system_character_t *string,
311 system_character_t *string,
310312 size_t string_size,
311313 uint32_t error_number )
312314 {
313 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
315 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
314316 const wchar_t *static_error_string = NULL;
315317 #else
316318 const char *static_error_string = NULL;
327329 }
328330 /* Sanity check
329331 */
330 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) && !defined( WINAPI )
332 #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) && !defined( WINAPI )
331333 #error Missing wide character strerror function
332334 #endif
333335
334 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
336 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
335337 static_error_string = _wcserror(
336338 (int) error_number );
337339 #else
343345 {
344346 return( -1 );
345347 }
346 static_error_string_length = libcstring_system_string_length(
348 static_error_string_length = system_string_length(
347349 static_error_string );
348350
349 if( libcstring_system_string_copy(
351 if( system_string_copy(
350352 string,
351353 static_error_string,
352354 static_error_string_length ) == NULL )
395397 {
396398 va_list argument_list;
397399
398 libcerror_internal_error_t *internal_error = NULL;
399 libcstring_system_character_t *system_format_string = NULL;
400 void *reallocation = NULL;
401 size_t format_string_length = 0;
402 size_t message_size = LIBCERROR_MESSAGE_INCREMENT_SIZE;
403 size_t string_index = 0;
404 int message_index = 0;
405 int print_count = 0;
400 libcerror_internal_error_t *internal_error = NULL;
401 system_character_t *system_format_string = NULL;
402 void *reallocation = NULL;
403 size_t format_string_length = 0;
404 size_t message_size = LIBCERROR_MESSAGE_INCREMENT_SIZE;
405 size_t string_index = 0;
406 int message_index = 0;
407 int print_count = 0;
406408
407409 if( error == NULL )
408410 {
412414 {
413415 return;
414416 }
415 format_string_length = libcstring_narrow_string_length(
417 format_string_length = narrow_string_length(
416418 format_string );
417419
418420 if( format_string_length > message_size )
420422 message_size = ( ( format_string_length / LIBCERROR_MESSAGE_INCREMENT_SIZE ) + 1 )
421423 * LIBCERROR_MESSAGE_INCREMENT_SIZE;
422424 }
423 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
425 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
424426 do
425427 {
426428 reallocation = memory_reallocate(
427429 system_format_string,
428 sizeof( libcstring_system_character_t ) * ( format_string_length + 1 ) );
430 sizeof( system_character_t ) * ( format_string_length + 1 ) );
429431
430432 if( reallocation == NULL )
431433 {
432434 goto on_error;
433435 }
434 system_format_string = (libcstring_system_character_t *) reallocation;
436 system_format_string = (system_character_t *) reallocation;
435437
436438 #if defined( __BORLANDC__ ) || defined( _MSC_VER )
437 print_count = libcstring_wide_string_snwprintf(
439 print_count = wide_string_snwprintf(
438440 system_format_string,
439441 format_string_length + 1,
440442 L"%S",
441443 format_string );
442444 #else
443 print_count = libcstring_wide_string_snwprintf(
445 print_count = wide_string_snwprintf(
444446 system_format_string,
445447 format_string_length + 1,
446448 L"%s",
464466 }
465467 while( print_count <= -1 );
466468 #else
467 system_format_string = (libcstring_system_character_t *) format_string;
469 system_format_string = (system_character_t *) format_string;
468470 #endif
469471
470472 #if defined( __BORLANDC__ ) || defined( _MSC_VER )
478480 {
479481 break;
480482 }
481 else if( system_format_string[ string_index ] == (libcstring_system_character_t) '%' )
483 else if( system_format_string[ string_index ] == (system_character_t) '%' )
482484 {
483485 string_index++;
484486
485 if( system_format_string[ string_index ] == (libcstring_system_character_t) 's' )
487 if( system_format_string[ string_index ] == (system_character_t) 's' )
486488 {
487 system_format_string[ string_index ] = (libcstring_system_character_t) 'S';
489 system_format_string[ string_index ] = (system_character_t) 'S';
488490 }
489491 }
490492 string_index++;
513515 }
514516 reallocation = memory_reallocate(
515517 internal_error->messages,
516 sizeof( libcstring_system_character_t * ) * ( internal_error->number_of_messages + 1 ) );
518 sizeof( system_character_t * ) * ( internal_error->number_of_messages + 1 ) );
517519
518520 if( reallocation == NULL )
519521 {
520522 goto on_error;
521523 }
522 internal_error->messages = (libcstring_system_character_t **) reallocation;
524 internal_error->messages = (system_character_t **) reallocation;
523525
524526 reallocation = memory_reallocate(
525527 internal_error->sizes,
540542 {
541543 reallocation = memory_reallocate(
542544 internal_error->messages[ message_index ],
543 sizeof( libcstring_system_character_t ) * message_size );
545 sizeof( system_character_t ) * message_size );
544546
545547 if( reallocation == NULL )
546548 {
551553
552554 break;
553555 }
554 internal_error->messages[ message_index ] = (libcstring_system_character_t *) reallocation;
556 internal_error->messages[ message_index ] = (system_character_t *) reallocation;
555557
556558 VASTART(
557559 argument_list,
558560 const char *,
559561 format_string );
560562
561 print_count = libcstring_system_string_vsprintf(
563 print_count = system_string_vsprintf(
562564 internal_error->messages[ message_index ],
563565 message_size,
564566 system_format_string,
591593 }
592594 while( print_count <= -1 );
593595
594 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
596 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
595597 memory_free(
596598 system_format_string );
597599
601603 string_index = internal_error->sizes[ message_index ] - 1;
602604
603605 if( ( internal_error->messages[ message_index ] != NULL )
604 && ( ( internal_error->messages[ message_index ] )[ string_index - 1 ] == (libcstring_system_character_t) '.' ) )
606 && ( ( internal_error->messages[ message_index ] )[ string_index - 1 ] == (system_character_t) '.' ) )
605607 {
606608 string_index -= 1;
607609 }
608610 reallocation = memory_reallocate(
609611 internal_error->messages[ message_index ],
610 sizeof( libcstring_system_character_t ) * ( message_size + 13 + 512 ) );
612 sizeof( system_character_t ) * ( message_size + 13 + 512 ) );
611613
612614 if( reallocation == NULL )
613615 {
618620
619621 goto on_error;
620622 }
621 internal_error->messages[ message_index ] = (libcstring_system_character_t *) reallocation;
622
623 if( libcstring_system_string_copy(
623 internal_error->messages[ message_index ] = (system_character_t *) reallocation;
624
625 if( system_string_copy(
624626 &( ( internal_error->messages[ message_index ] )[ string_index ] ),
625 _LIBCSTRING_SYSTEM_STRING( " with error: " ),
627 _SYSTEM_STRING( " with error: " ),
626628 13 ) == NULL )
627629 {
628630 memory_free(
661663 return;
662664
663665 on_error:
664 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
666 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
665667 if( system_format_string != NULL )
666668 {
667669 memory_free(
00 /*
11 * System functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2727 #include <stdio.h>
2828
2929 #include "libcerror_extern.h"
30 #include "libcerror_libcstring.h"
3130 #include "libcerror_types.h"
3231
3332 #if defined( __cplusplus )
3534 #endif
3635
3736 #if defined( WINAPI ) && ( WINVER <= 0x0500 )
37
3838 DWORD libcerror_FormatMessageA(
3939 DWORD flags,
4040 LPCVOID source,
5252 LPWSTR string,
5353 DWORD string_size,
5454 va_list *argument_list );
55 #endif
55
56 #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */
5657
5758 int libcerror_system_copy_string_from_error_number(
58 libcstring_system_character_t *string,
59 system_character_t *string,
5960 size_t string_size,
6061 uint32_t error_number );
6162
7273 }
7374 #endif
7475
75 #endif
76 #endif /* !defined( _LIBCERROR_SYSTEM_H ) */
7677
00 /*
11 * The internal type definitions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal unused definition
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
11 AM_CPPFLAGS = \
22 -I$(top_srcdir)/include \
33 -I$(top_srcdir)/common \
4 @LIBCSTRING_CPPFLAGS@ \
54 @LIBCERROR_CPPFLAGS@ \
65 @LIBCLOCALE_CPPFLAGS@ \
76 @LIBCNOTIFY_CPPFLAGS@ \
1716 libcfile_libcerror.h \
1817 libcfile_libclocale.h \
1918 libcfile_libcnotify.h \
20 libcfile_libcstring.h \
2119 libcfile_libuna.h \
2220 libcfile_notify.c libcfile_notify.h \
2321 libcfile_support.c libcfile_support.h \
22 libcfile_system_string.c libcfile_system_string.h \
2423 libcfile_types.h \
2524 libcfile_unused.h
2625 endif
9797 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9898 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9999 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101100 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102101 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103102 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
108107 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109108 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110109 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
110 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
111 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
113112 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114113 $(ACLOCAL_M4)
115114 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
122121 am__libcfile_la_SOURCES_DIST = libcfile_definitions.h libcfile_error.c \
123122 libcfile_error.h libcfile_extern.h libcfile_file.c \
124123 libcfile_file.h libcfile_libcerror.h libcfile_libclocale.h \
125 libcfile_libcnotify.h libcfile_libcstring.h libcfile_libuna.h \
126 libcfile_notify.c libcfile_notify.h libcfile_support.c \
127 libcfile_support.h libcfile_types.h libcfile_unused.h
124 libcfile_libcnotify.h libcfile_libuna.h libcfile_notify.c \
125 libcfile_notify.h libcfile_support.c libcfile_support.h \
126 libcfile_system_string.c libcfile_system_string.h \
127 libcfile_types.h libcfile_unused.h
128128 @HAVE_LOCAL_LIBCFILE_TRUE@am_libcfile_la_OBJECTS = libcfile_error.lo \
129129 @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_file.lo libcfile_notify.lo \
130 @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_support.lo
130 @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_support.lo \
131 @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_system_string.lo
131132 libcfile_la_OBJECTS = $(am_libcfile_la_OBJECTS)
132133 AM_V_lt = $(am__v_lt_@AM_V@)
133134 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
237238 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
238239 HAVE_LIBCPATH = @HAVE_LIBCPATH@
239240 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
240 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
241 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
242241 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
243242 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
244243 HAVE_LIBFDATA = @HAVE_LIBFDATA@
257256 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
258257 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
259258 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
260 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
261 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
262259 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
263260 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
264261 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
305302 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
306303 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
307304 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
308 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
309 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
310 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
311 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
312305 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
313306 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
314307 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
341334 LTLIBICONV = @LTLIBICONV@
342335 LTLIBINTL = @LTLIBINTL@
343336 LTLIBOBJS = @LTLIBOBJS@
337 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
344338 MAKEINFO = @MAKEINFO@
345339 MANIFEST_TOOL = @MANIFEST_TOOL@
346340 MKDIR_P = @MKDIR_P@
447441 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
448442 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
449443 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
450 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
451 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
452 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
453 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
454 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
455 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
456444 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
457445 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
458446 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
521509 libcpath_LIBS = @libcpath_LIBS@
522510 libcsplit_CFLAGS = @libcsplit_CFLAGS@
523511 libcsplit_LIBS = @libcsplit_LIBS@
524 libcstring_CFLAGS = @libcstring_CFLAGS@
525 libcstring_LIBS = @libcstring_LIBS@
526 libcsystem_CFLAGS = @libcsystem_CFLAGS@
527 libcsystem_LIBS = @libcsystem_LIBS@
528512 libcthreads_CFLAGS = @libcthreads_CFLAGS@
529513 libcthreads_LIBS = @libcthreads_LIBS@
530514 libdir = @libdir@
576560 @HAVE_LOCAL_LIBCFILE_TRUE@AM_CPPFLAGS = \
577561 @HAVE_LOCAL_LIBCFILE_TRUE@ -I$(top_srcdir)/include \
578562 @HAVE_LOCAL_LIBCFILE_TRUE@ -I$(top_srcdir)/common \
579 @HAVE_LOCAL_LIBCFILE_TRUE@ @LIBCSTRING_CPPFLAGS@ \
580563 @HAVE_LOCAL_LIBCFILE_TRUE@ @LIBCERROR_CPPFLAGS@ \
581564 @HAVE_LOCAL_LIBCFILE_TRUE@ @LIBCLOCALE_CPPFLAGS@ \
582565 @HAVE_LOCAL_LIBCFILE_TRUE@ @LIBCNOTIFY_CPPFLAGS@ \
591574 @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_libcerror.h \
592575 @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_libclocale.h \
593576 @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_libcnotify.h \
594 @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_libcstring.h \
595577 @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_libuna.h \
596578 @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_notify.c libcfile_notify.h \
597579 @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_support.c libcfile_support.h \
580 @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_system_string.c libcfile_system_string.h \
598581 @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_types.h \
599582 @HAVE_LOCAL_LIBCFILE_TRUE@ libcfile_unused.h
600583
659642 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfile_file.Plo@am__quote@
660643 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfile_notify.Plo@am__quote@
661644 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfile_support.Plo@am__quote@
645 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfile_system_string.Plo@am__quote@
662646
663647 .c.o:
664648 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
00 /*
11 * The internal definitions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3434 */
3535 #else
3636
37 #define LIBCFILE_VERSION 20160423
37 #define LIBCFILE_VERSION 20170105
3838
39 /* The libcstring version string
39 /* The libcfile version string
4040 */
41 #define LIBCFILE_VERSION_STRING "20160423"
41 #define LIBCFILE_VERSION_STRING "20170105"
4242
4343 /* The file access flags
4444 * bit 1 set to 1 for read access
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4343 libcfile_error_t *error,
4444 FILE *stream )
4545 {
46 return( libcerror_error_fprint(
47 (libcerror_error_t *) error,
48 stream ) );
46 int print_count = 0;
47
48 print_count = libcerror_error_fprint(
49 (libcerror_error_t *) error,
50 stream );
51
52 return( print_count );
4953 }
5054
5155 /* Prints a descriptive string of the error to the string
5761 char *string,
5862 size_t size )
5963 {
60 return( libcerror_error_sprint(
61 (libcerror_error_t *) error,
62 string,
63 size ) );
64 int print_count = 0;
65
66 print_count = libcerror_error_sprint(
67 (libcerror_error_t *) error,
68 string,
69 size );
70
71 return( print_count );
6472 }
6573
6674 /* Prints a backtrace of the error to the stream
7078 libcfile_error_t *error,
7179 FILE *stream )
7280 {
73 return( libcerror_error_backtrace_fprint(
74 (libcerror_error_t *) error,
75 stream ) );
81 int print_count = 0;
82
83 print_count = libcerror_error_backtrace_fprint(
84 (libcerror_error_t *) error,
85 stream );
86
87 return( print_count );
7688 }
7789
7890 /* Prints a backtrace of the error to the string
8496 char *string,
8597 size_t size )
8698 {
87 return( libcerror_error_backtrace_sprint(
88 (libcerror_error_t *) error,
89 string,
90 size ) );
99 int print_count = 0;
100
101 print_count = libcerror_error_backtrace_sprint(
102 (libcerror_error_t *) error,
103 string,
104 size );
105
106 return( print_count );
91107 }
92108
93109 #endif /* !defined( HAVE_LOCAL_LIBCFILE ) */
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal extern definition
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 #include <libcfile/extern.h>
3838
3939 #else
40 #define LIBCFILE_EXTERN /* extern */
4041
41 #define LIBCFILE_EXTERN extern
42 #endif /* !defined( HAVE_LOCAL_LIBCFILE ) */
4243
43 #endif
44 #endif /* !defined( _LIBCFILE_INTERNAL_EXTERN_H ) */
4445
45 #endif
46
00 /*
11 * File functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2020
2121 #include <common.h>
2222 #include <memory.h>
23 #include <narrow_string.h>
24 #include <system_string.h>
2325 #include <types.h>
26 #include <wide_string.h>
2427
2528 #if defined( HAVE_SYS_STAT_H )
2629 #include <sys/stat.h>
8689 #include "libcfile_definitions.h"
8790 #include "libcfile_file.h"
8891 #include "libcfile_libcerror.h"
89 #include "libcfile_libclocale.h"
9092 #include "libcfile_libcnotify.h"
91 #include "libcfile_libcstring.h"
92 #include "libcfile_libuna.h"
93 #include "libcfile_system_string.h"
9394 #include "libcfile_types.h"
9495
9596 #if defined( WINAPI ) && ( WINVER <= 0x0500 )
109110 return( FALSE );
110111 }
111112 library_handle = LoadLibrary(
112 _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) );
113 _SYSTEM_STRING( "kernel32.dll" ) );
113114
114115 if( library_handle == NULL )
115116 {
298299 return( INVALID_HANDLE_VALUE );
299300 }
300301 library_handle = LoadLibrary(
301 _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) );
302 _SYSTEM_STRING( "kernel32.dll" ) );
302303
303304 if( library_handle == NULL )
304305 {
474475
475476 return( -1 );
476477 }
477 filename_length = libcstring_narrow_string_length(
478 filename_length = narrow_string_length(
478479 filename );
479480
480481 if( filename_length > 4 )
531532 error,
532533 LIBCERROR_ERROR_DOMAIN_IO,
533534 LIBCERROR_IO_ERROR_ACCESS_DENIED,
534 "%s: access denied to file: %" PRIs_LIBCSTRING_SYSTEM ".",
535 "%s: access denied to file: %" PRIs_SYSTEM ".",
535536 function,
536537 filename );
537538
543544 error,
544545 LIBCERROR_ERROR_DOMAIN_IO,
545546 LIBCERROR_IO_ERROR_INVALID_RESOURCE,
546 "%s: no such file: %" PRIs_LIBCSTRING_SYSTEM ".",
547 "%s: no such file: %" PRIs_SYSTEM ".",
547548 function,
548549 filename );
549550
555556 LIBCERROR_ERROR_DOMAIN_IO,
556557 LIBCERROR_IO_ERROR_OPEN_FAILED,
557558 *error_code,
558 "%s: unable to open file: %" PRIs_LIBCSTRING_SYSTEM ".",
559 "%s: unable to open file: %" PRIs_SYSTEM ".",
559560 function,
560561 filename );
561562
684685 error,
685686 LIBCERROR_ERROR_DOMAIN_IO,
686687 LIBCERROR_IO_ERROR_ACCESS_DENIED,
687 "%s: access denied to file: %" PRIs_LIBCSTRING_SYSTEM ".",
688 "%s: access denied to file: %" PRIs_SYSTEM ".",
688689 function,
689690 filename );
690691
695696 error,
696697 LIBCERROR_ERROR_DOMAIN_IO,
697698 LIBCERROR_IO_ERROR_INVALID_RESOURCE,
698 "%s: no such file: %" PRIs_LIBCSTRING_SYSTEM ".",
699 "%s: no such file: %" PRIs_SYSTEM ".",
699700 function,
700701 filename );
701702
707708 LIBCERROR_ERROR_DOMAIN_IO,
708709 LIBCERROR_IO_ERROR_OPEN_FAILED,
709710 *error_code,
710 "%s: unable to open file: %" PRIs_LIBCSTRING_SYSTEM ".",
711 "%s: unable to open file: %" PRIs_SYSTEM ".",
711712 function,
712713 filename );
713714
750751 return( INVALID_HANDLE_VALUE );
751752 }
752753 library_handle = LoadLibrary(
753 _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) );
754 _SYSTEM_STRING( "kernel32.dll" ) );
754755
755756 if( library_handle == NULL )
756757 {
926927
927928 return( -1 );
928929 }
929 filename_length = libcstring_wide_string_length(
930 filename_length = wide_string_length(
930931 filename );
931932
932933 if( filename_length > 4 )
983984 error,
984985 LIBCERROR_ERROR_DOMAIN_IO,
985986 LIBCERROR_IO_ERROR_ACCESS_DENIED,
986 "%s: access denied to file: %" PRIs_LIBCSTRING_SYSTEM ".",
987 "%s: access denied to file: %" PRIs_SYSTEM ".",
987988 function,
988989 filename );
989990
995996 error,
996997 LIBCERROR_ERROR_DOMAIN_IO,
997998 LIBCERROR_IO_ERROR_INVALID_RESOURCE,
998 "%s: no such file: %" PRIs_LIBCSTRING_SYSTEM ".",
999 "%s: no such file: %" PRIs_SYSTEM ".",
9991000 function,
10001001 filename );
10011002
10071008 LIBCERROR_ERROR_DOMAIN_IO,
10081009 LIBCERROR_IO_ERROR_OPEN_FAILED,
10091010 *error_code,
1010 "%s: unable to open file: %" PRIs_LIBCSTRING_SYSTEM ".",
1011 "%s: unable to open file: %" PRIs_SYSTEM ".",
10111012 function,
10121013 filename );
10131014
10371038 size_t filename_size = 0;
10381039 size_t narrow_filename_size = 0;
10391040 int file_io_flags = 0;
1040 int result = 0;
10411041
10421042 if( file == NULL )
10431043 {
11151115
11161116 return( -1 );
11171117 }
1118 filename_size = 1 + libcstring_wide_string_length(
1118 filename_size = 1 + wide_string_length(
11191119 filename );
11201120
1121 if( libclocale_codepage == 0 )
1122 {
1123 #if SIZEOF_WCHAR_T == 4
1124 result = libuna_utf8_string_size_from_utf32(
1125 (libuna_utf32_character_t *) filename,
1126 filename_size,
1127 &narrow_filename_size,
1128 error );
1129 #elif SIZEOF_WCHAR_T == 2
1130 result = libuna_utf8_string_size_from_utf16(
1131 (libuna_utf16_character_t *) filename,
1132 filename_size,
1133 &narrow_filename_size,
1134 error );
1135 #else
1136 #error Unsupported size of wchar_t
1137 #endif /* SIZEOF_WCHAR_T */
1138 }
1139 else
1140 {
1141 #if SIZEOF_WCHAR_T == 4
1142 result = libuna_byte_stream_size_from_utf32(
1143 (libuna_utf32_character_t *) filename,
1144 filename_size,
1145 libclocale_codepage,
1146 &narrow_filename_size,
1147 error );
1148 #elif SIZEOF_WCHAR_T == 2
1149 result = libuna_byte_stream_size_from_utf16(
1150 (libuna_utf16_character_t *) filename,
1151 filename_size,
1152 libclocale_codepage,
1153 &narrow_filename_size,
1154 error );
1155 #else
1156 #error Unsupported size of wchar_t
1157 #endif /* SIZEOF_WCHAR_T */
1158 }
1159 if( result != 1 )
1121 if( libcfile_system_string_size_from_wide_string(
1122 filename,
1123 filename_size,
1124 &narrow_filename_size,
1125 error ) != 1 )
11601126 {
11611127 libcerror_error_set(
11621128 error,
11671133
11681134 goto on_error;
11691135 }
1170 narrow_filename = libcstring_narrow_string_allocate(
1136 narrow_filename = narrow_string_allocate(
11711137 narrow_filename_size );
11721138
11731139 if( narrow_filename == NULL )
11811147
11821148 goto on_error;
11831149 }
1184 if( libclocale_codepage == 0 )
1185 {
1186 #if SIZEOF_WCHAR_T == 4
1187 result = libuna_utf8_string_copy_from_utf32(
1188 (libuna_utf8_character_t *) narrow_filename,
1189 narrow_filename_size,
1190 (libuna_utf32_character_t *) filename,
1191 filename_size,
1192 error );
1193 #elif SIZEOF_WCHAR_T == 2
1194 result = libuna_utf8_string_copy_from_utf16(
1195 (libuna_utf8_character_t *) narrow_filename,
1196 narrow_filename_size,
1197 (libuna_utf16_character_t *) filename,
1198 filename_size,
1199 error );
1200 #else
1201 #error Unsupported size of wchar_t
1202 #endif /* SIZEOF_WCHAR_T */
1203 }
1204 else
1205 {
1206 #if SIZEOF_WCHAR_T == 4
1207 result = libuna_byte_stream_copy_from_utf32(
1208 (uint8_t *) narrow_filename,
1209 narrow_filename_size,
1210 libclocale_codepage,
1211 (libuna_utf32_character_t *) filename,
1212 filename_size,
1213 error );
1214 #elif SIZEOF_WCHAR_T == 2
1215 result = libuna_byte_stream_copy_from_utf16(
1216 (uint8_t *) narrow_filename,
1217 narrow_filename_size,
1218 libclocale_codepage,
1219 (libuna_utf16_character_t *) filename,
1220 filename_size,
1221 error );
1222 #else
1223 #error Unsupported size of wchar_t
1224 #endif /* SIZEOF_WCHAR_T */
1225 }
1226 if( result != 1 )
1150 if( libcfile_system_string_copy_from_wide_string(
1151 narrow_filename,
1152 narrow_filename_size,
1153 filename,
1154 filename_size,
1155 error ) != 1 )
12271156 {
12281157 libcerror_error_set(
12291158 error,
12621191 error,
12631192 LIBCERROR_ERROR_DOMAIN_IO,
12641193 LIBCERROR_IO_ERROR_ACCESS_DENIED,
1265 "%s: access denied to file: %" PRIs_LIBCSTRING_SYSTEM ".",
1194 "%s: access denied to file: %" PRIs_SYSTEM ".",
12661195 function,
12671196 filename );
12681197
12731202 error,
12741203 LIBCERROR_ERROR_DOMAIN_IO,
12751204 LIBCERROR_IO_ERROR_INVALID_RESOURCE,
1276 "%s: no such file: %" PRIs_LIBCSTRING_SYSTEM ".",
1205 "%s: no such file: %" PRIs_SYSTEM ".",
12771206 function,
12781207 filename );
12791208
12851214 LIBCERROR_ERROR_DOMAIN_IO,
12861215 LIBCERROR_IO_ERROR_OPEN_FAILED,
12871216 *error_code,
1288 "%s: unable to open file: %" PRIs_LIBCSTRING_SYSTEM ".",
1217 "%s: unable to open file: %" PRIs_SYSTEM ".",
12891218 function,
12901219 filename );
12911220
15211450 return( FALSE );
15221451 }
15231452 library_handle = LoadLibrary(
1524 _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) );
1453 _SYSTEM_STRING( "kernel32.dll" ) );
15251454
15261455 if( library_handle == NULL )
15271456 {
15811510 return( FALSE );
15821511 }
15831512 library_handle = LoadLibrary(
1584 _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) );
1513 _SYSTEM_STRING( "kernel32.dll" ) );
15851514
15861515 if( library_handle == NULL )
15871516 {
25012430 return( FALSE );
25022431 }
25032432 library_handle = LoadLibrary(
2504 _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) );
2433 _SYSTEM_STRING( "kernel32.dll" ) );
25052434
25062435 if( library_handle == NULL )
25072436 {
27922721 return( FALSE );
27932722 }
27942723 library_handle = LoadLibrary(
2795 _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) );
2724 _SYSTEM_STRING( "kernel32.dll" ) );
27962725
27972726 if( library_handle == NULL )
27982727 {
31513080 return( FALSE );
31523081 }
31533082 library_handle = LoadLibrary(
3154 _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) );
3083 _SYSTEM_STRING( "kernel32.dll" ) );
31553084
31563085 if( library_handle == NULL )
31573086 {
34613390 return( FALSE );
34623391 }
34633392 library_handle = LoadLibrary(
3464 _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) );
3393 _SYSTEM_STRING( "kernel32.dll" ) );
34653394
34663395 if( library_handle == NULL )
34673396 {
41604089 return( FILE_TYPE_UNKNOWN );
41614090 }
41624091 library_handle = LoadLibrary(
4163 _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) );
4092 _SYSTEM_STRING( "kernel32.dll" ) );
41644093
41654094 if( library_handle == NULL )
41664095 {
45974526
45984527 /* On some versions of Linux the FADVISE definions seem to be missing from fcntl.h
45994528 */
4600 #if defined( HAVE_POSIX_FADVISE )
4529 #if defined( HAVE_POSIX_FADVISE ) && !defined( WINAPI )
46014530
46024531 #if !defined( POSIX_FADV_NORMAL )
46034532 #define POSIX_FADV_NORMAL 0
46114540 #define POSIX_FADV_SEQUENTIAL 2
46124541 #endif
46134542
4614 #endif /* #if defined( HAVE_POSIX_FADVISE ) */
4543 #endif /* #if defined( HAVE_POSIX_FADVISE ) && !defined( WINAPI ) */
46154544
46164545 /* Sets the expected access behavior so the system can optimize the access
46174546 * Returns 1 if successful or -1 on error
46244553 libcfile_internal_file_t *internal_file = NULL;
46254554 static char *function = "libcfile_file_set_access_behavior";
46264555
4627 #if defined( HAVE_POSIX_FADVISE )
4556 #if defined( HAVE_POSIX_FADVISE ) && !defined( WINAPI )
46284557 int advice = POSIX_FADV_NORMAL;
46294558 int result = 0;
46304559 #endif
46814610
46824611 return( -1 );
46834612 }
4684 #if defined( HAVE_POSIX_FADVISE )
4613 #if defined( HAVE_POSIX_FADVISE ) && !defined( WINAPI )
46854614 if( access_behavior == LIBCFILE_ACCESS_BEHAVIOR_NORMAL )
46864615 {
46874616 advice = POSIX_FADV_NORMAL;
47174646
47184647 return( -1 );
47194648 }
4720 #endif
4649 #endif /* defined( HAVE_POSIX_FADVISE ) && !defined( WINAPI ) */
47214650 return( 1 );
47224651 }
47234652
00 /*
11 * File functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal libcerror header
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal libclocale header
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal libcnotify header
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
+0
-51
libcfile/libcfile_libcstring.h less more
0 /*
1 * The internal libcstring header
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCFILE_LIBCSTRING_H )
22 #define _LIBCFILE_LIBCSTRING_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring
27 */
28 #if defined( HAVE_LOCAL_LIBCSTRING )
29
30 #include <libcstring_definitions.h>
31 #include <libcstring_narrow_string.h>
32 #include <libcstring_system_string.h>
33 #include <libcstring_types.h>
34 #include <libcstring_wide_string.h>
35
36 #else
37
38 /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT
39 * before including libcstring.h
40 */
41 #if defined( _WIN32 ) && defined( DLL_IMPORT )
42 #define LIBCSTRING_DLL_IMPORT
43 #endif
44
45 #include <libcstring.h>
46
47 #endif /* defined( HAVE_LOCAL_LIBCSTRING ) */
48
49 #endif /* !defined( _LIBCFILE_LIBCSTRING_H ) */
50
00 /*
11 * The libuna header wrapper
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * This software is free software: you can redistribute it and/or modify
66 * it under the terms of the GNU Lesser General Public License as published by
00 /*
11 * Notification functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
1 * Notification function
1 * Notification functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2020
2121 #include <common.h>
2222 #include <memory.h>
23 #include <narrow_string.h>
24 #include <system_string.h>
2325 #include <types.h>
26 #include <wide_string.h>
2427
2528 #if defined( HAVE_SYS_STAT_H )
2629 #include <sys/stat.h>
3740 #include "libcfile_definitions.h"
3841 #include "libcfile_libcerror.h"
3942 #include "libcfile_libclocale.h"
40 #include "libcfile_libcstring.h"
4143 #include "libcfile_libuna.h"
4244 #include "libcfile_support.h"
4345
4951 void )
5052 {
5153 return( (const char *) LIBCFILE_VERSION_STRING );
54 }
55
56 /* Retrieves the narrow system string codepage
57 * A value of 0 represents no codepage, UTF-8 encoding is used instead
58 * Returns 1 if successful or -1 on error
59 */
60 int libcfile_get_codepage(
61 int *codepage,
62 libcerror_error_t **error )
63 {
64 static char *function = "libcfile_get_codepage";
65
66 if( libclocale_codepage_get(
67 codepage,
68 error ) != 1 )
69 {
70 libcerror_error_set(
71 error,
72 LIBCERROR_ERROR_DOMAIN_RUNTIME,
73 LIBCERROR_RUNTIME_ERROR_GET_FAILED,
74 "%s: unable to retrieve codepage.",
75 function );
76
77 return( -1 );
78 }
79 return( 1 );
80 }
81
82 /* Sets the narrow system string codepage
83 * A value of 0 represents no codepage, UTF-8 encoding is used instead
84 * Returns 1 if successful or -1 on error
85 */
86 int libcfile_set_codepage(
87 int codepage,
88 libcerror_error_t **error )
89 {
90 static char *function = "libcfile_set_codepage";
91
92 if( libclocale_codepage_set(
93 codepage,
94 error ) != 1 )
95 {
96 libcerror_error_set(
97 error,
98 LIBCERROR_ERROR_DOMAIN_RUNTIME,
99 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
100 "%s: unable to set codepage.",
101 function );
102
103 return( -1 );
104 }
105 return( 1 );
52106 }
53107
54108 #endif /* !defined( HAVE_LOCAL_LIBCFILE ) */
70124 return( INVALID_FILE_ATTRIBUTES );
71125 }
72126 library_handle = LoadLibrary(
73 _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) );
127 _SYSTEM_STRING( "kernel32.dll" ) );
74128
75129 if( library_handle == NULL )
76130 {
229283 LIBCERROR_ERROR_DOMAIN_IO,
230284 LIBCERROR_IO_ERROR_GENERIC,
231285 errno,
232 "%s: unable to stat file: %" PRIs_LIBCSTRING_SYSTEM ".",
286 "%s: unable to stat file: %" PRIs_SYSTEM ".",
233287 function,
234288 filename );
235289
266320 return( INVALID_FILE_ATTRIBUTES );
267321 }
268322 library_handle = LoadLibrary(
269 _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) );
323 _SYSTEM_STRING( "kernel32.dll" ) );
270324
271325 if( library_handle == NULL )
272326 {
390444
391445 return( -1 );
392446 }
393 filename_size = 1 + libcstring_wide_string_length(
447 filename_size = 1 + wide_string_length(
394448 filename );
395449
396450 /* Convert the filename to a narrow string
445499
446500 return( -1 );
447501 }
448 narrow_filename = libcstring_narrow_string_allocate(
502 narrow_filename = narrow_string_allocate(
449503 narrow_filename_size );
450504
451505 if( narrow_filename == NULL )
542596 LIBCERROR_ERROR_DOMAIN_IO,
543597 LIBCERROR_IO_ERROR_GENERIC,
544598 errno,
545 "%s: unable to stat file: %" PRIs_LIBCSTRING_SYSTEM ".",
599 "%s: unable to stat file: %" PRIs_SYSTEM ".",
546600 function,
547601 filename );
548602
579633 return( FALSE );
580634 }
581635 library_handle = LoadLibrary(
582 _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) );
636 _SYSTEM_STRING( "kernel32.dll" ) );
583637
584638 if( library_handle == NULL )
585639 {
760814 return( FALSE );
761815 }
762816 library_handle = LoadLibrary(
763 _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) );
817 _SYSTEM_STRING( "kernel32.dll" ) );
764818
765819 if( library_handle == NULL )
766820 {
904958
905959 return( -1 );
906960 }
907 filename_size = 1 + libcstring_wide_string_length(
961 filename_size = 1 + wide_string_length(
908962 filename );
909963
910964 /* Convert the filename to a narrow string
9591013
9601014 goto on_error;
9611015 }
962 narrow_filename = libcstring_narrow_string_allocate(
1016 narrow_filename = narrow_string_allocate(
9631017 narrow_filename_size );
9641018
9651019 if( narrow_filename == NULL )
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3636 LIBCFILE_EXTERN \
3737 const char *libcfile_get_version(
3838 void );
39
40 LIBCFILE_EXTERN \
41 int libcfile_get_codepage(
42 int *codepage,
43 libcerror_error_t **error );
44
45 LIBCFILE_EXTERN \
46 int libcfile_set_codepage(
47 int codepage,
48 libcerror_error_t **error );
3949
4050 #endif /* !defined( HAVE_LOCAL_LIBCFILE ) */
4151
0 /*
1 * System string functions
2 *
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <memory.h>
23 #include <narrow_string.h>
24 #include <system_string.h>
25 #include <types.h>
26 #include <wide_string.h>
27
28 #include "libcfile_libcerror.h"
29 #include "libcfile_libclocale.h"
30 #include "libcfile_libuna.h"
31 #include "libcfile_system_string.h"
32
33 #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) && SIZEOF_WCHAR_T != 2 && SIZEOF_WCHAR_T != 4
34 #error Unsupported size of wchar_t
35 #endif
36
37 /* Determines the size of a narrow string from a system string
38 * Returns 1 if successful or -1 on error
39 */
40 int libcfile_system_string_size_to_narrow_string(
41 const system_character_t *system_string,
42 size_t system_string_size,
43 size_t *narrow_string_size,
44 libcerror_error_t **error )
45 {
46 static char *function = "libcfile_system_string_size_to_narrow_string";
47
48 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
49 int result = 0;
50 #endif
51
52 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
53 if( libclocale_codepage == 0 )
54 {
55 #if SIZEOF_WCHAR_T == 4
56 result = libuna_utf8_string_size_from_utf32(
57 (libuna_utf32_character_t *) system_string,
58 system_string_size,
59 narrow_string_size,
60 error );
61 #elif SIZEOF_WCHAR_T == 2
62 result = libuna_utf8_string_size_from_utf16(
63 (libuna_utf16_character_t *) system_string,
64 system_string_size,
65 narrow_string_size,
66 error );
67 #endif /* SIZEOF_WCHAR_T */
68 }
69 else
70 {
71 #if SIZEOF_WCHAR_T == 4
72 result = libuna_byte_stream_size_from_utf32(
73 (libuna_utf32_character_t *) system_string,
74 system_string_size,
75 libclocale_codepage,
76 narrow_string_size,
77 error );
78 #elif SIZEOF_WCHAR_T == 2
79 result = libuna_byte_stream_size_from_utf16(
80 (libuna_utf16_character_t *) system_string,
81 system_string_size,
82 libclocale_codepage,
83 narrow_string_size,
84 error );
85 #endif /* SIZEOF_WCHAR_T */
86 }
87 if( result != 1 )
88 {
89 libcerror_error_set(
90 error,
91 LIBCERROR_ERROR_DOMAIN_CONVERSION,
92 LIBCERROR_CONVERSION_ERROR_GENERIC,
93 "%s: unable to determine narrow string size.",
94 function );
95
96 return( -1 );
97 }
98 #else
99 if( system_string == NULL )
100 {
101 libcerror_error_set(
102 error,
103 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
104 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
105 "%s: invalid system string.",
106 function );
107
108 return( -1 );
109 }
110 if( system_string_size > (size_t) SSIZE_MAX )
111 {
112 libcerror_error_set(
113 error,
114 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
115 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
116 "%s: invalid system string size value exceeds maximum.",
117 function );
118
119 return( -1 );
120 }
121 if( narrow_string_size == NULL )
122 {
123 libcerror_error_set(
124 error,
125 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
126 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
127 "%s: invalid narrow string size.",
128 function );
129
130 return( -1 );
131 }
132 *narrow_string_size = system_string_size;
133
134 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
135
136 return( 1 );
137 }
138
139 /* Copies a system string to a narrow string
140 * Returns 1 if successful or -1 on error
141 */
142 int libcfile_system_string_copy_to_narrow_string(
143 const system_character_t *system_string,
144 size_t system_string_size,
145 char *narrow_string,
146 size_t narrow_string_size,
147 libcerror_error_t **error )
148 {
149 static char *function = "libcfile_system_string_copy_to_narrow_string";
150
151 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
152 int result = 0;
153 #endif
154
155 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
156 if( libclocale_codepage == 0 )
157 {
158 #if SIZEOF_WCHAR_T == 4
159 result = libuna_utf8_string_copy_from_utf32(
160 (libuna_utf8_character_t *) narrow_string,
161 narrow_string_size,
162 (libuna_utf32_character_t *) system_string,
163 system_string_size,
164 error );
165 #elif SIZEOF_WCHAR_T == 2
166 result = libuna_utf8_string_copy_from_utf16(
167 (libuna_utf8_character_t *) narrow_string,
168 narrow_string_size,
169 (libuna_utf16_character_t *) system_string,
170 system_string_size,
171 error );
172 #endif /* SIZEOF_WCHAR_T */
173 }
174 else
175 {
176 #if SIZEOF_WCHAR_T == 4
177 result = libuna_byte_stream_copy_from_utf32(
178 (uint8_t *) narrow_string,
179 narrow_string_size,
180 libclocale_codepage,
181 (libuna_utf32_character_t *) system_string,
182 system_string_size,
183 error );
184 #elif SIZEOF_WCHAR_T == 2
185 result = libuna_byte_stream_copy_from_utf16(
186 (uint8_t *) narrow_string,
187 narrow_string_size,
188 libclocale_codepage,
189 (libuna_utf16_character_t *) system_string,
190 system_string_size,
191 error );
192 #endif /* SIZEOF_WCHAR_T */
193 }
194 if( result != 1 )
195 {
196 libcerror_error_set(
197 error,
198 LIBCERROR_ERROR_DOMAIN_CONVERSION,
199 LIBCERROR_CONVERSION_ERROR_GENERIC,
200 "%s: unable to set narrow string.",
201 function );
202
203 return( -1 );
204 }
205 #else
206 if( system_string == NULL )
207 {
208 libcerror_error_set(
209 error,
210 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
211 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
212 "%s: invalid system string.",
213 function );
214
215 return( -1 );
216 }
217 if( system_string_size > (size_t) SSIZE_MAX )
218 {
219 libcerror_error_set(
220 error,
221 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
222 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
223 "%s: invalid system string size value exceeds maximum.",
224 function );
225
226 return( -1 );
227 }
228 if( narrow_string == NULL )
229 {
230 libcerror_error_set(
231 error,
232 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
233 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
234 "%s: invalid narrow string.",
235 function );
236
237 return( -1 );
238 }
239 if( narrow_string_size > (size_t) SSIZE_MAX )
240 {
241 libcerror_error_set(
242 error,
243 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
244 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
245 "%s: invalid narrow string size value exceeds maximum.",
246 function );
247
248 return( -1 );
249 }
250 if( narrow_string_size < system_string_size )
251 {
252 libcerror_error_set(
253 error,
254 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
255 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
256 "%s: invalid narrow string size value too small.",
257 function );
258
259 return( -1 );
260 }
261 if( system_string_copy(
262 narrow_string,
263 system_string,
264 system_string_size ) == NULL )
265 {
266 libcerror_error_set(
267 error,
268 LIBCERROR_ERROR_DOMAIN_MEMORY,
269 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
270 "%s: unable to set narrow string.",
271 function );
272
273 return( -1 );
274 }
275 narrow_string[ system_string_size - 1 ] = 0;
276
277 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
278
279 return( 1 );
280 }
281
282 /* Determines the size of a system string from a narrow string
283 * Returns 1 if successful or -1 on error
284 */
285 int libcfile_system_string_size_from_narrow_string(
286 const char *narrow_string,
287 size_t narrow_string_size,
288 size_t *system_string_size,
289 libcerror_error_t **error )
290 {
291 static char *function = "libcfile_system_string_size_from_narrow_string";
292
293 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
294 int result = 0;
295 #endif
296
297 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
298 if( libclocale_codepage == 0 )
299 {
300 #if SIZEOF_WCHAR_T == 4
301 result = libuna_utf32_string_size_from_utf8(
302 (libuna_utf8_character_t *) narrow_string,
303 narrow_string_size,
304 system_string_size,
305 error );
306 #elif SIZEOF_WCHAR_T == 2
307 result = libuna_utf16_string_size_from_utf8(
308 (libuna_utf8_character_t *) narrow_string,
309 narrow_string_size,
310 system_string_size,
311 error );
312 #endif /* SIZEOF_WCHAR_T */
313 }
314 else
315 {
316 #if SIZEOF_WCHAR_T == 4
317 result = libuna_utf32_string_size_from_byte_stream(
318 (uint8_t *) narrow_string,
319 narrow_string_size,
320 libclocale_codepage,
321 system_string_size,
322 error );
323 #elif SIZEOF_WCHAR_T == 2
324 result = libuna_utf16_string_size_from_byte_stream(
325 (uint8_t *) narrow_string,
326 narrow_string_size,
327 libclocale_codepage,
328 system_string_size,
329 error );
330 #endif /* SIZEOF_WCHAR_T */
331 }
332 if( result != 1 )
333 {
334 libcerror_error_set(
335 error,
336 LIBCERROR_ERROR_DOMAIN_CONVERSION,
337 LIBCERROR_CONVERSION_ERROR_GENERIC,
338 "%s: unable to determine system string size.",
339 function );
340
341 return( -1 );
342 }
343 #else
344 if( narrow_string == NULL )
345 {
346 libcerror_error_set(
347 error,
348 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
349 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
350 "%s: invalid narrow string.",
351 function );
352
353 return( -1 );
354 }
355 if( narrow_string_size > (size_t) SSIZE_MAX )
356 {
357 libcerror_error_set(
358 error,
359 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
360 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
361 "%s: invalid narrow string size value exceeds maximum.",
362 function );
363
364 return( -1 );
365 }
366 if( system_string_size == NULL )
367 {
368 libcerror_error_set(
369 error,
370 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
371 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
372 "%s: invalid system string size.",
373 function );
374
375 return( -1 );
376 }
377 *system_string_size = narrow_string_size;
378
379 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
380
381 return( 1 );
382 }
383
384 /* Copies a system string from a narrow string
385 * Returns 1 if successful or -1 on error
386 */
387 int libcfile_system_string_copy_from_narrow_string(
388 system_character_t *system_string,
389 size_t system_string_size,
390 const char *narrow_string,
391 size_t narrow_string_size,
392 libcerror_error_t **error )
393 {
394 static char *function = "libcfile_system_string_copy_from_narrow_string";
395
396 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
397 int result = 0;
398 #endif
399
400 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
401 if( libclocale_codepage == 0 )
402 {
403 #if SIZEOF_WCHAR_T == 4
404 result = libuna_utf32_string_copy_from_utf8(
405 (libuna_utf32_character_t *) system_string,
406 system_string_size,
407 (libuna_utf8_character_t *) narrow_string,
408 narrow_string_size,
409 error );
410 #elif SIZEOF_WCHAR_T == 2
411 result = libuna_utf16_string_copy_from_utf8(
412 (libuna_utf16_character_t *) system_string,
413 system_string_size,
414 (libuna_utf8_character_t *) narrow_string,
415 narrow_string_size,
416 error );
417 #endif /* SIZEOF_WCHAR_T */
418 }
419 else
420 {
421 #if SIZEOF_WCHAR_T == 4
422 result = libuna_utf32_string_copy_from_byte_stream(
423 (libuna_utf32_character_t *) system_string,
424 system_string_size,
425 (uint8_t *) narrow_string,
426 narrow_string_size,
427 libclocale_codepage,
428 error );
429 #elif SIZEOF_WCHAR_T == 2
430 result = libuna_utf16_string_copy_from_byte_stream(
431 (libuna_utf16_character_t *) system_string,
432 system_string_size,
433 (uint8_t *) narrow_string,
434 narrow_string_size,
435 libclocale_codepage,
436 error );
437 #endif /* SIZEOF_WCHAR_T */
438 }
439 if( result != 1 )
440 {
441 libcerror_error_set(
442 error,
443 LIBCERROR_ERROR_DOMAIN_CONVERSION,
444 LIBCERROR_CONVERSION_ERROR_GENERIC,
445 "%s: unable to set system string.",
446 function );
447
448 return( -1 );
449 }
450 #else
451 if( system_string == NULL )
452 {
453 libcerror_error_set(
454 error,
455 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
456 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
457 "%s: invalid system string.",
458 function );
459
460 return( -1 );
461 }
462 if( system_string_size > (size_t) SSIZE_MAX )
463 {
464 libcerror_error_set(
465 error,
466 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
467 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
468 "%s: invalid system string size value exceeds maximum.",
469 function );
470
471 return( -1 );
472 }
473 if( narrow_string == NULL )
474 {
475 libcerror_error_set(
476 error,
477 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
478 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
479 "%s: invalid narrow string.",
480 function );
481
482 return( -1 );
483 }
484 if( narrow_string_size > (size_t) SSIZE_MAX )
485 {
486 libcerror_error_set(
487 error,
488 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
489 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
490 "%s: invalid narrow string size value exceeds maximum.",
491 function );
492
493 return( -1 );
494 }
495 if( system_string_size < narrow_string_size )
496 {
497 libcerror_error_set(
498 error,
499 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
500 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
501 "%s: invalid system string size value too small.",
502 function );
503
504 return( -1 );
505 }
506 if( system_string_copy(
507 system_string,
508 narrow_string,
509 narrow_string_size ) == NULL )
510 {
511 libcerror_error_set(
512 error,
513 LIBCERROR_ERROR_DOMAIN_MEMORY,
514 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
515 "%s: unable to set narrow_string.",
516 function );
517
518 return( -1 );
519 }
520 system_string[ narrow_string_size - 1 ] = 0;
521
522 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
523
524 return( 1 );
525 }
526
527 #if defined( HAVE_WIDE_CHARACTER_TYPE )
528
529 /* Determines the size of a wide string from a system string
530 * Returns 1 if successful or -1 on error
531 */
532 int libcfile_system_string_size_to_wide_string(
533 const system_character_t *system_string,
534 size_t system_string_size,
535 size_t *wide_string_size,
536 libcerror_error_t **error )
537 {
538 static char *function = "libcfile_system_string_size_to_wide_string";
539
540 #if !defined( HAVE_WIDE_SYSTEM_CHARACTER )
541 int result = 0;
542 #endif
543
544 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
545 if( system_string == NULL )
546 {
547 libcerror_error_set(
548 error,
549 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
550 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
551 "%s: invalid system string.",
552 function );
553
554 return( -1 );
555 }
556 if( system_string_size > (size_t) SSIZE_MAX )
557 {
558 libcerror_error_set(
559 error,
560 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
561 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
562 "%s: invalid system string size value exceeds maximum.",
563 function );
564
565 return( -1 );
566 }
567 if( wide_string_size == NULL )
568 {
569 libcerror_error_set(
570 error,
571 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
572 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
573 "%s: invalid wide string size.",
574 function );
575
576 return( -1 );
577 }
578 *wide_string_size = system_string_size;
579 #else
580 if( libclocale_codepage == 0 )
581 {
582 #if SIZEOF_WCHAR_T == 4
583 result = libuna_utf32_string_size_from_utf8(
584 (libuna_utf8_character_t *) system_string,
585 system_string_size,
586 wide_string_size,
587 error );
588 #elif SIZEOF_WCHAR_T == 2
589 result = libuna_utf16_string_size_from_utf8(
590 (libuna_utf8_character_t *) system_string,
591 system_string_size,
592 wide_string_size,
593 error );
594 #endif /* SIZEOF_WCHAR_T */
595 }
596 else
597 {
598 #if SIZEOF_WCHAR_T == 4
599 result = libuna_utf32_string_size_from_byte_stream(
600 (uint8_t *) system_string,
601 system_string_size,
602 libclocale_codepage,
603 wide_string_size,
604 error );
605 #elif SIZEOF_WCHAR_T == 2
606 result = libuna_utf16_string_size_from_byte_stream(
607 (uint8_t *) system_string,
608 system_string_size,
609 libclocale_codepage,
610 wide_string_size,
611 error );
612 #endif /* SIZEOF_WCHAR_T */
613 }
614 if( result != 1 )
615 {
616 libcerror_error_set(
617 error,
618 LIBCERROR_ERROR_DOMAIN_CONVERSION,
619 LIBCERROR_CONVERSION_ERROR_GENERIC,
620 "%s: unable to determine wide string size.",
621 function );
622
623 return( -1 );
624 }
625 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
626
627 return( 1 );
628 }
629
630 /* Copies a system string to a wide string
631 * Returns 1 if successful or -1 on error
632 */
633 int libcfile_system_string_copy_to_wide_string(
634 const system_character_t *system_string,
635 size_t system_string_size,
636 wchar_t *wide_string,
637 size_t wide_string_size,
638 libcerror_error_t **error )
639 {
640 static char *function = "libcfile_system_string_copy_to_wide_string";
641
642 #if !defined( HAVE_WIDE_SYSTEM_CHARACTER )
643 int result = 0;
644 #endif
645
646 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
647 if( system_string == NULL )
648 {
649 libcerror_error_set(
650 error,
651 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
652 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
653 "%s: invalid system string.",
654 function );
655
656 return( -1 );
657 }
658 if( system_string_size > (size_t) SSIZE_MAX )
659 {
660 libcerror_error_set(
661 error,
662 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
663 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
664 "%s: invalid system string size value exceeds maximum.",
665 function );
666
667 return( -1 );
668 }
669 if( wide_string == NULL )
670 {
671 libcerror_error_set(
672 error,
673 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
674 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
675 "%s: invalid wide string.",
676 function );
677
678 return( -1 );
679 }
680 if( wide_string_size > (size_t) SSIZE_MAX )
681 {
682 libcerror_error_set(
683 error,
684 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
685 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
686 "%s: invalid wide string size value exceeds maximum.",
687 function );
688
689 return( -1 );
690 }
691 if( wide_string_size < system_string_size )
692 {
693 libcerror_error_set(
694 error,
695 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
696 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
697 "%s: invalid wide string size value too small.",
698 function );
699
700 return( -1 );
701 }
702 if( system_string_copy(
703 wide_string,
704 system_string,
705 system_string_size ) == NULL )
706 {
707 libcerror_error_set(
708 error,
709 LIBCERROR_ERROR_DOMAIN_MEMORY,
710 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
711 "%s: unable to set wide string.",
712 function );
713
714 return( -1 );
715 }
716 wide_string[ system_string_size - 1 ] = 0;
717 #else
718 if( libclocale_codepage == 0 )
719 {
720 #if SIZEOF_WCHAR_T == 4
721 result = libuna_utf32_string_copy_from_utf8(
722 (libuna_utf32_character_t *) wide_string,
723 wide_string_size,
724 (libuna_utf8_character_t *) system_string,
725 system_string_size,
726 error );
727 #elif SIZEOF_WCHAR_T == 2
728 result = libuna_utf16_string_copy_from_utf8(
729 (libuna_utf16_character_t *) wide_string,
730 wide_string_size,
731 (libuna_utf8_character_t *) system_string,
732 system_string_size,
733 error );
734 #endif /* SIZEOF_WCHAR_T */
735 }
736 else
737 {
738 #if SIZEOF_WCHAR_T == 4
739 result = libuna_utf32_string_copy_from_byte_stream(
740 (libuna_utf32_character_t *) wide_string,
741 wide_string_size,
742 (uint8_t *) system_string,
743 system_string_size,
744 libclocale_codepage,
745 error );
746 #elif SIZEOF_WCHAR_T == 2
747 result = libuna_utf16_string_copy_from_byte_stream(
748 (libuna_utf16_character_t *) wide_string,
749 wide_string_size,
750 (uint8_t *) system_string,
751 system_string_size,
752 libclocale_codepage,
753 error );
754 #endif /* SIZEOF_WCHAR_T */
755 }
756 if( result != 1 )
757 {
758 libcerror_error_set(
759 error,
760 LIBCERROR_ERROR_DOMAIN_CONVERSION,
761 LIBCERROR_CONVERSION_ERROR_GENERIC,
762 "%s: unable to set wide string.",
763 function );
764
765 return( -1 );
766 }
767 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
768
769 return( 1 );
770 }
771
772 /* Determines the size of a system string from a wide string
773 * Returns 1 if successful or -1 on error
774 */
775 int libcfile_system_string_size_from_wide_string(
776 const wchar_t *wide_string,
777 size_t wide_string_size,
778 size_t *system_string_size,
779 libcerror_error_t **error )
780 {
781 static char *function = "libcfile_system_string_size_from_wide_string";
782
783 #if !defined( HAVE_WIDE_SYSTEM_CHARACTER )
784 int result = 0;
785 #endif
786
787 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
788 if( wide_string == NULL )
789 {
790 libcerror_error_set(
791 error,
792 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
793 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
794 "%s: invalid wide string.",
795 function );
796
797 return( -1 );
798 }
799 if( wide_string_size > (size_t) SSIZE_MAX )
800 {
801 libcerror_error_set(
802 error,
803 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
804 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
805 "%s: invalid wide string size value exceeds maximum.",
806 function );
807
808 return( -1 );
809 }
810 if( system_string_size == NULL )
811 {
812 libcerror_error_set(
813 error,
814 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
815 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
816 "%s: invalid system string size.",
817 function );
818
819 return( -1 );
820 }
821 *system_string_size = wide_string_size;
822 #else
823 if( libclocale_codepage == 0 )
824 {
825 #if SIZEOF_WCHAR_T == 4
826 result = libuna_utf8_string_size_from_utf32(
827 (libuna_utf32_character_t *) wide_string,
828 wide_string_size,
829 system_string_size,
830 error );
831 #elif SIZEOF_WCHAR_T == 2
832 result = libuna_utf8_string_size_from_utf16(
833 (libuna_utf16_character_t *) wide_string,
834 wide_string_size,
835 system_string_size,
836 error );
837 #endif /* SIZEOF_WCHAR_T */
838 }
839 else
840 {
841 #if SIZEOF_WCHAR_T == 4
842 result = libuna_byte_stream_size_from_utf32(
843 (libuna_utf32_character_t *) wide_string,
844 wide_string_size,
845 libclocale_codepage,
846 system_string_size,
847 error );
848 #elif SIZEOF_WCHAR_T == 2
849 result = libuna_byte_stream_size_from_utf16(
850 (libuna_utf16_character_t *) wide_string,
851 wide_string_size,
852 libclocale_codepage,
853 system_string_size,
854 error );
855 #endif /* SIZEOF_WCHAR_T */
856 }
857 if( result != 1 )
858 {
859 libcerror_error_set(
860 error,
861 LIBCERROR_ERROR_DOMAIN_CONVERSION,
862 LIBCERROR_CONVERSION_ERROR_GENERIC,
863 "%s: unable to determine wide string size.",
864 function );
865
866 return( -1 );
867 }
868 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
869
870 return( 1 );
871 }
872
873 /* Copies a system string from a wide string
874 * Returns 1 if successful or -1 on error
875 */
876 int libcfile_system_string_copy_from_wide_string(
877 system_character_t *system_string,
878 size_t system_string_size,
879 const wchar_t *wide_string,
880 size_t wide_string_size,
881 libcerror_error_t **error )
882 {
883 static char *function = "libcfile_system_string_copy_from_wide_string";
884
885 #if !defined( HAVE_WIDE_SYSTEM_CHARACTER )
886 int result = 0;
887 #endif
888
889 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
890 if( system_string == NULL )
891 {
892 libcerror_error_set(
893 error,
894 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
895 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
896 "%s: invalid system string.",
897 function );
898
899 return( -1 );
900 }
901 if( system_string_size > (size_t) SSIZE_MAX )
902 {
903 libcerror_error_set(
904 error,
905 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
906 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
907 "%s: invalid system string size value exceeds maximum.",
908 function );
909
910 return( -1 );
911 }
912 if( wide_string == NULL )
913 {
914 libcerror_error_set(
915 error,
916 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
917 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
918 "%s: invalid wide string.",
919 function );
920
921 return( -1 );
922 }
923 if( wide_string_size > (size_t) SSIZE_MAX )
924 {
925 libcerror_error_set(
926 error,
927 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
928 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
929 "%s: invalid wide string size value exceeds maximum.",
930 function );
931
932 return( -1 );
933 }
934 if( system_string_size < wide_string_size )
935 {
936 libcerror_error_set(
937 error,
938 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
939 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
940 "%s: invalid system string size value too small.",
941 function );
942
943 return( -1 );
944 }
945 if( system_string_copy(
946 system_string,
947 wide_string,
948 wide_string_size ) == NULL )
949 {
950 libcerror_error_set(
951 error,
952 LIBCERROR_ERROR_DOMAIN_MEMORY,
953 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
954 "%s: unable to set wide_string.",
955 function );
956
957 return( -1 );
958 }
959 system_string[ wide_string_size - 1 ] = 0;
960 #else
961 if( libclocale_codepage == 0 )
962 {
963 #if SIZEOF_WCHAR_T == 4
964 result = libuna_utf8_string_copy_from_utf32(
965 (libuna_utf8_character_t *) system_string,
966 system_string_size,
967 (libuna_utf32_character_t *) wide_string,
968 wide_string_size,
969 error );
970 #elif SIZEOF_WCHAR_T == 2
971 result = libuna_utf8_string_copy_from_utf16(
972 (libuna_utf8_character_t *) system_string,
973 system_string_size,
974 (libuna_utf16_character_t *) wide_string,
975 wide_string_size,
976 error );
977 #endif /* SIZEOF_WCHAR_T */
978 }
979 else
980 {
981 #if SIZEOF_WCHAR_T == 4
982 result = libuna_byte_stream_copy_from_utf32(
983 (uint8_t *) system_string,
984 system_string_size,
985 libclocale_codepage,
986 (libuna_utf32_character_t *) wide_string,
987 wide_string_size,
988 error );
989 #elif SIZEOF_WCHAR_T == 2
990 result = libuna_byte_stream_copy_from_utf16(
991 (uint8_t *) system_string,
992 system_string_size,
993 libclocale_codepage,
994 (libuna_utf16_character_t *) wide_string,
995 wide_string_size,
996 error );
997 #endif /* SIZEOF_WCHAR_T */
998 }
999 if( result != 1 )
1000 {
1001 libcerror_error_set(
1002 error,
1003 LIBCERROR_ERROR_DOMAIN_CONVERSION,
1004 LIBCERROR_CONVERSION_ERROR_GENERIC,
1005 "%s: unable to set wide string.",
1006 function );
1007
1008 return( -1 );
1009 }
1010 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
1011
1012 return( 1 );
1013 }
1014
1015 #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */
1016
0 /*
1 * System string functions
2 *
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCFILE_SYSTEM_STRING_H )
22 #define _LIBCFILE_SYSTEM_STRING_H
23
24 #include <common.h>
25 #include <types.h>
26
27 #include "libcfile_libcerror.h"
28
29 #if defined( __cplusplus )
30 extern "C" {
31 #endif
32
33 int libcfile_system_string_size_to_narrow_string(
34 const system_character_t *system_string,
35 size_t system_string_size,
36 size_t *narrow_string_size,
37 libcerror_error_t **error );
38
39 int libcfile_system_string_copy_to_narrow_string(
40 const system_character_t *system_string,
41 size_t system_string_size,
42 char *narrow_string,
43 size_t narrow_string_size,
44 libcerror_error_t **error );
45
46 int libcfile_system_string_size_from_narrow_string(
47 const char *narrow_string,
48 size_t narrow_string_size,
49 size_t *system_string_size,
50 libcerror_error_t **error );
51
52 int libcfile_system_string_copy_from_narrow_string(
53 system_character_t *system_string,
54 size_t system_string_size,
55 const char *narrow_string,
56 size_t narrow_string_size,
57 libcerror_error_t **error );
58
59 #if defined( HAVE_WIDE_CHARACTER_TYPE )
60
61 int libcfile_system_string_size_to_wide_string(
62 const system_character_t *system_string,
63 size_t system_string_size,
64 size_t *wide_string_size,
65 libcerror_error_t **error );
66
67 int libcfile_system_string_copy_to_wide_string(
68 const system_character_t *system_string,
69 size_t system_string_size,
70 wchar_t *wide_string,
71 size_t wide_string_size,
72 libcerror_error_t **error );
73
74 int libcfile_system_string_size_from_wide_string(
75 const wchar_t *wide_string,
76 size_t wide_string_size,
77 size_t *system_string_size,
78 libcerror_error_t **error );
79
80 int libcfile_system_string_copy_from_wide_string(
81 system_character_t *system_string,
82 size_t system_string_size,
83 const wchar_t *wide_string,
84 size_t wide_string_size,
85 libcerror_error_t **error );
86
87 #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */
88
89 #if defined( __cplusplus )
90 }
91 #endif
92
93 #endif /* !defined( _LIBCFILE_SYSTEM_STRING_H ) */
94
00 /*
11 * The internal type definitions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal unused definition
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
22 -DLOCALEDIR=\"$(datadir)/locale\" \
33 -I$(top_srcdir)/include \
44 -I$(top_srcdir)/common \
5 @LIBCSTRING_CPPFLAGS@ \
65 @LIBCERROR_CPPFLAGS@
76
87 noinst_LTLIBRARIES = libclocale.la
1211 libclocale_definitions.h \
1312 libclocale_extern.h \
1413 libclocale_libcerror.h \
15 libclocale_libcstring.h \
1614 libclocale_locale.c libclocale_locale.h \
1715 libclocale_support.c libclocale_support.h \
18 libclocale_unused.h
16 libclocale_unused.h \
17 libclocale_wide_string.c libclocale_wide_string.h
1918 endif
20
2119
2220 MAINTAINERCLEANFILES = \
2321 Makefile.in
9797 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9898 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9999 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101100 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102101 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103102 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
108107 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109108 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110109 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
110 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
111 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
113112 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114113 $(ACLOCAL_M4)
115114 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
121120 libclocale_la_LIBADD =
122121 am__libclocale_la_SOURCES_DIST = libclocale_codepage.c \
123122 libclocale_codepage.h libclocale_definitions.h \
124 libclocale_extern.h libclocale_libcerror.h \
125 libclocale_libcstring.h libclocale_locale.c \
123 libclocale_extern.h libclocale_libcerror.h libclocale_locale.c \
126124 libclocale_locale.h libclocale_support.c libclocale_support.h \
127 libclocale_unused.h
125 libclocale_unused.h libclocale_wide_string.c \
126 libclocale_wide_string.h
128127 @HAVE_LOCAL_LIBCLOCALE_TRUE@am_libclocale_la_OBJECTS = \
129128 @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_codepage.lo \
130129 @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_locale.lo \
131 @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_support.lo
130 @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_support.lo \
131 @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_wide_string.lo
132132 libclocale_la_OBJECTS = $(am_libclocale_la_OBJECTS)
133133 AM_V_lt = $(am__v_lt_@AM_V@)
134134 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
238238 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
239239 HAVE_LIBCPATH = @HAVE_LIBCPATH@
240240 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
241 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
242 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
243241 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
244242 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
245243 HAVE_LIBFDATA = @HAVE_LIBFDATA@
258256 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
259257 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
260258 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
261 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
262 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
263259 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
264260 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
265261 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
306302 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
307303 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
308304 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
309 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
310 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
311 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
312 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
313305 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
314306 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
315307 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
342334 LTLIBICONV = @LTLIBICONV@
343335 LTLIBINTL = @LTLIBINTL@
344336 LTLIBOBJS = @LTLIBOBJS@
337 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
345338 MAKEINFO = @MAKEINFO@
346339 MANIFEST_TOOL = @MANIFEST_TOOL@
347340 MKDIR_P = @MKDIR_P@
448441 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
449442 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
450443 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
451 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
452 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
453 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
454 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
455 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
456 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
457444 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
458445 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
459446 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
522509 libcpath_LIBS = @libcpath_LIBS@
523510 libcsplit_CFLAGS = @libcsplit_CFLAGS@
524511 libcsplit_LIBS = @libcsplit_LIBS@
525 libcstring_CFLAGS = @libcstring_CFLAGS@
526 libcstring_LIBS = @libcstring_LIBS@
527 libcsystem_CFLAGS = @libcsystem_CFLAGS@
528 libcsystem_LIBS = @libcsystem_LIBS@
529512 libcthreads_CFLAGS = @libcthreads_CFLAGS@
530513 libcthreads_LIBS = @libcthreads_LIBS@
531514 libdir = @libdir@
578561 @HAVE_LOCAL_LIBCLOCALE_TRUE@ -DLOCALEDIR=\"$(datadir)/locale\" \
579562 @HAVE_LOCAL_LIBCLOCALE_TRUE@ -I$(top_srcdir)/include \
580563 @HAVE_LOCAL_LIBCLOCALE_TRUE@ -I$(top_srcdir)/common \
581 @HAVE_LOCAL_LIBCLOCALE_TRUE@ @LIBCSTRING_CPPFLAGS@ \
582564 @HAVE_LOCAL_LIBCLOCALE_TRUE@ @LIBCERROR_CPPFLAGS@
583565
584566 @HAVE_LOCAL_LIBCLOCALE_TRUE@noinst_LTLIBRARIES = libclocale.la
587569 @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_definitions.h \
588570 @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_extern.h \
589571 @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_libcerror.h \
590 @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_libcstring.h \
591572 @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_locale.c libclocale_locale.h \
592573 @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_support.c libclocale_support.h \
593 @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_unused.h
574 @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_unused.h \
575 @HAVE_LOCAL_LIBCLOCALE_TRUE@ libclocale_wide_string.c libclocale_wide_string.h
594576
595577 MAINTAINERCLEANFILES = \
596578 Makefile.in
652634 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclocale_codepage.Plo@am__quote@
653635 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclocale_locale.Plo@am__quote@
654636 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclocale_support.Plo@am__quote@
637 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclocale_wide_string.Plo@am__quote@
655638
656639 .c.o:
657640 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
00 /*
11 * Codepage functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
1919 */
2020
2121 #include <common.h>
22 #include <narrow_string.h>
23 #include <wide_string.h>
2224 #include <types.h>
2325
2426 #include "libclocale_codepage.h"
2527 #include "libclocale_definitions.h"
2628 #include "libclocale_libcerror.h"
27 #include "libclocale_libcstring.h"
29 #include "libclocale_wide_string.h"
2830
2931 /* If the codepage is not set strings are formatted using UTF-8
3032 */
185187
186188 if( string_length == 5 )
187189 {
188 if( libcstring_narrow_string_compare_no_case(
190 if( narrow_string_compare_no_case(
189191 string,
190192 "ascii",
191193 5 ) == 0 )
202204 */
203205 if( string_length >= 8 )
204206 {
205 if( libcstring_narrow_string_compare_no_case(
207 if( narrow_string_compare_no_case(
206208 string,
207209 "iso",
208210 3 ) == 0 )
242244 */
243245 if( string_length >= 4 )
244246 {
245 if( libcstring_narrow_string_compare_no_case(
247 if( narrow_string_compare_no_case(
246248 string,
247249 "koi8",
248250 4 ) == 0 )
269271 */
270272 if( string_length >= 7 )
271273 {
272 if( libcstring_narrow_string_compare_no_case(
274 if( narrow_string_compare_no_case(
273275 string,
274276 "windows",
275277 7 ) == 0 )
290292 }
291293 else if( string_length >= 2 )
292294 {
293 if( libcstring_narrow_string_compare_no_case(
295 if( narrow_string_compare_no_case(
294296 string,
295297 "cp",
296298 2 ) == 0 )
299301
300302 codepage_set = LIBCLOCALE_CODEPAGE_SET_GENERIC;
301303 }
302 else if( libcstring_narrow_string_compare_no_case(
304 else if( narrow_string_compare_no_case(
303305 string,
304306 "ms",
305307 2 ) == 0 )
584586
585587 if( string_length == 5 )
586588 {
587 if( libcstring_wide_string_compare_no_case(
589 if( wide_string_compare_no_case(
588590 string,
589591 L"ascii",
590592 5 ) == 0 )
601603 */
602604 if( string_length >= 8 )
603605 {
604 if( libcstring_wide_string_compare_no_case(
606 if( wide_string_compare_no_case(
605607 string,
606608 L"iso",
607609 3 ) == 0 )
641643 */
642644 if( string_length >= 4 )
643645 {
644 if( libcstring_wide_string_compare_no_case(
646 if( wide_string_compare_no_case(
645647 string,
646648 L"koi8",
647649 4 ) == 0 )
668670 */
669671 if( string_length >= 7 )
670672 {
671 if( libcstring_wide_string_compare_no_case(
673 if( wide_string_compare_no_case(
672674 string,
673675 L"windows",
674676 7 ) == 0 )
689691 }
690692 else if( string_length >= 2 )
691693 {
692 if( libcstring_wide_string_compare_no_case(
694 if( wide_string_compare_no_case(
693695 string,
694696 L"cp",
695697 2 ) == 0 )
698700
699701 codepage_set = LIBCLOCALE_CODEPAGE_SET_GENERIC;
700702 }
701 else if( libcstring_wide_string_compare_no_case(
703 else if( wide_string_compare_no_case(
702704 string,
703705 L"ms",
704706 2 ) == 0 )
00 /*
11 * Codepage functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3131 extern "C" {
3232 #endif
3333
34 LIBCLOCALE_EXTERN \
34 #if !defined( __CYGWIN__ )
35 extern int libclocale_codepage;
36 #else
3537 int libclocale_codepage;
38 #endif
3639
3740 LIBCLOCALE_EXTERN \
3841 int libclocale_codepage_get(
00 /*
11 * The internal definitions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3333 */
3434 #else
3535
36 #define LIBCLOCALE_VERSION 20160422
36 #define LIBCLOCALE_VERSION 20170105
3737
3838 /* The libclocale version string
3939 */
40 #define LIBCLOCALE_VERSION_STRING "20160422"
40 #define LIBCLOCALE_VERSION_STRING "20170105"
4141
4242 /* The codepage feature flag definitions
4343 */
00 /*
11 * The internal extern definition
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 #include <libclocale/extern.h>
3838
3939 #else
40 #define LIBCLOCALE_EXTERN extern
40 #define LIBCLOCALE_EXTERN /* extern */
4141
42 #endif
42 #endif /* !defined( HAVE_LOCAL_LIBCLOCALE ) */
4343
44 #endif
44 #endif /* !defined( _LIBCLOCALE_INTERNAL_EXTERN_H ) */
4545
00 /*
11 * The internal libcerror header
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
+0
-51
libclocale/libclocale_libcstring.h less more
0 /*
1 * The internal libcstring header
2 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCLOCALE_LIBCSTRING_H )
22 #define _LIBCLOCALE_LIBCSTRING_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring
27 */
28 #if defined( HAVE_LOCAL_LIBCSTRING )
29
30 #include <libcstring_definitions.h>
31 #include <libcstring_narrow_string.h>
32 #include <libcstring_system_string.h>
33 #include <libcstring_types.h>
34 #include <libcstring_wide_string.h>
35
36 #else
37
38 /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT
39 * before including libcstring.h
40 */
41 #if defined( _WIN32 ) && defined( DLL_IMPORT )
42 #define LIBCSTRING_DLL_IMPORT
43 #endif
44
45 #include <libcstring.h>
46
47 #endif /* defined( HAVE_LOCAL_LIBCSTRING ) */
48
49 #endif /* !defined( _LIBCLOCALE_LIBCSTRING_H ) */
50
00 /*
11 * Locale functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
1919 */
2020
2121 #include <common.h>
22 #include <narrow_string.h>
2223 #include <types.h>
2324
2425 #if defined( __BORLANDC__ ) && __BORLANDC__ <= 0x0520
3738
3839 #include "libclocale_definitions.h"
3940 #include "libclocale_codepage.h"
40 #include "libclocale_libcstring.h"
4141 #include "libclocale_locale.h"
4242
4343 #if defined( WINAPI ) && ( WINVER < 0x0500 )
5656 int result = 0;
5757
5858 library_handle = LoadLibrary(
59 _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) );
59 _SYSTEM_STRING( "kernel32.dll" ) );
6060
6161 if( library_handle == NULL )
6262 {
120120 if( ( charset != NULL )
121121 && ( charset[ 0 ] != 0 ) )
122122 {
123 charset_length = libcstring_narrow_string_length(
123 charset_length = narrow_string_length(
124124 charset );
125125 }
126126 else
169169 {
170170 return( LIBCLOCALE_CODEPAGE_ASCII );
171171 }
172 locale_length = libcstring_narrow_string_length(
172 locale_length = narrow_string_length(
173173 locale );
174174
175 charset = libcstring_narrow_string_search_character(
175 charset = narrow_string_search_character(
176176 locale,
177177 '.',
178178 locale_length + 1 );
193193 {
194194 if( charset_length == 5 )
195195 {
196 if( libcstring_narrow_string_compare(
196 if( narrow_string_compare(
197197 "UTF-8",
198198 charset,
199199 5 ) == 0 )
206206 {
207207 if( charset_length >= 3 )
208208 {
209 if( libcstring_narrow_string_compare(
209 if( narrow_string_compare(
210210 "874",
211211 charset,
212212 3 ) == 0 )
213213 {
214214 *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_874;
215215 }
216 else if( libcstring_narrow_string_compare(
216 else if( narrow_string_compare(
217217 "932",
218218 charset,
219219 3 ) == 0 )
220220 {
221221 *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_932;
222222 }
223 else if( libcstring_narrow_string_compare(
223 else if( narrow_string_compare(
224224 "936",
225225 charset,
226226 3 ) == 0 )
227227 {
228228 *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_936;
229229 }
230 else if( libcstring_narrow_string_compare(
230 else if( narrow_string_compare(
231231 "949",
232232 charset,
233233 3 ) == 0 )
234234 {
235235 *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_949;
236236 }
237 else if( libcstring_narrow_string_compare(
237 else if( narrow_string_compare(
238238 "950",
239239 charset,
240240 3 ) == 0 )
247247 {
248248 if( charset_length >= 4 )
249249 {
250 if( libcstring_narrow_string_compare(
250 if( narrow_string_compare(
251251 "1250",
252252 charset,
253253 4 ) == 0 )
254254 {
255255 *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1250;
256256 }
257 else if( libcstring_narrow_string_compare(
257 else if( narrow_string_compare(
258258 "1251",
259259 charset,
260260 4 ) == 0 )
261261 {
262262 *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1251;
263263 }
264 else if( libcstring_narrow_string_compare(
264 else if( narrow_string_compare(
265265 "1252",
266266 charset,
267267 4 ) == 0 )
268268 {
269269 *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1252;
270270 }
271 else if( libcstring_narrow_string_compare(
271 else if( narrow_string_compare(
272272 "1253",
273273 charset,
274274 4 ) == 0 )
275275 {
276276 *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1253;
277277 }
278 else if( libcstring_narrow_string_compare(
278 else if( narrow_string_compare(
279279 "1254",
280280 charset,
281281 4 ) == 0 )
282282 {
283283 *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1254;
284284 }
285 else if( libcstring_narrow_string_compare(
285 else if( narrow_string_compare(
286286 "1255",
287287 charset,
288288 4 ) == 0 )
289289 {
290290 *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1255;
291291 }
292 else if( libcstring_narrow_string_compare(
292 else if( narrow_string_compare(
293293 "1256",
294294 charset,
295295 4 ) == 0 )
296296 {
297297 *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1256;
298298 }
299 else if( libcstring_narrow_string_compare(
299 else if( narrow_string_compare(
300300 "1257",
301301 charset,
302302 4 ) == 0 )
303303 {
304304 *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1257;
305305 }
306 else if( libcstring_narrow_string_compare(
306 else if( narrow_string_compare(
307307 "1258",
308308 charset,
309309 4 ) == 0 )
310310 {
311311 *codepage = LIBCLOCALE_CODEPAGE_WINDOWS_1258;
312312 }
313 else if( libcstring_narrow_string_compare(
313 else if( narrow_string_compare(
314314 "utf8",
315315 charset,
316316 4 ) == 0 )
00 /*
11 * Locale functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
5252 {
5353 static char *function = "libclocale_initialize";
5454
55 #if !defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
55 #if !defined( HAVE_WIDE_SYSTEM_CHARACTER )
5656 int codepage = 0;
5757 #endif
5858
9393
9494 return( -1 );
9595 }
96 #endif
97 #if !defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
96 #endif /* defined( HAVE_BINDTEXTDOMAIN ) && defined( HAVE_TEXTDOMAIN ) */
97
98 #if !defined( HAVE_WIDE_SYSTEM_CHARACTER )
9899 if( libclocale_locale_get_codepage(
99100 &codepage,
100101 error ) != 1 )
121122
122123 return( -1 );
123124 }
124 #endif
125 #endif /* !defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
126
125127 return( 1 );
126128 }
127129
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal unused definition
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
0 /*
1 * Wide character string functions
2 *
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <types.h>
23
24 #if defined( HAVE_WCTYPE_H )
25 #include <wctype.h>
26 #endif
27
28 #include "libclocale_wide_string.h"
29
30 #if defined( TOWLOWER ) && !defined( HAVE_WCSNCASECMP ) && !defined( HAVE_WCSCASECMP ) && !defined( WINAPI )
31
32 /* Replacement for missing: wcsncasecmp
33 * Compares no more than a specified number of wide characters of string1 and string2,
34 * ignoring case, returning less than, equal to or greater than zero if string1 is
35 * less than, equal to or greater than string.
36 */
37 int libclocale_wide_string_compare_no_case(
38 const wchar_t *string1,
39 const wchar_t *string2,
40 size_t comparision_length )
41 {
42 wint_t character1 = 0;
43 wint_t character2 = 0;
44
45 if( string1 == string2 )
46 {
47 return( 0 );
48 }
49 while( comparision_length > 0 )
50 {
51 character1 = towlower( *string1 );
52 character2 = towlower( *string2 );
53
54 if( ( character1 == 0 )
55 || ( character1 != character2 ) )
56 {
57 return( character1 - character2 );
58 }
59 string1++;
60 string2++;
61
62 comparision_length--;
63 }
64 return( 0 );
65 }
66
67 #endif /* defined( TOWLOWER ) && !defined( HAVE_WCSNCASECMP ) && !defined( HAVE_WCSCASECMP ) && !defined( WINAPI ) */
68
0 /*
1 * Wide character string functions
2 *
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCLOCALE_WIDE_STRING_H )
22 #define _LIBCLOCALE_WIDE_STRING_H
23
24 #include <common.h>
25 #include <wide_string.h>
26 #include <types.h>
27
28 #if defined( __cplusplus )
29 extern "C" {
30 #endif
31
32 #if !defined( wide_string_compare_no_case )
33
34 #define wide_string_compare_no_case( string1, string2, size ) \
35 libclocale_wide_string_compare_no_case( string1, string2, size )
36
37 #endif /* !defined( wide_string_compare_no_case ) */
38
39 #if defined( TOWLOWER ) && !defined( HAVE_WCSNCASECMP ) && !defined( HAVE_WCSCASECMP ) && !defined( WINAPI )
40
41 int libclocale_wide_string_compare_no_case(
42 const wchar_t *string1,
43 const wchar_t *string2,
44 size_t comparision_length );
45
46 #endif /* defined( TOWLOWER ) && !defined( HAVE_WCSNCASECMP ) && !defined( HAVE_WCSCASECMP ) && !defined( WINAPI ) */
47
48 #if defined( __cplusplus )
49 }
50 #endif
51
52 #endif /* !defined( _LIBCLOCALE_WIDE_STRING_H ) */
53
11 AM_CPPFLAGS = \
22 -I$(top_srcdir)/include \
33 -I$(top_srcdir)/common \
4 @LIBCSTRING_CPPFLAGS@ \
54 @LIBCERROR_CPPFLAGS@
65
76 noinst_LTLIBRARIES = libcnotify.la
109 libcnotify_definitions.h \
1110 libcnotify_extern.h \
1211 libcnotify_libcerror.h \
13 libcnotify_libcstring.h \
1412 libcnotify_print.c libcnotify_print.h \
1513 libcnotify_stream.c libcnotify_stream.h \
1614 libcnotify_support.c libcnotify_support.h \
17 libcnotify_types.h \
1815 libcnotify_unused.h \
1916 libcnotify_verbose.c libcnotify_verbose.h
2017 endif
21
2218
2319 MAINTAINERCLEANFILES = \
2420 Makefile.in
9797 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9898 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9999 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101100 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102101 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103102 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
108107 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109108 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110109 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
110 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
111 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
113112 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114113 $(ACLOCAL_M4)
115114 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
120119 LTLIBRARIES = $(noinst_LTLIBRARIES)
121120 libcnotify_la_LIBADD =
122121 am__libcnotify_la_SOURCES_DIST = libcnotify_definitions.h \
123 libcnotify_extern.h libcnotify_libcerror.h \
124 libcnotify_libcstring.h libcnotify_print.c libcnotify_print.h \
125 libcnotify_stream.c libcnotify_stream.h libcnotify_support.c \
126 libcnotify_support.h libcnotify_types.h libcnotify_unused.h \
122 libcnotify_extern.h libcnotify_libcerror.h libcnotify_print.c \
123 libcnotify_print.h libcnotify_stream.c libcnotify_stream.h \
124 libcnotify_support.c libcnotify_support.h libcnotify_unused.h \
127125 libcnotify_verbose.c libcnotify_verbose.h
128126 @HAVE_LOCAL_LIBCNOTIFY_TRUE@am_libcnotify_la_OBJECTS = \
129127 @HAVE_LOCAL_LIBCNOTIFY_TRUE@ libcnotify_print.lo \
239237 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
240238 HAVE_LIBCPATH = @HAVE_LIBCPATH@
241239 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
242 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
243 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
244240 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
245241 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
246242 HAVE_LIBFDATA = @HAVE_LIBFDATA@
259255 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
260256 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
261257 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
262 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
263 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
264258 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
265259 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
266260 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
307301 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
308302 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
309303 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
310 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
311 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
312 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
313 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
314304 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
315305 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
316306 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
343333 LTLIBICONV = @LTLIBICONV@
344334 LTLIBINTL = @LTLIBINTL@
345335 LTLIBOBJS = @LTLIBOBJS@
336 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
346337 MAKEINFO = @MAKEINFO@
347338 MANIFEST_TOOL = @MANIFEST_TOOL@
348339 MKDIR_P = @MKDIR_P@
449440 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
450441 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
451442 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
452 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
453 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
454 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
455 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
456 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
457 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
458443 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
459444 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
460445 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
523508 libcpath_LIBS = @libcpath_LIBS@
524509 libcsplit_CFLAGS = @libcsplit_CFLAGS@
525510 libcsplit_LIBS = @libcsplit_LIBS@
526 libcstring_CFLAGS = @libcstring_CFLAGS@
527 libcstring_LIBS = @libcstring_LIBS@
528 libcsystem_CFLAGS = @libcsystem_CFLAGS@
529 libcsystem_LIBS = @libcsystem_LIBS@
530511 libcthreads_CFLAGS = @libcthreads_CFLAGS@
531512 libcthreads_LIBS = @libcthreads_LIBS@
532513 libdir = @libdir@
578559 @HAVE_LOCAL_LIBCNOTIFY_TRUE@AM_CPPFLAGS = \
579560 @HAVE_LOCAL_LIBCNOTIFY_TRUE@ -I$(top_srcdir)/include \
580561 @HAVE_LOCAL_LIBCNOTIFY_TRUE@ -I$(top_srcdir)/common \
581 @HAVE_LOCAL_LIBCNOTIFY_TRUE@ @LIBCSTRING_CPPFLAGS@ \
582562 @HAVE_LOCAL_LIBCNOTIFY_TRUE@ @LIBCERROR_CPPFLAGS@
583563
584564 @HAVE_LOCAL_LIBCNOTIFY_TRUE@noinst_LTLIBRARIES = libcnotify.la
586566 @HAVE_LOCAL_LIBCNOTIFY_TRUE@ libcnotify_definitions.h \
587567 @HAVE_LOCAL_LIBCNOTIFY_TRUE@ libcnotify_extern.h \
588568 @HAVE_LOCAL_LIBCNOTIFY_TRUE@ libcnotify_libcerror.h \
589 @HAVE_LOCAL_LIBCNOTIFY_TRUE@ libcnotify_libcstring.h \
590569 @HAVE_LOCAL_LIBCNOTIFY_TRUE@ libcnotify_print.c libcnotify_print.h \
591570 @HAVE_LOCAL_LIBCNOTIFY_TRUE@ libcnotify_stream.c libcnotify_stream.h \
592571 @HAVE_LOCAL_LIBCNOTIFY_TRUE@ libcnotify_support.c libcnotify_support.h \
593 @HAVE_LOCAL_LIBCNOTIFY_TRUE@ libcnotify_types.h \
594572 @HAVE_LOCAL_LIBCNOTIFY_TRUE@ libcnotify_unused.h \
595573 @HAVE_LOCAL_LIBCNOTIFY_TRUE@ libcnotify_verbose.c libcnotify_verbose.h
596574
00 /*
11 * The internal definitions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3434 */
3535 #else
3636
37 #define LIBCNOTIFY_VERSION 20160422
37 #define LIBCNOTIFY_VERSION 20170107
3838
39 /* The libcstring version string
39 /* The libcnotify version string
4040 */
41 #define LIBCNOTIFY_VERSION_STRING "20160422"
41 #define LIBCNOTIFY_VERSION_STRING "20170107"
4242
4343 /* The print data flags
4444 */
00 /*
11 * The internal extern definition
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 #include <libcnotify/extern.h>
3838
3939 #else
40 #define LIBCNOTIFY_EXTERN extern
40 #define LIBCNOTIFY_EXTERN /* extern */
4141
42 #endif
42 #endif /* !defined( HAVE_LOCAL_LIBCNOTIFY ) */
4343
44 #endif
44 #endif /* !defined( _LIBCNOTIFY_INTERNAL_EXTERN_H ) */
4545
00 /*
11 * The internal libcerror header
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
+0
-51
libcnotify/libcnotify_libcstring.h less more
0 /*
1 * The internal libcstring header
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCNOTIFY_LIBCSTRING_H )
22 #define _LIBCNOTIFY_LIBCSTRING_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring
27 */
28 #if defined( HAVE_LOCAL_LIBCSTRING )
29
30 #include <libcstring_definitions.h>
31 #include <libcstring_narrow_string.h>
32 #include <libcstring_system_string.h>
33 #include <libcstring_types.h>
34 #include <libcstring_wide_string.h>
35
36 #else
37
38 /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT
39 * before including libcstring.h
40 */
41 #if defined( _WIN32 ) && defined( DLL_IMPORT )
42 #define LIBCSTRING_DLL_IMPORT
43 #endif
44
45 #include <libcstring.h>
46
47 #endif /* defined( HAVE_LOCAL_LIBCSTRING ) */
48
49 #endif /* !defined( _LIBCNOTIFY_LIBCSTRING_H ) */
50
00 /*
11 * Notification print functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
124124
125125 if( libcnotify_stream == NULL )
126126 {
127 return( -1 );
127 return( 0 );
128128 }
129129 if( data == NULL )
130130 {
310310 int libcnotify_print_error_backtrace(
311311 libcerror_error_t *error )
312312 {
313 int print_count = 0;
314
313315 if( libcnotify_stream == NULL )
314316 {
315 return( -1 );
316 }
317 if( libcerror_error_backtrace_fprint(
318 error,
319 libcnotify_stream ) != 1 )
320 {
321 return( -1 );
322 }
323 return( 1 );
317 return( 0 );
318 }
319 print_count = libcerror_error_backtrace_fprint(
320 error,
321 libcnotify_stream );
322
323 return( print_count );
324324 }
325325
00 /*
11 * Notification print functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
5050 }
5151 #endif
5252
53 #endif
53 #endif /* !defined( _LIBCNOTIFY_PRINT_H ) */
5454
00 /*
11 * Notification stream functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Notification stream functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
5151 }
5252 #endif
5353
54 #endif
54 #endif /* !defined( _LIBCNOTIFY_STREAM_H ) */
5555
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4444 }
4545 #endif
4646
47 #endif
47 #endif /* !defined( _LIBCNOTIFY_SUPPORT_H ) */
4848
+0
-50
libcnotify/libcnotify_types.h less more
0 /*
1 * The internal type definitions
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCNOTIFY_INTERNAL_TYPES_H )
22 #define _LIBCNOTIFY_INTERNAL_TYPES_H
23
24 #include <common.h>
25 #include <types.h>
26
27 /* Define HAVE_LOCAL_LIBCNOTIFY for local use of libcnotify
28 * The definitions in <libcnotify/types.h> are copied here
29 * for local use of libcnotify
30 */
31 #if defined( HAVE_LOCAL_LIBCNOTIFY )
32
33 /* The following type definitions hide internal data structures
34 */
35
36 /* No types
37 #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI )
38 typedef struct libcnotify_dummy {} libcnotify_dummy_t;
39
40 #else
41 typedef intptr_t libcnotify_dummy_t;
42
43 #endif
44 */
45
46 #endif /* defined( HAVE_LOCAL_LIBCNOTIFY ) */
47
48 #endif /* !defined( _LIBCNOTIFY_INTERNAL_TYPES_H ) */
49
00 /*
11 * The internal unused definition
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Verbose functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Verbose functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3030 extern "C" {
3131 #endif
3232
33 LIBCNOTIFY_EXTERN \
33 #if !defined( __CYGWIN__ )
34 extern int libcnotify_verbose;
35 #else
3436 int libcnotify_verbose;
37 #endif
3538
3639 LIBCNOTIFY_EXTERN \
3740 void libcnotify_verbose_set(
4144 }
4245 #endif
4346
44 #endif
47 #endif /* !defined( _LIBCNOTIFY_VERBOSE_H ) */
4548
11 AM_CPPFLAGS = \
22 -I$(top_srcdir)/include \
33 -I$(top_srcdir)/common \
4 @LIBCSTRING_CPPFLAGS@ \
54 @LIBCERROR_CPPFLAGS@ \
65 @LIBCLOCALE_CPPFLAGS@ \
76 @LIBCSPLIT_CPPFLAGS@ \
1716 libcpath_libcerror.h \
1817 libcpath_libclocale.h \
1918 libcpath_libcsplit.h \
20 libcpath_libcstring.h \
2119 libcpath_libuna.h \
2220 libcpath_support.c libcpath_support.h \
21 libcpath_system_string.c libcpath_system_string.h \
2322 libcpath_unused.h
2423 endif
25
2624
2725 MAINTAINERCLEANFILES = \
2826 Makefile.in
9797 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9898 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9999 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101100 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102101 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103102 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
108107 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109108 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110109 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
110 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
111 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
113112 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114113 $(ACLOCAL_M4)
115114 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
122121 am__libcpath_la_SOURCES_DIST = libcpath_definitions.h libcpath_error.c \
123122 libcpath_error.h libcpath_extern.h libcpath_path.c \
124123 libcpath_path.h libcpath_libcerror.h libcpath_libclocale.h \
125 libcpath_libcsplit.h libcpath_libcstring.h libcpath_libuna.h \
126 libcpath_support.c libcpath_support.h libcpath_unused.h
124 libcpath_libcsplit.h libcpath_libuna.h libcpath_support.c \
125 libcpath_support.h libcpath_system_string.c \
126 libcpath_system_string.h libcpath_unused.h
127127 @HAVE_LOCAL_LIBCPATH_TRUE@am_libcpath_la_OBJECTS = libcpath_error.lo \
128 @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_path.lo libcpath_support.lo
128 @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_path.lo libcpath_support.lo \
129 @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_system_string.lo
129130 libcpath_la_OBJECTS = $(am_libcpath_la_OBJECTS)
130131 AM_V_lt = $(am__v_lt_@AM_V@)
131132 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
235236 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
236237 HAVE_LIBCPATH = @HAVE_LIBCPATH@
237238 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
238 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
239 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
240239 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
241240 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
242241 HAVE_LIBFDATA = @HAVE_LIBFDATA@
255254 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
256255 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
257256 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
258 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
259 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
260257 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
261258 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
262259 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
303300 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
304301 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
305302 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
306 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
307 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
308 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
309 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
310303 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
311304 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
312305 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
339332 LTLIBICONV = @LTLIBICONV@
340333 LTLIBINTL = @LTLIBINTL@
341334 LTLIBOBJS = @LTLIBOBJS@
335 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
342336 MAKEINFO = @MAKEINFO@
343337 MANIFEST_TOOL = @MANIFEST_TOOL@
344338 MKDIR_P = @MKDIR_P@
445439 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
446440 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
447441 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
448 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
449 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
450 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
451 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
452 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
453 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
454442 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
455443 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
456444 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
519507 libcpath_LIBS = @libcpath_LIBS@
520508 libcsplit_CFLAGS = @libcsplit_CFLAGS@
521509 libcsplit_LIBS = @libcsplit_LIBS@
522 libcstring_CFLAGS = @libcstring_CFLAGS@
523 libcstring_LIBS = @libcstring_LIBS@
524 libcsystem_CFLAGS = @libcsystem_CFLAGS@
525 libcsystem_LIBS = @libcsystem_LIBS@
526510 libcthreads_CFLAGS = @libcthreads_CFLAGS@
527511 libcthreads_LIBS = @libcthreads_LIBS@
528512 libdir = @libdir@
574558 @HAVE_LOCAL_LIBCPATH_TRUE@AM_CPPFLAGS = \
575559 @HAVE_LOCAL_LIBCPATH_TRUE@ -I$(top_srcdir)/include \
576560 @HAVE_LOCAL_LIBCPATH_TRUE@ -I$(top_srcdir)/common \
577 @HAVE_LOCAL_LIBCPATH_TRUE@ @LIBCSTRING_CPPFLAGS@ \
578561 @HAVE_LOCAL_LIBCPATH_TRUE@ @LIBCERROR_CPPFLAGS@ \
579562 @HAVE_LOCAL_LIBCPATH_TRUE@ @LIBCLOCALE_CPPFLAGS@ \
580563 @HAVE_LOCAL_LIBCPATH_TRUE@ @LIBCSPLIT_CPPFLAGS@ \
589572 @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_libcerror.h \
590573 @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_libclocale.h \
591574 @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_libcsplit.h \
592 @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_libcstring.h \
593575 @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_libuna.h \
594576 @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_support.c libcpath_support.h \
577 @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_system_string.c libcpath_system_string.h \
595578 @HAVE_LOCAL_LIBCPATH_TRUE@ libcpath_unused.h
596579
597580 MAINTAINERCLEANFILES = \
654637 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcpath_error.Plo@am__quote@
655638 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcpath_path.Plo@am__quote@
656639 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcpath_support.Plo@am__quote@
640 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcpath_system_string.Plo@am__quote@
657641
658642 .c.o:
659643 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
00 /*
11 * The internal definitions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3434 */
3535 #else
3636
37 #define LIBCPATH_VERSION 20160425
37 #define LIBCPATH_VERSION 20170108
3838
39 /* The libcstring version string
39 /* The libcpath version string
4040 */
41 #define LIBCPATH_VERSION_STRING "20160425"
41 #define LIBCPATH_VERSION_STRING "20170108"
4242
4343 #if defined( WINAPI )
4444 #define LIBCPATH_SEPARATOR '\\'
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4343 libcpath_error_t *error,
4444 FILE *stream )
4545 {
46 return( libcerror_error_fprint(
47 (libcerror_error_t *) error,
48 stream ) );
46 int print_count = 0;
47
48 print_count = libcerror_error_fprint(
49 (libcerror_error_t *) error,
50 stream );
51
52 return( print_count );
4953 }
5054
5155 /* Prints a descriptive string of the error to the string
5761 char *string,
5862 size_t size )
5963 {
60 return( libcerror_error_sprint(
61 (libcerror_error_t *) error,
62 string,
63 size ) );
64 int print_count = 0;
65
66 print_count = libcerror_error_sprint(
67 (libcerror_error_t *) error,
68 string,
69 size );
70
71 return( print_count );
6472 }
6573
6674 /* Prints a backtrace of the error to the stream
7078 libcpath_error_t *error,
7179 FILE *stream )
7280 {
73 return( libcerror_error_backtrace_fprint(
74 (libcerror_error_t *) error,
75 stream ) );
81 int print_count = 0;
82
83 print_count = libcerror_error_backtrace_fprint(
84 (libcerror_error_t *) error,
85 stream );
86
87 return( print_count );
7688 }
7789
7890 /* Prints a backtrace of the error to the string
8496 char *string,
8597 size_t size )
8698 {
87 return( libcerror_error_backtrace_sprint(
88 (libcerror_error_t *) error,
89 string,
90 size ) );
99 int print_count = 0;
100
101 print_count = libcerror_error_backtrace_sprint(
102 (libcerror_error_t *) error,
103 string,
104 size );
105
106 return( print_count );
91107 }
92108
93109 #endif /* !defined( HAVE_LOCAL_LIBCPATH ) */
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal extern definition
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 #include <libcpath/extern.h>
3838
3939 #else
40 #define LIBCPATH_EXTERN /* extern */
4041
41 #define LIBCPATH_EXTERN extern
42 #endif /* !defined( HAVE_LOCAL_LIBCPATH ) */
4243
43 #endif
44 #endif /* !defined( _LIBCPATH_INTERNAL_EXTERN_H ) */
4445
45 #endif
46
00 /*
11 * The internal libcerror header
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal libclocale header
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal libcsplit header
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
+0
-51
libcpath/libcpath_libcstring.h less more
0 /*
1 * The internal libcstring header
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCPATH_LIBCSTRING_H )
22 #define _LIBCPATH_LIBCSTRING_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring
27 */
28 #if defined( HAVE_LOCAL_LIBCSTRING )
29
30 #include <libcstring_definitions.h>
31 #include <libcstring_narrow_string.h>
32 #include <libcstring_system_string.h>
33 #include <libcstring_types.h>
34 #include <libcstring_wide_string.h>
35
36 #else
37
38 /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT
39 * before including libcstring.h
40 */
41 #if defined( _WIN32 ) && defined( DLL_IMPORT )
42 #define LIBCSTRING_DLL_IMPORT
43 #endif
44
45 #include <libcstring.h>
46
47 #endif /* defined( HAVE_LOCAL_LIBCSTRING ) */
48
49 #endif /* !defined( _LIBCPATH_LIBCSTRING_H ) */
50
00 /*
11 * The libuna header wrapper
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * This software is free software: you can redistribute it and/or modify
66 * it under the terms of the GNU Lesser General Public License as published by
00 /*
11 * Path functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2020
2121 #include <common.h>
2222 #include <memory.h>
23 #include <narrow_string.h>
2324 #include <types.h>
25 #include <wide_string.h>
2426
2527 #if defined( HAVE_ERRNO_H )
2628 #include <errno.h>
3638
3739 #include "libcpath_definitions.h"
3840 #include "libcpath_libcerror.h"
39 #include "libcpath_libclocale.h"
4041 #include "libcpath_libcsplit.h"
41 #include "libcpath_libcstring.h"
42 #include "libcpath_libuna.h"
4342 #include "libcpath_path.h"
43 #include "libcpath_system_string.h"
4444
4545 #if defined( WINAPI )
4646 enum LIBCPATH_TYPES
5959 LIBCPATH_TYPE_RELATIVE
6060 };
6161
62 #endif
62 #endif /* defined( WINAPI ) */
6363
6464 #if defined( WINAPI ) && ( WINVER <= 0x0500 )
6565
7878 return( FALSE );
7979 }
8080 library_handle = LoadLibrary(
81 _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) );
81 _SYSTEM_STRING( "kernel32.dll" ) );
8282
8383 if( library_handle == NULL )
8484 {
123123 return( FALSE );
124124 }
125125 library_handle = LoadLibrary(
126 _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) );
126 _SYSTEM_STRING( "kernel32.dll" ) );
127127
128128 if( library_handle == NULL )
129129 {
263263 return( 0 );
264264 }
265265 library_handle = LoadLibrary(
266 _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) );
266 _SYSTEM_STRING( "kernel32.dll" ) );
267267
268268 if( library_handle == NULL )
269269 {
372372 }
373373 *current_working_directory_size = (size_t) safe_current_working_directory_size;
374374
375 *current_working_directory = libcstring_narrow_string_allocate(
375 *current_working_directory = narrow_string_allocate(
376376 *current_working_directory_size );
377377
378378 if( *current_working_directory == NULL )
485485 }
486486 *current_working_directory_size = (size_t) PATH_MAX;
487487
488 *current_working_directory = libcstring_narrow_string_allocate(
488 *current_working_directory = narrow_string_allocate(
489489 *current_working_directory_size );
490490
491491 if( *current_working_directory == NULL )
547547 #endif
548548
549549 #if defined( WINAPI )
550
551 /* Determines the volume name and path type
552 * Returns 1 if succesful or -1 on error
553 */
554 int libcpath_path_get_volume_name_and_path_type(
555 const char *path,
556 size_t path_length,
557 char **volume_name,
558 size_t *volume_name_length,
559 size_t *directory_name_index,
560 uint8_t *path_type,
561 libcerror_error_t **error )
562 {
563 static char *function = "libcpath_path_get_volume_name_and_path_type";
564 size_t path_index = 0;
565 size_t share_name_index = 0;
566
567 if( path == NULL )
568 {
569 libcerror_error_set(
570 error,
571 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
572 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
573 "%s: invalid path.",
574 function );
575
576 return( -1 );
577 }
578 if( path_length > (size_t) ( SSIZE_MAX - 1 ) )
579 {
580 libcerror_error_set(
581 error,
582 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
583 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
584 "%s: invalid path length value exceeds maximum.",
585 function );
586
587 return( -1 );
588 }
589 if( volume_name == NULL )
590 {
591 libcerror_error_set(
592 error,
593 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
594 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
595 "%s: invalid volume name.",
596 function );
597
598 return( -1 );
599 }
600 if( volume_name_length == NULL )
601 {
602 libcerror_error_set(
603 error,
604 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
605 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
606 "%s: invalid volume name length.",
607 function );
608
609 return( -1 );
610 }
611 if( directory_name_index == NULL )
612 {
613 libcerror_error_set(
614 error,
615 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
616 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
617 "%s: invalid directory name index.",
618 function );
619
620 return( -1 );
621 }
622 if( path_type == NULL )
623 {
624 libcerror_error_set(
625 error,
626 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
627 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
628 "%s: invalid path type.",
629 function );
630
631 return( -1 );
632 }
633 if( ( path_length == 2 )
634 && ( path[ 1 ] == '\\' ) )
635 {
636 *path_type = LIBCPATH_TYPE_ABSOLUTE;
637 }
638 else if( path_length >= 2 )
639 {
640 /* Check if the path starts with a volume letter
641 */
642 if( ( path[ 1 ] == ':' )
643 && ( ( ( path[ 0 ] >= 'A' )
644 && ( path[ 0 ] <= 'Z' ) )
645 || ( ( path[ 0 ] >= 'a' )
646 && ( path[ 0 ] <= 'z' ) ) ) )
647 {
648 *volume_name = (char *) path;
649 *volume_name_length = 2;
650 *directory_name_index = 2;
651
652 if( ( path_length >= 3 )
653 && ( path[ 2 ] == '\\' ) )
654 {
655 *path_type = LIBCPATH_TYPE_ABSOLUTE;
656 *directory_name_index += 1;
657 }
658 }
659 /* Check for special paths
660 * paths with prefix: \\
661 */
662 else if( ( path[ 0 ] == '\\' )
663 && ( path[ 1 ] == '\\' ) )
664 {
665 /* Determine if the path is a special path
666 * device path prefix: \\.\
667 * extended-length path prefix: \\?\
668 */
669 if( ( path_length >= 4 )
670 && ( ( path[ 2 ] == '.' )
671 || ( path[ 2 ] == '?' ) )
672 && ( path[ 3 ] == '\\' ) )
673 {
674 if( path[ 2 ] == '.' )
675 {
676 *path_type = LIBCPATH_TYPE_DEVICE;
677 }
678 else
679 {
680 *path_type = LIBCPATH_TYPE_EXTENDED_LENGTH;
681 }
682 *directory_name_index = 4;
683 }
684 else
685 {
686 /* Determine the volume in an UNC path
687 * \\server\share
688 */
689 for( share_name_index = 2;
690 share_name_index <= path_length;
691 share_name_index++ )
692 {
693 if( path[ share_name_index ] == '\\' )
694 {
695 break;
696 }
697 }
698 if( share_name_index > path_length )
699 {
700 libcerror_error_set(
701 error,
702 LIBCERROR_ERROR_DOMAIN_RUNTIME,
703 LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,
704 "%s: invalid path - missing share name.",
705 function );
706
707 return( -1 );
708 }
709 for( path_index = share_name_index + 1;
710 path_index <= path_length;
711 path_index++ )
712 {
713 if( path[ path_index ] == '\\' )
714 {
715 break;
716 }
717 }
718 *path_type = LIBCPATH_TYPE_UNC;
719 *volume_name = (char *) &( path[ 2 ] );
720 *volume_name_length = path_index - 2;
721 *directory_name_index = path_index;
722 }
723 }
724 /* Check for absolue paths
725 */
726 else if( path[ 0 ] == (wchar_t) '\\' )
727 {
728 *path_type = LIBCPATH_TYPE_ABSOLUTE;
729 }
730 }
731 return( 1 );
732 }
733
734 /* Retrieves the current working directory of a specific volume
735 * Returns 1 if successful or -1 on error
736 */
737 int libcpath_path_get_current_working_directory_by_volume(
738 char *volume_name,
739 size_t volume_name_length,
740 char **current_working_directory,
741 size_t *current_working_directory_size,
742 libcerror_error_t **error )
743 {
744 char *change_volume_name = NULL;
745 char *current_volume_working_directory = NULL;
746 static char *function = "libcpath_path_get_current_working_directory_by_volume";
747 size_t current_volume_working_directory_size = 0;
748 int result = 1;
749
750 if( current_working_directory == NULL )
751 {
752 libcerror_error_set(
753 error,
754 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
755 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
756 "%s: invalid current working directory.",
757 function );
758
759 return( -1 );
760 }
761 if( current_working_directory_size == NULL )
762 {
763 libcerror_error_set(
764 error,
765 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
766 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
767 "%s: invalid current working directory size.",
768 function );
769
770 return( -1 );
771 }
772 /* If the path contains a volume name switch to that
773 * volume to determine the current directory
774 */
775 if( volume_name != NULL )
776 {
777 if( libcpath_path_get_current_working_directory(
778 &current_volume_working_directory,
779 &current_volume_working_directory_size,
780 error ) != 1 )
781 {
782 libcerror_error_set(
783 error,
784 LIBCERROR_ERROR_DOMAIN_RUNTIME,
785 LIBCERROR_RUNTIME_ERROR_GET_FAILED,
786 "%s: unable to retrieve current volume working directory.",
787 function );
788
789 goto on_error;
790 }
791 change_volume_name = narrow_string_allocate(
792 volume_name_length + 1 );
793
794 if( change_volume_name == NULL )
795 {
796 libcerror_error_set(
797 error,
798 LIBCERROR_ERROR_DOMAIN_MEMORY,
799 LIBCERROR_MEMORY_ERROR_INSUFFICIENT,
800 "%s: unable to create change volume name.",
801 function );
802
803 goto on_error;
804 }
805 if( narrow_string_copy(
806 change_volume_name,
807 volume_name,
808 volume_name_length ) == NULL )
809 {
810 libcerror_error_set(
811 error,
812 LIBCERROR_ERROR_DOMAIN_MEMORY,
813 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
814 "%s: unable to set change volume name.",
815 function );
816
817 goto on_error;
818 }
819 change_volume_name[ volume_name_length ] = 0;
820
821 if( libcpath_path_change_directory(
822 change_volume_name,
823 error ) != 1 )
824 {
825 libcerror_error_set(
826 error,
827 LIBCERROR_ERROR_DOMAIN_RUNTIME,
828 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
829 "%s: unable to change current working directory.",
830 function );
831
832 goto on_error;
833 }
834 memory_free(
835 change_volume_name );
836
837 change_volume_name = NULL;
838 }
839 if( libcpath_path_get_current_working_directory(
840 current_working_directory,
841 current_working_directory_size,
842 error ) != 1 )
843 {
844 libcerror_error_set(
845 error,
846 LIBCERROR_ERROR_DOMAIN_RUNTIME,
847 LIBCERROR_RUNTIME_ERROR_GET_FAILED,
848 "%s: unable to retrieve current directory.",
849 function );
850
851 /* Make sure the current working directory has been changed
852 * back to its original value
853 */
854 result = -1;
855 }
856 if( current_volume_working_directory != NULL )
857 {
858 if( libcpath_path_change_directory(
859 current_volume_working_directory,
860 error ) != 1 )
861 {
862 libcerror_error_set(
863 error,
864 LIBCERROR_ERROR_DOMAIN_RUNTIME,
865 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
866 "%s: unable to change current working directory.",
867 function );
868
869 goto on_error;
870 }
871 memory_free(
872 current_volume_working_directory );
873
874 current_volume_working_directory = NULL;
875 }
876 return( result );
877
878 on_error:
879 if( change_volume_name != NULL )
880 {
881 memory_free(
882 change_volume_name );
883 }
884 if( current_volume_working_directory != NULL )
885 {
886 memory_free(
887 current_volume_working_directory );
888 }
889 if( *current_working_directory != NULL )
890 {
891 memory_free(
892 *current_working_directory );
893
894 *current_working_directory = NULL;
895 }
896 *current_working_directory_size = 0;
897
898 return( -1 );
899 }
900
901 /* Determines the volume name
902 * Returns 1 if succesful or -1 on error
903 */
904 int libcpath_path_get_volume_name(
905 const char *path,
906 size_t path_size,
907 char **volume_name,
908 size_t *volume_name_length,
909 size_t *directory_name_index,
910 libcerror_error_t **error )
911 {
912 static char *function = "libcpath_path_get_volume_name";
913 size_t path_index = 0;
914 size_t share_name_index = 0;
915
916 if( path == NULL )
917 {
918 libcerror_error_set(
919 error,
920 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
921 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
922 "%s: invalid path.",
923 function );
924
925 return( -1 );
926 }
927 if( path_size > (size_t) SSIZE_MAX )
928 {
929 libcerror_error_set(
930 error,
931 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
932 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
933 "%s: invalid path size value exceeds maximum.",
934 function );
935
936 return( -1 );
937 }
938 if( volume_name == NULL )
939 {
940 libcerror_error_set(
941 error,
942 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
943 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
944 "%s: invalid volume name.",
945 function );
946
947 return( -1 );
948 }
949 if( volume_name_length == NULL )
950 {
951 libcerror_error_set(
952 error,
953 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
954 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
955 "%s: invalid volume name length.",
956 function );
957
958 return( -1 );
959 }
960 if( directory_name_index == NULL )
961 {
962 libcerror_error_set(
963 error,
964 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
965 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
966 "%s: invalid directory name index.",
967 function );
968
969 return( -1 );
970 }
971 /* TODO clean up code */
972 if( path_size >= 3 )
973 {
974 if( path == NULL )
975 {
976 libcerror_error_set(
977 error,
978 LIBCERROR_ERROR_DOMAIN_RUNTIME,
979 LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,
980 "%s: missing path.",
981 function );
982
983 return( -1 );
984 }
985 /* Check if the path starts with a volume letter
986 */
987 if( ( path[ 1 ] == ':' )
988 && ( ( ( path[ 0 ] >= 'A' )
989 && ( path[ 0 ] <= 'Z' ) )
990 || ( ( path[ 0 ] >= 'a' )
991 && ( path[ 0 ] <= 'z' ) ) ) )
992 {
993 if( *volume_name == NULL )
994 {
995 *volume_name = (char *) path;
996 *volume_name_length = 2;
997 }
998 path_index = 2;
999
1000 if( path[ 2 ] == '\\' )
1001 {
1002 path_index++;
1003 }
1004 *directory_name_index = path_index;
1005 }
1006 /* Check for special paths
1007 * paths with prefix: \\
1008 */
1009 else if( ( path[ 0 ] == '\\' )
1010 && ( path[ 1 ] == '\\' ) )
1011 {
1012 /* Ignore the following special paths
1013 * device path prefix: \\.\
1014 */
1015 if( ( path_size >= 4 )
1016 && ( path[ 2 ] == '.' )
1017 && ( path[ 3 ] == '\\' ) )
1018 {
1019 libcerror_error_set(
1020 error,
1021 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
1022 LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,
1023 "%s: unsupported path.",
1024 function );
1025
1026 return( -1 );
1027 }
1028 else
1029 {
1030 /* Determine the volume in an UNC path
1031 * \\server\share
1032 */
1033 for( share_name_index = 2;
1034 share_name_index < path_size;
1035 share_name_index++ )
1036 {
1037 if( path[ share_name_index ] == '\\' )
1038 {
1039 break;
1040 }
1041 }
1042 if( share_name_index >= path_size )
1043 {
1044 libcerror_error_set(
1045 error,
1046 LIBCERROR_ERROR_DOMAIN_RUNTIME,
1047 LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,
1048 "%s: invalid path - missing share name.",
1049 function );
1050
1051 return( -1 );
1052 }
1053 for( path_index = share_name_index + 1;
1054 path_index < path_size;
1055 path_index++ )
1056 {
1057 if( path[ path_index ] == '\\' )
1058 {
1059 break;
1060 }
1061 }
1062 if( *volume_name == NULL )
1063 {
1064 *volume_name = (char *) &( path[ 2 ] );
1065
1066 if( path_index == path_size )
1067 {
1068 *volume_name_length = path_index - 3;
1069 }
1070 else
1071 {
1072 *volume_name_length = path_index - 2;
1073 }
1074 }
1075 *directory_name_index = path_index;
1076 }
1077 }
1078 }
1079 return( 1 );
1080 }
5501081
5511082 /* Determines the full path of the Windows path specified
5521083 * The function uses the extended-length path format
5841115 {
5851116 libcsplit_narrow_split_string_t *current_directory_split_string = NULL;
5861117 libcsplit_narrow_split_string_t *path_split_string = NULL;
587 char *change_volume_name = NULL;
588 char *current_working_directory = NULL;
5891118 char *current_directory = NULL;
5901119 char *current_directory_string_segment = NULL;
5911120 char *full_path_prefix = NULL;
5921121 char *last_used_path_string_segment = NULL;
5931122 char *path_string_segment = NULL;
594 const char *volume_name = NULL;
1123 char *volume_name = NULL;
5951124 static char *function = "libcpath_path_get_full_path";
1125 size_t current_directory_length = 0;
5961126 size_t current_directory_name_index = 0;
5971127 size_t current_directory_size = 0;
5981128 size_t current_directory_string_segment_size = 0;
599 size_t current_working_directory_size = 0;
6001129 size_t full_path_index = 0;
6011130 size_t full_path_prefix_length = 0;
6021131 size_t last_used_path_string_segment_size = 0;
6031132 size_t path_directory_name_index = 0;
6041133 size_t path_string_segment_size = 0;
1134 size_t safe_full_path_size = 0;
6051135 size_t share_name_index = 0;
6061136 size_t volume_name_length = 0;
6071137 uint8_t path_type = LIBCPATH_TYPE_RELATIVE;
6081138 int current_directory_number_of_segments = 0;
6091139 int current_directory_segment_index = 0;
610 int error_abort = 0;
6111140 int last_used_path_segment_index = -1;
6121141 int path_number_of_segments = 0;
6131142 int path_segment_index = 0;
6341163
6351164 return( -1 );
6361165 }
637 if( path_length >= (size_t) SSIZE_MAX )
1166 if( path_length > (size_t) ( SSIZE_MAX - 1 ) )
6381167 {
6391168 libcerror_error_set(
6401169 error,
6781207
6791208 return( -1 );
6801209 }
681 if( ( path_length == 2 )
682 && ( path[ 1 ] == '\\' ) )
683 {
684 path_type = LIBCPATH_TYPE_ABSOLUTE;
685 }
686 else if( path_length >= 2 )
687 {
688 /* Check if the path starts with a volume letter
689 */
690 if( ( path[ 1 ] == ':' )
691 && ( ( ( path[ 0 ] >= 'A' )
692 && ( path[ 0 ] <= 'Z' ) )
693 || ( ( path[ 0 ] >= 'a' )
694 && ( path[ 0 ] <= 'z' ) ) ) )
695 {
696 volume_name = &( path[ 0 ] );
697 volume_name_length = 2;
698 path_directory_name_index = 2;
699
700 if( ( path_length >= 3 )
701 && ( path[ 2 ] == '\\' ) )
702 {
703 path_type = LIBCPATH_TYPE_ABSOLUTE;
704 path_directory_name_index += 1;
705 }
706 }
707 /* Check for special paths
708 * paths with prefix: \\
709 */
710 else if( ( path[ 0 ] == '\\' )
711 && ( path[ 1 ] == '\\' ) )
712 {
713 /* Determine if the path is a special path
714 * device path prefix: \\.\
715 * extended-length path prefix: \\?\
716 */
717 if( ( path_length >= 4 )
718 && ( ( path[ 2 ] == '.' )
719 || ( path[ 2 ] == '?' ) )
720 && ( path[ 3 ] == '\\' ) )
721 {
722 if( path[ 2 ] == '.' )
723 {
724 path_type = LIBCPATH_TYPE_DEVICE;
725 }
726 else
727 {
728 path_type = LIBCPATH_TYPE_EXTENDED_LENGTH;
729 }
730 path_directory_name_index = 4;
731 }
732 else
733 {
734 /* Determine the volume in an UNC path
735 * \\server\share
736 */
737 for( share_name_index = 2;
738 share_name_index <= path_length;
739 share_name_index++ )
740 {
741 if( path[ share_name_index ] == '\\' )
742 {
743 break;
744 }
745 }
746 if( share_name_index > path_length )
747 {
748 libcerror_error_set(
749 error,
750 LIBCERROR_ERROR_DOMAIN_RUNTIME,
751 LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,
752 "%s: invalid path - missing share name.",
753 function );
754
755 goto on_error;
756 }
757 for( path_directory_name_index = share_name_index + 1;
758 path_directory_name_index <= path_length;
759 path_directory_name_index++ )
760 {
761 if( path[ path_directory_name_index ] == '\\' )
762 {
763 break;
764 }
765 }
766 path_type = LIBCPATH_TYPE_UNC;
767 volume_name = &( path[ 2 ] );
768 volume_name_length = path_directory_name_index - 2;
769 }
770 }
771 /* Check for absolue paths
772 */
773 else if( path[ 0 ] == (wchar_t) '\\' )
774 {
775 path_type = LIBCPATH_TYPE_ABSOLUTE;
776 }
1210 if( libcpath_path_get_volume_name_and_path_type(
1211 path,
1212 path_length,
1213 &volume_name,
1214 &volume_name_length,
1215 &path_directory_name_index,
1216 &path_type,
1217 error ) != 1 )
1218 {
1219 libcerror_error_set(
1220 error,
1221 LIBCERROR_ERROR_DOMAIN_RUNTIME,
1222 LIBCERROR_RUNTIME_ERROR_GET_FAILED,
1223 "%s: unable to determine volume name and path type.",
1224 function );
1225
1226 goto on_error;
7771227 }
7781228 /* If the path is a device path, an extended-length path or an UNC
7791229 * do not bother to lookup the current directory
7821232 && ( path_type != LIBCPATH_TYPE_EXTENDED_LENGTH )
7831233 && ( path_type != LIBCPATH_TYPE_UNC ) )
7841234 {
785 /* If the path contains a volume name switch to that
786 * volume to determine the current directory
787 */
788 if( volume_name != NULL )
789 {
790 if( libcpath_path_get_current_working_directory(
791 &current_working_directory,
792 &current_working_directory_size,
793 error ) != 1 )
794 {
795 libcerror_error_set(
796 error,
797 LIBCERROR_ERROR_DOMAIN_RUNTIME,
798 LIBCERROR_RUNTIME_ERROR_GET_FAILED,
799 "%s: unable to retrieve current working directory.",
800 function );
801
802 goto on_error;
803 }
804 change_volume_name = libcstring_narrow_string_allocate(
805 volume_name_length + 1 );
806
807 if( change_volume_name == NULL )
808 {
809 libcerror_error_set(
810 error,
811 LIBCERROR_ERROR_DOMAIN_MEMORY,
812 LIBCERROR_MEMORY_ERROR_INSUFFICIENT,
813 "%s: unable to create change volume name.",
814 function );
815
816 goto on_error;
817 }
818 if( libcstring_narrow_string_copy(
819 change_volume_name,
820 volume_name,
821 volume_name_length ) == NULL )
822 {
823 libcerror_error_set(
824 error,
825 LIBCERROR_ERROR_DOMAIN_MEMORY,
826 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
827 "%s: unable to set change volume name.",
828 function );
829
830 goto on_error;
831 }
832 change_volume_name[ volume_name_length ] = 0;
833
834 if( libcpath_path_change_directory(
835 change_volume_name,
836 error ) != 1 )
837 {
838 libcerror_error_set(
839 error,
840 LIBCERROR_ERROR_DOMAIN_RUNTIME,
841 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
842 "%s: unable to change current working directory.",
843 function );
844
845 goto on_error;
846 }
847 memory_free(
848 change_volume_name );
849
850 change_volume_name = NULL;
851 }
852 if( libcpath_path_get_current_working_directory(
1235 if( libcpath_path_get_current_working_directory_by_volume(
1236 volume_name,
1237 volume_name_length,
8531238 &current_directory,
8541239 &current_directory_size,
8551240 error ) != 1 )
8581243 error,
8591244 LIBCERROR_ERROR_DOMAIN_RUNTIME,
8601245 LIBCERROR_RUNTIME_ERROR_GET_FAILED,
861 "%s: unable to retrieve current directory.",
1246 "%s: unable to retrieve current directory by volume.",
8621247 function );
8631248
864 error_abort = 1;
865 }
866 if( current_working_directory != NULL )
867 {
868 if( libcpath_path_change_directory(
869 current_working_directory,
870 error ) != 1 )
871 {
872 libcerror_error_set(
873 error,
874 LIBCERROR_ERROR_DOMAIN_RUNTIME,
875 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
876 "%s: unable to change current working directory.",
877 function );
878
879 goto on_error;
880 }
881 memory_free(
882 current_working_directory );
883
884 current_working_directory = NULL;
885 }
886 /* Make sure the current working directory has been changed
887 * back to its original value
888 */
889 if( error_abort != 0 )
890 {
8911249 goto on_error;
8921250 }
8931251 /* Determine the volume name using the current directory if necessary
8941252 */
895 if( current_directory_size >= 3 )
896 {
897 if( current_directory == NULL )
898 {
899 libcerror_error_set(
900 error,
901 LIBCERROR_ERROR_DOMAIN_RUNTIME,
902 LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,
903 "%s: missing current directory.",
904 function );
905
906 goto on_error;
907 }
908 /* Check if the path starts with a volume letter
909 */
910 if( ( current_directory[ 1 ] == ':' )
911 && ( ( ( current_directory[ 0 ] >= 'A' )
912 && ( current_directory[ 0 ] <= 'Z' ) )
913 || ( ( current_directory[ 0 ] >= 'a' )
914 && ( current_directory[ 0 ] <= 'z' ) ) ) )
915 {
916 if( volume_name == NULL )
917 {
918 volume_name = &( current_directory[ 0 ] );
919 volume_name_length = 2;
920 }
921 current_directory_name_index = 2;
922
923 if( current_directory[ 2 ] == '\\' )
924 {
925 current_directory_name_index += 1;
926 }
927 }
928 /* Check for special paths
929 * paths with prefix: \\
930 */
931 else if( ( current_directory[ 0 ] == '\\' )
932 && ( current_directory[ 1 ] == '\\' ) )
933 {
934 /* Ignore the following special paths
935 * device path prefix: \\.\
936 */
937 if( ( current_directory_size >= 4 )
938 && ( current_directory[ 2 ] == '.' )
939 && ( current_directory[ 3 ] == '\\' ) )
940 {
941 libcerror_error_set(
942 error,
943 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
944 LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,
945 "%s: unsupported current directory.",
946 function );
947
948 return( -1 );
949 }
950 else
951 {
952 /* Determine the volume in an UNC path
953 * \\server\share
954 */
955 for( share_name_index = 2;
956 share_name_index < current_directory_size;
957 share_name_index++ )
958 {
959 if( current_directory[ share_name_index ] == '\\' )
960 {
961 break;
962 }
963 }
964 if( share_name_index >= current_directory_size )
965 {
966 libcerror_error_set(
967 error,
968 LIBCERROR_ERROR_DOMAIN_RUNTIME,
969 LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,
970 "%s: invalid path - missing share name.",
971 function );
972
973 goto on_error;
974 }
975 for( current_directory_name_index = share_name_index + 1;
976 current_directory_name_index < current_directory_size;
977 current_directory_name_index++ )
978 {
979 if( current_directory[ current_directory_name_index ] == '\\' )
980 {
981 break;
982 }
983 }
984 if( volume_name == NULL )
985 {
986 volume_name = &( current_directory[ 2 ] );
987
988 if( current_directory_name_index == current_directory_size )
989 {
990 volume_name_length = current_directory_name_index - 3;
991 }
992 else
993 {
994 volume_name_length = current_directory_name_index - 2;
995 }
996 }
997 }
998 }
1253 if( libcpath_path_get_volume_name(
1254 current_directory,
1255 current_directory_size,
1256 &volume_name,
1257 &volume_name_length,
1258 &current_directory_name_index,
1259 error ) != 1 )
1260 {
1261 libcerror_error_set(
1262 error,
1263 LIBCERROR_ERROR_DOMAIN_RUNTIME,
1264 LIBCERROR_RUNTIME_ERROR_GET_FAILED,
1265 "%s: unable to retrieve current directory by volume.",
1266 function );
1267
1268 goto on_error;
9991269 }
10001270 }
10011271 if( ( current_directory != NULL )
10021272 && ( current_directory_name_index < current_directory_size ) )
10031273 {
1274 current_directory_length = narrow_string_length(
1275 &( current_directory[ current_directory_name_index ] ) );
1276
10041277 if( libcsplit_narrow_string_split(
10051278 &( current_directory[ current_directory_name_index ] ),
1006 libcstring_narrow_string_length(
1007 &( current_directory[ current_directory_name_index ] ) ) + 1,
1279 current_directory_length + 1,
10081280 '\\',
10091281 &current_directory_split_string,
10101282 error ) != 1 )
10381310 /* The size of the full path consists of:
10391311 * the size of the prefix (\\?\ or \\.\)
10401312 */
1041 *full_path_size = 4;
1313 safe_full_path_size = 4;
10421314
10431315 /* If the path contains a volume name
10441316 * the length of the volume name
10461318 */
10471319 if( volume_name != NULL )
10481320 {
1049 *full_path_size += volume_name_length + 1;
1321 safe_full_path_size += volume_name_length + 1;
10501322 }
10511323 /* If the path contains an UNC path
10521324 * add the size of the UNC\ prefix
10531325 */
10541326 if( share_name_index > 0 )
10551327 {
1056 *full_path_size += 4;
1328 safe_full_path_size += 4;
10571329 }
10581330 /* If the path is relative
10591331 * add the size of the current directory
10621334 if( ( path_type == LIBCPATH_TYPE_RELATIVE )
10631335 && ( current_directory_name_index < current_directory_size ) )
10641336 {
1065 *full_path_size += ( current_directory_size - ( current_directory_name_index + 1 ) );
1337 safe_full_path_size += ( current_directory_size - ( current_directory_name_index + 1 ) );
10661338
10671339 if( ( current_directory_size >= 2 )
10681340 && ( current_directory[ current_directory_size - 2 ] != '\\' ) )
10691341 {
1070 *full_path_size += 1;
1342 safe_full_path_size += 1;
10711343 }
10721344 }
10731345 if( current_directory_split_string != NULL )
11761448 /* Remove the size of the parent directory name and a directory separator
11771449 * Note that the size includes the end of string character
11781450 */
1179 *full_path_size -= current_directory_string_segment_size;
1451 safe_full_path_size -= current_directory_string_segment_size;
11801452
11811453 if( libcsplit_narrow_split_string_set_segment_by_index(
11821454 current_directory_split_string,
12311503 /* Remove the size of the parent directory name and a directory separator
12321504 * Note that the size includes the end of string character
12331505 */
1234 *full_path_size -= last_used_path_string_segment_size;
1506 safe_full_path_size -= last_used_path_string_segment_size;
12351507
12361508 if( libcsplit_narrow_split_string_set_segment_by_index(
12371509 path_split_string,
13471619 /* Add the size of the directory or file name and a directory separator
13481620 * Note that the size includes the end of string character
13491621 */
1350 *full_path_size += path_string_segment_size;
1622 safe_full_path_size += path_string_segment_size;
13511623
13521624 last_used_path_segment_index = path_segment_index;
13531625 }
13561628 */
13571629 full_path_index = 0;
13581630
1359 *full_path = libcstring_narrow_string_allocate(
1360 *full_path_size );
1631 *full_path = narrow_string_allocate(
1632 safe_full_path_size );
13611633
13621634 if( *full_path == NULL )
13631635 {
13701642
13711643 goto on_error;
13721644 }
1645 if( memory_set(
1646 *full_path,
1647 0,
1648 sizeof( wchar_t ) * safe_full_path_size ) == NULL )
1649 {
1650 libcerror_error_set(
1651 error,
1652 LIBCERROR_ERROR_DOMAIN_MEMORY,
1653 LIBCERROR_MEMORY_ERROR_SET_FAILED,
1654 "%s: unable to clear full path.",
1655 function );
1656
1657 goto on_error;
1658 }
1659 *full_path_size = safe_full_path_size;
1660
13731661 if( path_type == LIBCPATH_TYPE_DEVICE )
13741662 {
13751663 full_path_prefix = "\\\\.\\";
13801668 full_path_prefix = "\\\\?\\";
13811669 full_path_prefix_length = 4;
13821670 }
1383 if( libcstring_narrow_string_copy(
1671 if( narrow_string_copy(
13841672 &( ( *full_path )[ full_path_index ] ),
13851673 full_path_prefix,
13861674 full_path_prefix_length ) == NULL )
14001688 */
14011689 if( share_name_index > 0 )
14021690 {
1403 if( libcstring_narrow_string_copy(
1691 if( narrow_string_copy(
14041692 &( ( *full_path )[ full_path_index ] ),
14051693 "UNC\\",
14061694 4 ) == NULL )
14181706 }
14191707 if( volume_name != NULL )
14201708 {
1421 if( libcstring_narrow_string_copy(
1709 if( narrow_string_copy(
14221710 &( ( *full_path )[ full_path_index ] ),
14231711 volume_name,
14241712 volume_name_length ) == NULL )
14791767
14801768 goto on_error;
14811769 }
1482 if( libcstring_narrow_string_copy(
1770 if( narrow_string_copy(
14831771 &( ( *full_path )[ full_path_index ] ),
14841772 current_directory_string_segment,
14851773 current_directory_string_segment_size - 1 ) == NULL )
15371825
15381826 goto on_error;
15391827 }
1540 if( libcstring_narrow_string_copy(
1828 if( narrow_string_copy(
15411829 &( ( *full_path )[ full_path_index ] ),
15421830 path_string_segment,
15431831 path_string_segment_size - 1 ) == NULL )
16231911 {
16241912 memory_free(
16251913 current_directory );
1626 }
1627 if( change_volume_name != NULL )
1628 {
1629 memory_free(
1630 change_volume_name );
1631 }
1632 if( current_working_directory != NULL )
1633 {
1634 memory_free(
1635 current_working_directory );
16361914 }
16371915 return( -1 );
16381916 }
16651943 char *last_used_path_string_segment = NULL;
16661944 char *path_string_segment = NULL;
16671945 static char *function = "libcpath_path_get_full_path";
1946 size_t current_directory_length = 0;
16681947 size_t current_directory_size = 0;
16691948 size_t current_directory_string_segment_size = 0;
16701949 size_t full_path_index = 0;
16711950 size_t last_used_path_string_segment_size = 0;
16721951 size_t path_string_segment_size = 0;
1952 size_t safe_full_path_size = 0;
16731953 uint8_t path_type = LIBCPATH_TYPE_RELATIVE;
16741954 int current_directory_number_of_segments = 0;
16751955 int current_directory_segment_index = 0;
16991979
17001980 return( -1 );
17011981 }
1702 if( path_length >= (size_t) SSIZE_MAX )
1982 if( path_length > (size_t) ( SSIZE_MAX - 1 ) )
17031983 {
17041984 libcerror_error_set(
17051985 error,
17662046 }
17672047 if( current_directory != NULL )
17682048 {
2049 current_directory_length = narrow_string_length(
2050 current_directory );
2051
17692052 if( libcsplit_narrow_string_split(
17702053 current_directory,
1771 libcstring_narrow_string_length(
1772 current_directory ) + 1,
2054 current_directory_length + 1,
17732055 '/',
17742056 &current_directory_split_string,
17752057 error ) != 1 )
18072089 */
18082090 if( path_type == LIBCPATH_TYPE_ABSOLUTE )
18092091 {
1810 *full_path_size = 1;
2092 safe_full_path_size = 1;
18112093 }
18122094 /* If the path is relative
18132095 * add the size of the current directory
18262108
18272109 goto on_error;
18282110 }
1829 *full_path_size = current_directory_size - 1;
2111 safe_full_path_size = current_directory_size - 1;
18302112
18312113 if( ( current_directory_size >= 2 )
18322114 && ( current_directory[ current_directory_size - 2 ] != '/' ) )
18332115 {
1834 *full_path_size += 1;
2116 safe_full_path_size++;
18352117 }
18362118 }
18372119 if( current_directory_split_string != NULL )
19402222 /* Remove the size of the parent directory name and a directory separator
19412223 * Note that the size includes the end of string character
19422224 */
1943 *full_path_size -= current_directory_string_segment_size;
2225 safe_full_path_size -= current_directory_string_segment_size;
19442226
19452227 if( libcsplit_narrow_split_string_set_segment_by_index(
19462228 current_directory_split_string,
19952277 /* Remove the size of the parent directory name and a directory separator
19962278 * Note that the size includes the end of string character
19972279 */
1998 *full_path_size -= last_used_path_string_segment_size;
2280 safe_full_path_size -= last_used_path_string_segment_size;
19992281
20002282 if( libcsplit_narrow_split_string_set_segment_by_index(
20012283 path_split_string,
21112393 /* Add the size of the directory or file name and a directory separator
21122394 * Note that the size includes the end of string character
21132395 */
2114 *full_path_size += path_string_segment_size;
2396 safe_full_path_size += path_string_segment_size;
21152397
21162398 last_used_path_segment_index = path_segment_index;
21172399 }
21202402 */
21212403 full_path_index = 0;
21222404
2123 *full_path = libcstring_narrow_string_allocate(
2124 *full_path_size );
2405 *full_path = narrow_string_allocate(
2406 safe_full_path_size );
21252407
21262408 if( *full_path == NULL )
21272409 {
21372419 if( memory_set(
21382420 *full_path,
21392421 0,
2140 sizeof( char ) * *full_path_size ) == NULL )
2422 sizeof( char ) * safe_full_path_size ) == NULL )
21412423 {
21422424 libcerror_error_set(
21432425 error,
21482430
21492431 goto on_error;
21502432 }
2433 *full_path_size = safe_full_path_size;
2434
21512435 if( path_type == LIBCPATH_TYPE_ABSOLUTE )
21522436 {
21532437 ( *full_path )[ full_path_index ] = '/';
21952479
21962480 goto on_error;
21972481 }
2198 if( libcstring_narrow_string_copy(
2482 if( narrow_string_copy(
21992483 &( ( *full_path )[ full_path_index ] ),
22002484 current_directory_string_segment,
22012485 current_directory_string_segment_size - 1 ) == NULL )
22532537
22542538 goto on_error;
22552539 }
2256 if( libcstring_narrow_string_copy(
2540 if( narrow_string_copy(
22572541 &( ( *full_path )[ full_path_index ] ),
22582542 path_string_segment,
22592543 path_string_segment_size - 1 ) == NULL )
23442628 }
23452629
23462630 #endif /* defined( WINAPI ) */
2631
2632 /* Retrieves a sanitized version of the filename
2633 * Returns 1 if successful or -1 on error
2634 */
2635 int libcpath_path_get_sanitized_filename(
2636 const char *filename,
2637 size_t filename_size,
2638 char **sanitized_filename,
2639 size_t *sanitized_filename_size,
2640 libcerror_error_t **error )
2641 {
2642 static char *function = "libcpath_path_get_sanitized_filename";
2643
2644 if( sanitized_filename == NULL )
2645 {
2646 libcerror_error_set(
2647 error,
2648 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
2649 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
2650 "%s: invalid sanitized filename.",
2651 function );
2652
2653 return( -1 );
2654 }
2655 if( *sanitized_filename != NULL )
2656 {
2657 libcerror_error_set(
2658 error,
2659 LIBCERROR_ERROR_DOMAIN_RUNTIME,
2660 LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,
2661 "%s: invalid sanitized filename value already set.",
2662 function );
2663
2664 return( -1 );
2665 }
2666 if( sanitized_filename_size == NULL )
2667 {
2668 libcerror_error_set(
2669 error,
2670 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
2671 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
2672 "%s: invalid sanitized filename size.",
2673 function );
2674
2675 return( -1 );
2676 }
2677 /* TODO implement */
2678 return( -1 );
2679 }
2680
2681 /* Retrieves a sanitized version of the path
2682 * Returns 1 if successful or -1 on error
2683 */
2684 int libcpath_path_get_sanitized_path(
2685 const char *path,
2686 size_t path_size,
2687 char **sanitized_path,
2688 size_t *sanitized_path_size,
2689 libcerror_error_t **error )
2690 {
2691 static char *function = "libcpath_path_get_sanitized_path";
2692
2693 if( sanitized_path == NULL )
2694 {
2695 libcerror_error_set(
2696 error,
2697 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
2698 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
2699 "%s: invalid sanitized path.",
2700 function );
2701
2702 return( -1 );
2703 }
2704 if( *sanitized_path != NULL )
2705 {
2706 libcerror_error_set(
2707 error,
2708 LIBCERROR_ERROR_DOMAIN_RUNTIME,
2709 LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,
2710 "%s: invalid sanitized path value already set.",
2711 function );
2712
2713 return( -1 );
2714 }
2715 if( sanitized_path_size == NULL )
2716 {
2717 libcerror_error_set(
2718 error,
2719 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
2720 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
2721 "%s: invalid sanitized path size.",
2722 function );
2723
2724 return( -1 );
2725 }
2726 /* TODO implement */
2727 return( -1 );
2728 }
23472729
23482730 /* Combines the directory name and filename into a path
23492731 * Returns 1 if successful or -1 on error
23582740 libcerror_error_t **error )
23592741 {
23602742 static char *function = "libcpath_path_join";
2743 size_t filename_index = 0;
23612744 size_t path_index = 0;
23622745
23632746 if( path == NULL )
24372820
24382821 return( -1 );
24392822 }
2440 *path_size = directory_name_length + filename_length + 1;
2441
2442 if( directory_name[ directory_name_length ] != (char) LIBCPATH_SEPARATOR )
2443 {
2444 *path_size += 1;
2445 }
2446 *path = libcstring_narrow_string_allocate(
2823 /* TODO strip other patterns like /./ */
2824 while( directory_name_length > 0 )
2825 {
2826 if( directory_name[ directory_name_length - 1 ] != (char) LIBCPATH_SEPARATOR )
2827 {
2828 break;
2829 }
2830 directory_name_length--;
2831 }
2832 while( filename_length > 0 )
2833 {
2834 if( filename[ filename_index ] != (char) LIBCPATH_SEPARATOR )
2835 {
2836 break;
2837 }
2838 filename_index++;
2839 filename_length--;
2840 }
2841 *path_size = directory_name_length + filename_length + 2;
2842
2843 *path = narrow_string_allocate(
24472844 *path_size );
24482845
24492846 if( *path == NULL )
24572854
24582855 goto on_error;
24592856 }
2460 if( libcstring_narrow_string_copy(
2857 if( narrow_string_copy(
24612858 *path,
24622859 directory_name,
24632860 directory_name_length ) == NULL )
24752872
24762873 ( *path )[ path_index++ ] = (char) LIBCPATH_SEPARATOR;
24772874
2478 if( libcstring_narrow_string_copy(
2875 if( narrow_string_copy(
24792876 &( ( *path )[ path_index ] ),
2480 filename,
2877 &( filename[ filename_index ] ),
24812878 filename_length ) == NULL )
24822879 {
24832880 libcerror_error_set(
25262923 return( 0 );
25272924 }
25282925 library_handle = LoadLibrary(
2529 _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) );
2926 _SYSTEM_STRING( "kernel32.dll" ) );
25302927
25312928 if( library_handle == NULL )
25322929 {
28593256 return( FALSE );
28603257 }
28613258 library_handle = LoadLibrary(
2862 _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) );
3259 _SYSTEM_STRING( "kernel32.dll" ) );
28633260
28643261 if( library_handle == NULL )
28653262 {
29523349 char *narrow_directory_name = 0;
29533350 size_t directory_name_length = 0;
29543351 size_t narrow_directory_name_size = 0;
2955 int result = 0;
29563352
29573353 if( directory_name == NULL )
29583354 {
29653361
29663362 return( -1 );
29673363 }
2968 directory_name_length = libcstring_wide_string_length(
3364 directory_name_length = wide_string_length(
29693365 directory_name );
29703366
2971 if( libclocale_codepage == 0 )
2972 {
2973 #if SIZEOF_WCHAR_T == 4
2974 result = libuna_utf8_string_size_from_utf32(
2975 (libuna_utf32_character_t *) directory_name,
2976 directory_name_length + 1,
2977 &narrow_directory_name_size,
2978 error );
2979 #elif SIZEOF_WCHAR_T == 2
2980 result = libuna_utf8_string_size_from_utf16(
2981 (libuna_utf16_character_t *) directory_name,
2982 directory_name_length + 1,
2983 &narrow_directory_name_size,
2984 error );
2985 #else
2986 #error Unsupported size of wchar_t
2987 #endif /* SIZEOF_WCHAR_T */
2988 }
2989 else
2990 {
2991 #if SIZEOF_WCHAR_T == 4
2992 result = libuna_byte_stream_size_from_utf32(
2993 (libuna_utf32_character_t *) directory_name,
2994 directory_name_length + 1,
2995 libclocale_codepage,
2996 &narrow_directory_name_size,
2997 error );
2998 #elif SIZEOF_WCHAR_T == 2
2999 result = libuna_byte_stream_size_from_utf16(
3000 (libuna_utf16_character_t *) directory_name,
3001 directory_name_length + 1,
3002 libclocale_codepage,
3003 &narrow_directory_name_size,
3004 error );
3005 #else
3006 #error Unsupported size of wchar_t
3007 #endif /* SIZEOF_WCHAR_T */
3008 }
3009 if( result != 1 )
3367 if( libcpath_system_string_size_from_wide_string(
3368 directory_name,
3369 directory_name_length + 1,
3370 &narrow_directory_name_size,
3371 error ) != 1 )
30103372 {
30113373 libcerror_error_set(
30123374 error,
30293391
30303392 goto on_error;
30313393 }
3032 narrow_directory_name = libcstring_narrow_string_allocate(
3394 narrow_directory_name = narrow_string_allocate(
30333395 narrow_directory_name_size );
30343396
30353397 if( narrow_directory_name == NULL )
30433405
30443406 goto on_error;
30453407 }
3046 if( libclocale_codepage == 0 )
3047 {
3048 #if SIZEOF_WCHAR_T == 4
3049 result = libuna_utf8_string_copy_from_utf32(
3050 (libuna_utf8_character_t *) narrow_directory_name,
3051 narrow_directory_name_size,
3052 (libuna_utf32_character_t *) directory_name,
3053 directory_name_length + 1,
3054 error );
3055 #elif SIZEOF_WCHAR_T == 2
3056 result = libuna_utf8_string_copy_from_utf16(
3057 (libuna_utf8_character_t *) narrow_directory_name,
3058 narrow_directory_name_size,
3059 (libuna_utf16_character_t *) directory_name,
3060 directory_name_length + 1,
3061 error );
3062 #else
3063 #error Unsupported size of wchar_t
3064 #endif /* SIZEOF_WCHAR_T */
3065 }
3066 else
3067 {
3068 #if SIZEOF_WCHAR_T == 4
3069 result = libuna_byte_stream_copy_from_utf32(
3070 (uint8_t *) narrow_directory_name,
3071 narrow_directory_name_size,
3072 libclocale_codepage,
3073 (libuna_utf32_character_t *) directory_name,
3074 directory_name_length + 1,
3075 error );
3076 #elif SIZEOF_WCHAR_T == 2
3077 result = libuna_byte_stream_copy_from_utf16(
3078 (uint8_t *) narrow_directory_name,
3079 narrow_directory_name_size,
3080 libclocale_codepage,
3081 (libuna_utf16_character_t *) directory_name,
3082 directory_name_length + 1,
3083 error );
3084 #else
3085 #error Unsupported size of wchar_t
3086 #endif /* SIZEOF_WCHAR_T */
3087 }
3088 if( result != 1 )
3408 if( libcpath_system_string_copy_from_wide_string(
3409 narrow_directory_name,
3410 narrow_directory_name_size,
3411 directory_name,
3412 directory_name_length + 1,
3413 error ) != 1 )
30893414 {
30903415 libcerror_error_set(
30913416 error,
31453470 return( 0 );
31463471 }
31473472 library_handle = LoadLibrary(
3148 _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) );
3473 _SYSTEM_STRING( "kernel32.dll" ) );
31493474
31503475 if( library_handle == NULL )
31513476 {
32543579 }
32553580 *current_working_directory_size = (size_t) safe_current_working_directory_size;
32563581
3257 *current_working_directory = libcstring_wide_string_allocate(
3582 *current_working_directory = wide_string_allocate(
32583583 *current_working_directory_size );
32593584
32603585 if( *current_working_directory == NULL )
33303655 size_t *current_working_directory_size,
33313656 libcerror_error_t **error )
33323657 {
3333 static char *function = "libcpath_path_get_current_working_directory_wide";
3334 char *narrow_current_working_directory = 0;
3335 size_t narrow_current_working_directory_size = 0;
3336 int result = 0;
3658 static char *function = "libcpath_path_get_current_working_directory_wide";
3659 char *narrow_current_working_directory = 0;
3660 size_t narrow_current_working_directory_length = 0;
33373661
33383662 if( current_working_directory == NULL )
33393663 {
33683692
33693693 return( -1 );
33703694 }
3371 narrow_current_working_directory = libcstring_narrow_string_allocate(
3695 narrow_current_working_directory = narrow_string_allocate(
33723696 PATH_MAX );
33733697
33743698 if( narrow_current_working_directory == NULL )
33963720
33973721 goto on_error;
33983722 }
3399 narrow_current_working_directory_size = 1 + libcstring_narrow_string_length(
3400 narrow_current_working_directory );
3723 narrow_current_working_directory_length = narrow_string_length(
3724 narrow_current_working_directory );
34013725
34023726 /* Convert the current working directory to a wide string
34033727 * if the platform has no wide character open function
34043728 */
3405 if( libclocale_codepage == 0 )
3406 {
3407 #if SIZEOF_WCHAR_T == 4
3408 result = libuna_utf32_string_size_from_utf8(
3409 (libuna_utf8_character_t *) narrow_current_working_directory,
3410 narrow_current_working_directory_size,
3411 current_working_directory_size,
3412 error );
3413 #elif SIZEOF_WCHAR_T == 2
3414 result = libuna_utf16_string_size_from_utf8(
3415 (libuna_utf8_character_t *) narrow_current_working_directory,
3416 narrow_current_working_directory_size,
3417 current_working_directory_size,
3418 error );
3419 #else
3420 #error Unsupported size of wchar_t
3421 #endif /* SIZEOF_WCHAR_T */
3422 }
3423 else
3424 {
3425 #if SIZEOF_WCHAR_T == 4
3426 result = libuna_utf32_string_size_from_byte_stream(
3427 (uint8_t *) narrow_current_working_directory,
3428 narrow_current_working_directory_size,
3429 libclocale_codepage,
3430 current_working_directory_size,
3431 error );
3432 #elif SIZEOF_WCHAR_T == 2
3433 result = libuna_utf16_string_size_from_byte_stream(
3434 (uint8_t *) narrow_current_working_directory,
3435 narrow_current_working_directory_size,
3436 libclocale_codepage,
3437 current_working_directory_size,
3438 error );
3439 #else
3440 #error Unsupported size of wchar_t
3441 #endif /* SIZEOF_WCHAR_T */
3442 }
3443 if( result != 1 )
3729 if( libcpath_system_string_size_from_narrow_string(
3730 narrow_current_working_directory,
3731 narrow_current_working_directory_length + 1,
3732 current_working_directory_size,
3733 error ) != 1 )
34443734 {
34453735 libcerror_error_set(
34463736 error,
34513741
34523742 return( -1 );
34533743 }
3454 *current_working_directory = libcstring_wide_string_allocate(
3744 *current_working_directory = wide_string_allocate(
34553745 *current_working_directory_size );
34563746
34573747 if( *current_working_directory == NULL )
34793769
34803770 goto on_error;
34813771 }
3482 if( libclocale_codepage == 0 )
3483 {
3484 #if SIZEOF_WCHAR_T == 4
3485 result = libuna_utf32_string_copy_from_utf8(
3486 (libuna_utf32_character_t *) *current_working_directory,
3487 *current_working_directory_size,
3488 (libuna_utf8_character_t *) narrow_current_working_directory,
3489 narrow_current_working_directory_size,
3490 error );
3491 #elif SIZEOF_WCHAR_T == 2
3492 result = libuna_utf16_string_copy_from_utf8(
3493 (libuna_utf16_character_t *) *current_working_directory,
3494 *current_working_directory_size,
3495 (libuna_utf8_character_t *) narrow_current_working_directory,
3496 narrow_current_working_directory_size,
3497 error );
3498 #else
3499 #error Unsupported size of wchar_t
3500 #endif /* SIZEOF_WCHAR_T */
3501 }
3502 else
3503 {
3504 #if SIZEOF_WCHAR_T == 4
3505 result = libuna_utf32_string_copy_from_byte_stream(
3506 (libuna_utf32_character_t *) *current_working_directory,
3507 *current_working_directory_size,
3508 (uint8_t *) narrow_current_working_directory,
3509 narrow_current_working_directory_size,
3510 libclocale_codepage,
3511 error );
3512 #elif SIZEOF_WCHAR_T == 2
3513 result = libuna_utf16_string_copy_from_byte_stream(
3514 (libuna_utf16_character_t *) *current_working_directory,
3515 *current_working_directory_size,
3516 (uint8_t *) narrow_current_working_directory,
3517 narrow_current_working_directory_size,
3518 libclocale_codepage,
3519 error );
3520 #else
3521 #error Unsupported size of wchar_t
3522 #endif /* SIZEOF_WCHAR_T */
3523 }
3524 if( result != 1 )
3772 if( libcpath_system_string_copy_to_wide_string(
3773 narrow_current_working_directory,
3774 narrow_current_working_directory_length + 1,
3775 *current_working_directory,
3776 *current_working_directory_size,
3777 error ) != 1 )
35253778 {
35263779 libcerror_error_set(
35273780 error,
35573810 #endif
35583811
35593812 #if defined( WINAPI )
3813
3814 /* Determines the volume name and path type
3815 * Returns 1 if succesful or -1 on error
3816 */
3817 int libcpath_path_get_volume_name_and_path_type_wide(
3818 const wchar_t *path,
3819 size_t path_length,
3820 wchar_t **volume_name,
3821 size_t *volume_name_length,
3822 size_t *directory_name_index,
3823 uint8_t *path_type,
3824 libcerror_error_t **error )
3825 {
3826 static char *function = "libcpath_path_get_volume_name_and_path_type_wide";
3827 size_t path_index = 0;
3828 size_t share_name_index = 0;
3829
3830 if( path == NULL )
3831 {
3832 libcerror_error_set(
3833 error,
3834 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
3835 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
3836 "%s: invalid path.",
3837 function );
3838
3839 return( -1 );
3840 }
3841 if( path_length > (size_t) ( SSIZE_MAX - 1 ) )
3842 {
3843 libcerror_error_set(
3844 error,
3845 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
3846 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
3847 "%s: invalid path length value exceeds maximum.",
3848 function );
3849
3850 return( -1 );
3851 }
3852 if( volume_name == NULL )
3853 {
3854 libcerror_error_set(
3855 error,
3856 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
3857 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
3858 "%s: invalid volume name.",
3859 function );
3860
3861 return( -1 );
3862 }
3863 if( volume_name_length == NULL )
3864 {
3865 libcerror_error_set(
3866 error,
3867 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
3868 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
3869 "%s: invalid volume name length.",
3870 function );
3871
3872 return( -1 );
3873 }
3874 if( directory_name_index == NULL )
3875 {
3876 libcerror_error_set(
3877 error,
3878 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
3879 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
3880 "%s: invalid directory name index.",
3881 function );
3882
3883 return( -1 );
3884 }
3885 if( path_type == NULL )
3886 {
3887 libcerror_error_set(
3888 error,
3889 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
3890 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
3891 "%s: invalid path type.",
3892 function );
3893
3894 return( -1 );
3895 }
3896 if( ( path_length == 2 )
3897 && ( path[ 1 ] == (wchar_t) '\\' ) )
3898 {
3899 *path_type = LIBCPATH_TYPE_ABSOLUTE;
3900 }
3901 else if( path_length >= 2 )
3902 {
3903 /* Check if the path starts with a volume letter
3904 */
3905 if( ( path[ 1 ] == (wchar_t) ':' )
3906 && ( ( ( path[ 0 ] >= (wchar_t) 'A' )
3907 && ( path[ 0 ] <= (wchar_t) 'Z' ) )
3908 || ( ( path[ 0 ] >= (wchar_t) 'a' )
3909 && ( path[ 0 ] <= (wchar_t) 'z' ) ) ) )
3910 {
3911 *volume_name = (wchar_t *) path;
3912 *volume_name_length = 2;
3913 *directory_name_index = 2;
3914
3915 if( ( path_length >= 3 )
3916 && ( path[ 2 ] == (wchar_t) '\\' ) )
3917 {
3918 *path_type = LIBCPATH_TYPE_ABSOLUTE;
3919 *directory_name_index += 1;
3920 }
3921 }
3922 /* Check for special paths
3923 * paths with prefix: \\
3924 */
3925 else if( ( path[ 0 ] == (wchar_t) '\\' )
3926 && ( path[ 1 ] == (wchar_t) '\\' ) )
3927 {
3928 /* Determine if the path is a special path
3929 * device path prefix: \\.\
3930 * extended-length path prefix: \\?\
3931 */
3932 if( ( path_length >= 4 )
3933 && ( ( path[ 2 ] == (wchar_t) '.' )
3934 || ( path[ 2 ] == (wchar_t) '?' ) )
3935 && ( path[ 3 ] == (wchar_t) '\\' ) )
3936 {
3937 if( path[ 2 ] == (wchar_t) '.' )
3938 {
3939 *path_type = LIBCPATH_TYPE_DEVICE;
3940 }
3941 else
3942 {
3943 *path_type = LIBCPATH_TYPE_EXTENDED_LENGTH;
3944 }
3945 *directory_name_index = 4;
3946 }
3947 else
3948 {
3949 /* Determine the volume in an UNC path
3950 * \\server\share
3951 */
3952 for( share_name_index = 2;
3953 share_name_index <= path_length;
3954 share_name_index++ )
3955 {
3956 if( path[ share_name_index ] == (wchar_t) '\\' )
3957 {
3958 break;
3959 }
3960 }
3961 if( share_name_index > path_length )
3962 {
3963 libcerror_error_set(
3964 error,
3965 LIBCERROR_ERROR_DOMAIN_RUNTIME,
3966 LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,
3967 "%s: invalid path - missing share name.",
3968 function );
3969
3970 return( -1 );
3971 }
3972 for( path_index = share_name_index + 1;
3973 path_index <= path_length;
3974 path_index++ )
3975 {
3976 if( path[ path_index ] == (wchar_t) '\\' )
3977 {
3978 break;
3979 }
3980 }
3981 *path_type = LIBCPATH_TYPE_UNC;
3982 *volume_name = (wchar_t *) &( path[ 2 ] );
3983 *volume_name_length = path_index - 2;
3984 *directory_name_index = path_index;
3985 }
3986 }
3987 /* Check for absolue paths
3988 */
3989 else if( path[ 0 ] == (wchar_t) '\\' )
3990 {
3991 *path_type = LIBCPATH_TYPE_ABSOLUTE;
3992 }
3993 }
3994 return( 1 );
3995 }
3996
3997 /* Retrieves the current working directory of a specific volume
3998 * Returns 1 if successful or -1 on error
3999 */
4000 int libcpath_path_get_current_working_directory_by_volume_wide(
4001 wchar_t *volume_name,
4002 size_t volume_name_length,
4003 wchar_t **current_working_directory,
4004 size_t *current_working_directory_size,
4005 libcerror_error_t **error )
4006 {
4007 wchar_t *change_volume_name = NULL;
4008 wchar_t *current_volume_working_directory = NULL;
4009 static char *function = "libcpath_path_get_current_working_directory_by_volume_wide";
4010 size_t current_volume_working_directory_size = 0;
4011 int result = 1;
4012
4013 if( current_working_directory == NULL )
4014 {
4015 libcerror_error_set(
4016 error,
4017 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
4018 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
4019 "%s: invalid current working directory.",
4020 function );
4021
4022 return( -1 );
4023 }
4024 if( current_working_directory_size == NULL )
4025 {
4026 libcerror_error_set(
4027 error,
4028 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
4029 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
4030 "%s: invalid current working directory size.",
4031 function );
4032
4033 return( -1 );
4034 }
4035 /* If the path contains a volume name switch to that
4036 * volume to determine the current directory
4037 */
4038 if( volume_name != NULL )
4039 {
4040 if( libcpath_path_get_current_working_directory_wide(
4041 &current_volume_working_directory,
4042 &current_volume_working_directory_size,
4043 error ) != 1 )
4044 {
4045 libcerror_error_set(
4046 error,
4047 LIBCERROR_ERROR_DOMAIN_RUNTIME,
4048 LIBCERROR_RUNTIME_ERROR_GET_FAILED,
4049 "%s: unable to retrieve current volume working directory.",
4050 function );
4051
4052 goto on_error;
4053 }
4054 change_volume_name = wide_string_allocate(
4055 volume_name_length + 1 );
4056
4057 if( change_volume_name == NULL )
4058 {
4059 libcerror_error_set(
4060 error,
4061 LIBCERROR_ERROR_DOMAIN_MEMORY,
4062 LIBCERROR_MEMORY_ERROR_INSUFFICIENT,
4063 "%s: unable to create change volume name.",
4064 function );
4065
4066 goto on_error;
4067 }
4068 if( wide_string_copy(
4069 change_volume_name,
4070 volume_name,
4071 volume_name_length ) == NULL )
4072 {
4073 libcerror_error_set(
4074 error,
4075 LIBCERROR_ERROR_DOMAIN_MEMORY,
4076 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
4077 "%s: unable to set change volume name.",
4078 function );
4079
4080 goto on_error;
4081 }
4082 change_volume_name[ volume_name_length ] = 0;
4083
4084 if( libcpath_path_change_directory_wide(
4085 change_volume_name,
4086 error ) != 1 )
4087 {
4088 libcerror_error_set(
4089 error,
4090 LIBCERROR_ERROR_DOMAIN_RUNTIME,
4091 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
4092 "%s: unable to change current working directory.",
4093 function );
4094
4095 goto on_error;
4096 }
4097 memory_free(
4098 change_volume_name );
4099
4100 change_volume_name = NULL;
4101 }
4102 if( libcpath_path_get_current_working_directory_wide(
4103 current_working_directory,
4104 current_working_directory_size,
4105 error ) != 1 )
4106 {
4107 libcerror_error_set(
4108 error,
4109 LIBCERROR_ERROR_DOMAIN_RUNTIME,
4110 LIBCERROR_RUNTIME_ERROR_GET_FAILED,
4111 "%s: unable to retrieve current directory.",
4112 function );
4113
4114 /* Make sure the current working directory has been changed
4115 * back to its original value
4116 */
4117 result = -1;
4118 }
4119 if( current_volume_working_directory != NULL )
4120 {
4121 if( libcpath_path_change_directory_wide(
4122 current_volume_working_directory,
4123 error ) != 1 )
4124 {
4125 libcerror_error_set(
4126 error,
4127 LIBCERROR_ERROR_DOMAIN_RUNTIME,
4128 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
4129 "%s: unable to change current working directory.",
4130 function );
4131
4132 goto on_error;
4133 }
4134 memory_free(
4135 current_volume_working_directory );
4136
4137 current_volume_working_directory = NULL;
4138 }
4139 return( result );
4140
4141 on_error:
4142 if( change_volume_name != NULL )
4143 {
4144 memory_free(
4145 change_volume_name );
4146 }
4147 if( current_volume_working_directory != NULL )
4148 {
4149 memory_free(
4150 current_volume_working_directory );
4151 }
4152 if( *current_working_directory != NULL )
4153 {
4154 memory_free(
4155 *current_working_directory );
4156
4157 *current_working_directory = NULL;
4158 }
4159 *current_working_directory_size = 0;
4160
4161 return( -1 );
4162 }
4163
4164 /* Determines the volume name
4165 * Returns 1 if succesful or -1 on error
4166 */
4167 int libcpath_path_get_volume_name_wide(
4168 const wchar_t *path,
4169 size_t path_size,
4170 wchar_t **volume_name,
4171 size_t *volume_name_length,
4172 size_t *directory_name_index,
4173 libcerror_error_t **error )
4174 {
4175 static char *function = "libcpath_path_get_volume_name_wide";
4176 size_t path_index = 0;
4177 size_t share_name_index = 0;
4178
4179 if( path == NULL )
4180 {
4181 libcerror_error_set(
4182 error,
4183 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
4184 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
4185 "%s: invalid path.",
4186 function );
4187
4188 return( -1 );
4189 }
4190 if( path_size > (size_t) SSIZE_MAX )
4191 {
4192 libcerror_error_set(
4193 error,
4194 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
4195 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
4196 "%s: invalid path size value exceeds maximum.",
4197 function );
4198
4199 return( -1 );
4200 }
4201 if( volume_name == NULL )
4202 {
4203 libcerror_error_set(
4204 error,
4205 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
4206 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
4207 "%s: invalid volume name.",
4208 function );
4209
4210 return( -1 );
4211 }
4212 if( volume_name_length == NULL )
4213 {
4214 libcerror_error_set(
4215 error,
4216 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
4217 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
4218 "%s: invalid volume name length.",
4219 function );
4220
4221 return( -1 );
4222 }
4223 if( directory_name_index == NULL )
4224 {
4225 libcerror_error_set(
4226 error,
4227 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
4228 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
4229 "%s: invalid directory name index.",
4230 function );
4231
4232 return( -1 );
4233 }
4234 /* TODO clean up code */
4235 if( path_size >= 3 )
4236 {
4237 if( path == NULL )
4238 {
4239 libcerror_error_set(
4240 error,
4241 LIBCERROR_ERROR_DOMAIN_RUNTIME,
4242 LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,
4243 "%s: missing path.",
4244 function );
4245
4246 return( -1 );
4247 }
4248 /* Check if the path starts with a volume letter
4249 */
4250 if( ( path[ 1 ] == (wchar_t) ':' )
4251 && ( ( ( path[ 0 ] >= (wchar_t) 'A' )
4252 && ( path[ 0 ] <= (wchar_t) 'Z' ) )
4253 || ( ( path[ 0 ] >= (wchar_t) 'a' )
4254 && ( path[ 0 ] <= (wchar_t) 'z' ) ) ) )
4255 {
4256 if( *volume_name == NULL )
4257 {
4258 *volume_name = (wchar_t *) path;
4259 *volume_name_length = 2;
4260 }
4261 path_index = 2;
4262
4263 if( path[ 2 ] == (wchar_t) '\\' )
4264 {
4265 path_index++;
4266 }
4267 *directory_name_index = path_index;
4268 }
4269 /* Check for special paths
4270 * paths with prefix: \\
4271 */
4272 else if( ( path[ 0 ] == (wchar_t) '\\' )
4273 && ( path[ 1 ] == (wchar_t) '\\' ) )
4274 {
4275 /* Ignore the following special paths
4276 * device path prefix: \\.\
4277 */
4278 if( ( path_size >= 4 )
4279 && ( path[ 2 ] == (wchar_t) '.' )
4280 && ( path[ 3 ] == (wchar_t) '\\' ) )
4281 {
4282 libcerror_error_set(
4283 error,
4284 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
4285 LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,
4286 "%s: unsupported path.",
4287 function );
4288
4289 return( -1 );
4290 }
4291 else
4292 {
4293 /* Determine the volume in an UNC path
4294 * \\server\share
4295 */
4296 for( share_name_index = 2;
4297 share_name_index < path_size;
4298 share_name_index++ )
4299 {
4300 if( path[ share_name_index ] == (wchar_t) '\\' )
4301 {
4302 break;
4303 }
4304 }
4305 if( share_name_index >= path_size )
4306 {
4307 libcerror_error_set(
4308 error,
4309 LIBCERROR_ERROR_DOMAIN_RUNTIME,
4310 LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,
4311 "%s: invalid path - missing share name.",
4312 function );
4313
4314 return( -1 );
4315 }
4316 for( path_index = share_name_index + 1;
4317 path_index < path_size;
4318 path_index++ )
4319 {
4320 if( path[ path_index ] == (wchar_t) '\\' )
4321 {
4322 break;
4323 }
4324 }
4325 if( *volume_name == NULL )
4326 {
4327 *volume_name = (wchar_t *) &( path[ 2 ] );
4328
4329 if( path_index == path_size )
4330 {
4331 *volume_name_length = path_index - 3;
4332 }
4333 else
4334 {
4335 *volume_name_length = path_index - 2;
4336 }
4337 }
4338 *directory_name_index = path_index;
4339 }
4340 }
4341 }
4342 return( 1 );
4343 }
35604344
35614345 /* Determines the full path of the Windows path specified
35624346 * The function uses the extended-length path format
35894373 {
35904374 libcsplit_wide_split_string_t *current_directory_split_string = NULL;
35914375 libcsplit_wide_split_string_t *path_split_string = NULL;
3592 wchar_t *change_volume_name = NULL;
3593 wchar_t *current_working_directory = NULL;
35944376 wchar_t *current_directory = NULL;
35954377 wchar_t *current_directory_string_segment = NULL;
35964378 wchar_t *full_path_prefix = NULL;
35974379 wchar_t *last_used_path_string_segment = NULL;
35984380 wchar_t *path_string_segment = NULL;
3599 const wchar_t *volume_name = NULL;
4381 wchar_t *volume_name = NULL;
36004382 static char *function = "libcpath_path_get_full_path_wide";
4383 size_t current_directory_length = 0;
36014384 size_t current_directory_name_index = 0;
36024385 size_t current_directory_size = 0;
36034386 size_t current_directory_string_segment_size = 0;
3604 size_t current_working_directory_size = 0;
36054387 size_t full_path_index = 0;
36064388 size_t full_path_prefix_length = 0;
36074389 size_t last_used_path_string_segment_size = 0;
36084390 size_t path_directory_name_index = 0;
36094391 size_t path_string_segment_size = 0;
4392 size_t safe_full_path_size = 0;
36104393 size_t share_name_index = 0;
36114394 size_t volume_name_length = 0;
36124395 uint8_t path_type = LIBCPATH_TYPE_RELATIVE;
36134396 int current_directory_number_of_segments = 0;
36144397 int current_directory_segment_index = 0;
3615 int error_abort = 0;
36164398 int last_used_path_segment_index = -1;
36174399 int path_number_of_segments = 0;
36184400 int path_segment_index = 0;
36394421
36404422 return( -1 );
36414423 }
3642 if( path_length >= (size_t) SSIZE_MAX )
4424 if( path_length > (size_t) ( SSIZE_MAX - 1 ) )
36434425 {
36444426 libcerror_error_set(
36454427 error,
36834465
36844466 return( -1 );
36854467 }
3686 if( ( path_length == 2 )
3687 && ( path[ 1 ] == (wchar_t) '\\' ) )
3688 {
3689 path_type = LIBCPATH_TYPE_ABSOLUTE;
3690 }
3691 else if( path_length >= 2 )
3692 {
3693 /* Check if the path starts with a volume letter
3694 */
3695 if( ( path[ 1 ] == (wchar_t) ':' )
3696 && ( ( ( path[ 0 ] >= (wchar_t) 'A' )
3697 && ( path[ 0 ] <= (wchar_t) 'Z' ) )
3698 || ( ( path[ 0 ] >= (wchar_t) 'a' )
3699 && ( path[ 0 ] <= (wchar_t) 'z' ) ) ) )
3700 {
3701 volume_name = &( path[ 0 ] );
3702 volume_name_length = 2;
3703 path_directory_name_index = 2;
3704
3705 if( ( path_length >= 3 )
3706 && ( path[ 2 ] == (wchar_t) '\\' ) )
3707 {
3708 path_type = LIBCPATH_TYPE_ABSOLUTE;
3709 path_directory_name_index += 1;
3710 }
3711 }
3712 /* Check for special paths
3713 * paths with prefix: \\
3714 */
3715 else if( ( path[ 0 ] == (wchar_t) '\\' )
3716 && ( path[ 1 ] == (wchar_t) '\\' ) )
3717 {
3718 /* Determine if the path is a special path
3719 * device path prefix: \\.\
3720 * extended-length path prefix: \\?\
3721 */
3722 if( ( path_length >= 4 )
3723 && ( ( path[ 2 ] == (wchar_t) '.' )
3724 || ( path[ 2 ] == (wchar_t) '?' ) )
3725 && ( path[ 3 ] == (wchar_t) '\\' ) )
3726 {
3727 if( path[ 2 ] == (wchar_t) '.' )
3728 {
3729 path_type = LIBCPATH_TYPE_DEVICE;
3730 }
3731 else
3732 {
3733 path_type = LIBCPATH_TYPE_EXTENDED_LENGTH;
3734 }
3735 path_directory_name_index = 4;
3736 }
3737 else
3738 {
3739 /* Determine the volume in an UNC path
3740 * \\server\share
3741 */
3742 for( share_name_index = 2;
3743 share_name_index <= path_length;
3744 share_name_index++ )
3745 {
3746 if( path[ share_name_index ] == (wchar_t) '\\' )
3747 {
3748 break;
3749 }
3750 }
3751 if( share_name_index > path_length )
3752 {
3753 libcerror_error_set(
3754 error,
3755 LIBCERROR_ERROR_DOMAIN_RUNTIME,
3756 LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,
3757 "%s: invalid path - missing share name.",
3758 function );
3759
3760 goto on_error;
3761 }
3762 for( path_directory_name_index = share_name_index + 1;
3763 path_directory_name_index <= path_length;
3764 path_directory_name_index++ )
3765 {
3766 if( path[ path_directory_name_index ] == (wchar_t) '\\' )
3767 {
3768 break;
3769 }
3770 }
3771 path_type = LIBCPATH_TYPE_UNC;
3772 volume_name = &( path[ 2 ] );
3773 volume_name_length = path_directory_name_index - 2;
3774 }
3775 }
3776 /* Check for absolue paths
3777 */
3778 else if( path[ 0 ] == (wchar_t) '\\' )
3779 {
3780 path_type = LIBCPATH_TYPE_ABSOLUTE;
3781 }
4468 if( libcpath_path_get_volume_name_and_path_type_wide(
4469 path,
4470 path_length,
4471 &volume_name,
4472 &volume_name_length,
4473 &path_directory_name_index,
4474 &path_type,
4475 error ) != 1 )
4476 {
4477 libcerror_error_set(
4478 error,
4479 LIBCERROR_ERROR_DOMAIN_RUNTIME,
4480 LIBCERROR_RUNTIME_ERROR_GET_FAILED,
4481 "%s: unable to determine volume name and path type.",
4482 function );
4483
4484 goto on_error;
37824485 }
37834486 /* If the path is a device path, an extended-length path or an UNC
37844487 * do not bother to lookup the current directory
37874490 && ( path_type != LIBCPATH_TYPE_EXTENDED_LENGTH )
37884491 && ( path_type != LIBCPATH_TYPE_UNC ) )
37894492 {
3790 /* If the path contains a volume name switch to that
3791 * volume to determine the current directory
3792 */
3793 if( volume_name != NULL )
3794 {
3795 if( libcpath_path_get_current_working_directory_wide(
3796 &current_working_directory,
3797 &current_working_directory_size,
3798 error ) != 1 )
3799 {
3800 libcerror_error_set(
3801 error,
3802 LIBCERROR_ERROR_DOMAIN_RUNTIME,
3803 LIBCERROR_RUNTIME_ERROR_GET_FAILED,
3804 "%s: unable to retrieve current working directory.",
3805 function );
3806
3807 goto on_error;
3808 }
3809 change_volume_name = libcstring_wide_string_allocate(
3810 volume_name_length + 1 );
3811
3812 if( change_volume_name == NULL )
3813 {
3814 libcerror_error_set(
3815 error,
3816 LIBCERROR_ERROR_DOMAIN_MEMORY,
3817 LIBCERROR_MEMORY_ERROR_INSUFFICIENT,
3818 "%s: unable to create change volume name.",
3819 function );
3820
3821 goto on_error;
3822 }
3823 if( libcstring_wide_string_copy(
3824 change_volume_name,
3825 volume_name,
3826 volume_name_length ) == NULL )
3827 {
3828 libcerror_error_set(
3829 error,
3830 LIBCERROR_ERROR_DOMAIN_MEMORY,
3831 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
3832 "%s: unable to set change volume name.",
3833 function );
3834
3835 goto on_error;
3836 }
3837 change_volume_name[ volume_name_length ] = 0;
3838
3839 if( libcpath_path_change_directory_wide(
3840 change_volume_name,
3841 error ) != 1 )
3842 {
3843 libcerror_error_set(
3844 error,
3845 LIBCERROR_ERROR_DOMAIN_RUNTIME,
3846 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
3847 "%s: unable to change current working directory.",
3848 function );
3849
3850 goto on_error;
3851 }
3852 memory_free(
3853 change_volume_name );
3854
3855 change_volume_name = NULL;
3856 }
3857 if( libcpath_path_get_current_working_directory_wide(
4493 if( libcpath_path_get_current_working_directory_by_volume_wide(
4494 volume_name,
4495 volume_name_length,
38584496 &current_directory,
38594497 &current_directory_size,
38604498 error ) != 1 )
38634501 error,
38644502 LIBCERROR_ERROR_DOMAIN_RUNTIME,
38654503 LIBCERROR_RUNTIME_ERROR_GET_FAILED,
3866 "%s: unable to retrieve current directory.",
4504 "%s: unable to retrieve current directory by volume.",
38674505 function );
38684506
3869 error_abort = 1;
3870 }
3871 if( current_working_directory != NULL )
3872 {
3873 if( libcpath_path_change_directory_wide(
3874 current_working_directory,
3875 error ) != 1 )
3876 {
3877 libcerror_error_set(
3878 error,
3879 LIBCERROR_ERROR_DOMAIN_RUNTIME,
3880 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
3881 "%s: unable to change current working directory.",
3882 function );
3883
3884 goto on_error;
3885 }
3886 memory_free(
3887 current_working_directory );
3888
3889 current_working_directory = NULL;
3890 }
3891 /* Make sure the current working directory has been changed
3892 * back to its original value
3893 */
3894 if( error_abort != 0 )
3895 {
38964507 goto on_error;
38974508 }
38984509 /* Determine the volume name using the current directory if necessary
38994510 */
3900 if( current_directory_size >= 3 )
3901 {
3902 if( current_directory == NULL )
3903 {
3904 libcerror_error_set(
3905 error,
3906 LIBCERROR_ERROR_DOMAIN_RUNTIME,
3907 LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,
3908 "%s: missing current directory.",
3909 function );
3910
3911 goto on_error;
3912 }
3913 /* Check if the path starts with a volume letter
3914 */
3915 if( ( current_directory[ 1 ] == (wchar_t) ':' )
3916 && ( ( ( current_directory[ 0 ] >= (wchar_t) 'A' )
3917 && ( current_directory[ 0 ] <= (wchar_t) 'Z' ) )
3918 || ( ( current_directory[ 0 ] >= (wchar_t) 'a' )
3919 && ( current_directory[ 0 ] <= (wchar_t) 'z' ) ) ) )
3920 {
3921 if( volume_name == NULL )
3922 {
3923 volume_name = &( current_directory[ 0 ] );
3924 volume_name_length = 2;
3925 }
3926 current_directory_name_index = 2;
3927
3928 if( current_directory[ 2 ] == (wchar_t) '\\' )
3929 {
3930 current_directory_name_index += 1;
3931 }
3932 }
3933 /* Check for special paths
3934 * paths with prefix: \\
3935 */
3936 else if( ( current_directory[ 0 ] == (wchar_t) '\\' )
3937 && ( current_directory[ 1 ] == (wchar_t) '\\' ) )
3938 {
3939 /* Ignore the following special paths
3940 * device path prefix: \\.\
3941 */
3942 if( ( current_directory_size >= 4 )
3943 && ( current_directory[ 2 ] == (wchar_t) '.' )
3944 && ( current_directory[ 3 ] == (wchar_t) '\\' ) )
3945 {
3946 libcerror_error_set(
3947 error,
3948 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
3949 LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,
3950 "%s: unsupported current directory.",
3951 function );
3952
3953 return( -1 );
3954 }
3955 else
3956 {
3957 /* Determine the volume in an UNC path
3958 * \\server\share
3959 */
3960 for( share_name_index = 2;
3961 share_name_index < current_directory_size;
3962 share_name_index++ )
3963 {
3964 if( current_directory[ share_name_index ] == (wchar_t) '\\' )
3965 {
3966 break;
3967 }
3968 }
3969 if( share_name_index >= current_directory_size )
3970 {
3971 libcerror_error_set(
3972 error,
3973 LIBCERROR_ERROR_DOMAIN_RUNTIME,
3974 LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,
3975 "%s: invalid path - missing share name.",
3976 function );
3977
3978 goto on_error;
3979 }
3980 for( current_directory_name_index = share_name_index + 1;
3981 current_directory_name_index < current_directory_size;
3982 current_directory_name_index++ )
3983 {
3984 if( current_directory[ current_directory_name_index ] == (wchar_t) '\\' )
3985 {
3986 break;
3987 }
3988 }
3989 if( volume_name == NULL )
3990 {
3991 volume_name = &( current_directory[ 2 ] );
3992
3993 if( current_directory_name_index == current_directory_size )
3994 {
3995 volume_name_length = current_directory_name_index - 3;
3996 }
3997 else
3998 {
3999 volume_name_length = current_directory_name_index - 2;
4000 }
4001 }
4002 }
4003 }
4511 if( libcpath_path_get_volume_name_wide(
4512 current_directory,
4513 current_directory_size,
4514 &volume_name,
4515 &volume_name_length,
4516 &current_directory_name_index,
4517 error ) != 1 )
4518 {
4519 libcerror_error_set(
4520 error,
4521 LIBCERROR_ERROR_DOMAIN_RUNTIME,
4522 LIBCERROR_RUNTIME_ERROR_GET_FAILED,
4523 "%s: unable to retrieve current directory by volume.",
4524 function );
4525
4526 goto on_error;
40044527 }
40054528 }
40064529 if( ( current_directory != NULL )
40074530 && ( current_directory_name_index < current_directory_size ) )
40084531 {
4532 current_directory_length = wide_string_length(
4533 &( current_directory[ current_directory_name_index ] ) );
4534
40094535 if( libcsplit_wide_string_split(
40104536 &( current_directory[ current_directory_name_index ] ),
4011 libcstring_wide_string_length(
4012 &( current_directory[ current_directory_name_index ] ) ) + 1,
4537 current_directory_length + 1,
40134538 (wchar_t) '\\',
40144539 &current_directory_split_string,
40154540 error ) != 1 )
40454570 * the length of the volume name
40464571 * a directory separator
40474572 */
4048 *full_path_size = 4;
4573 safe_full_path_size = 4;
40494574
40504575 /* If the path contains a volume name
40514576 * the length of the volume name
40534578 */
40544579 if( volume_name != NULL )
40554580 {
4056 *full_path_size += volume_name_length + 1;
4581 safe_full_path_size += volume_name_length + 1;
40574582 }
40584583 /* If the path contains an UNC path
40594584 * add the size of the UNC\ prefix
40604585 */
40614586 if( share_name_index > 0 )
40624587 {
4063 *full_path_size += 4;
4588 safe_full_path_size += 4;
40644589 }
40654590 /* If the path is relative
40664591 * add the size of the current directory
40694594 if( ( path_type == LIBCPATH_TYPE_RELATIVE )
40704595 && ( current_directory_name_index < current_directory_size ) )
40714596 {
4072 *full_path_size += ( current_directory_size - ( current_directory_name_index + 1 ) );
4597 safe_full_path_size += ( current_directory_size - ( current_directory_name_index + 1 ) );
40734598
40744599 if( ( current_directory_size >= 2 )
40754600 && ( current_directory[ current_directory_size - 2 ] != (wchar_t) '\\' ) )
40764601 {
4077 *full_path_size += 1;
4602 safe_full_path_size += 1;
40784603 }
40794604 }
40804605 if( current_directory_split_string != NULL )
41834708 /* Remove the size of the parent directory name and a directory separator
41844709 * Note that the size includes the end of string character
41854710 */
4186 *full_path_size -= current_directory_string_segment_size;
4711 safe_full_path_size -= current_directory_string_segment_size;
41874712
41884713 if( libcsplit_wide_split_string_set_segment_by_index(
41894714 current_directory_split_string,
42384763 /* Remove the size of the parent directory name and a directory separator
42394764 * Note that the size includes the end of string character
42404765 */
4241 *full_path_size -= last_used_path_string_segment_size;
4766 safe_full_path_size -= last_used_path_string_segment_size;
42424767
42434768 if( libcsplit_wide_split_string_set_segment_by_index(
42444769 path_split_string,
43544879 /* Add the size of the directory or file name and a directory separator
43554880 * Note that the size includes the end of string character
43564881 */
4357 *full_path_size += path_string_segment_size;
4882 safe_full_path_size += path_string_segment_size;
43584883
43594884 last_used_path_segment_index = path_segment_index;
43604885 }
43634888 */
43644889 full_path_index = 0;
43654890
4366 *full_path = libcstring_wide_string_allocate(
4367 *full_path_size );
4891 *full_path = wide_string_allocate(
4892 safe_full_path_size );
43684893
43694894 if( *full_path == NULL )
43704895 {
43804905 if( memory_set(
43814906 *full_path,
43824907 0,
4383 sizeof( wchar_t ) * *full_path_size ) == NULL )
4908 sizeof( wchar_t ) * safe_full_path_size ) == NULL )
43844909 {
43854910 libcerror_error_set(
43864911 error,
43914916
43924917 goto on_error;
43934918 }
4919 *full_path_size = safe_full_path_size;
4920
43944921 if( path_type == LIBCPATH_TYPE_DEVICE )
43954922 {
43964923 full_path_prefix = L"\\\\.\\";
44014928 full_path_prefix = L"\\\\?\\";
44024929 full_path_prefix_length = 4;
44034930 }
4404 if( libcstring_wide_string_copy(
4931 if( wide_string_copy(
44054932 &( ( *full_path )[ full_path_index ] ),
44064933 full_path_prefix,
44074934 full_path_prefix_length ) == NULL )
44214948 */
44224949 if( share_name_index > 0 )
44234950 {
4424 if( libcstring_wide_string_copy(
4951 if( wide_string_copy(
44254952 &( ( *full_path )[ full_path_index ] ),
44264953 L"UNC\\",
44274954 4 ) == NULL )
44394966 }
44404967 if( volume_name != NULL )
44414968 {
4442 if( libcstring_wide_string_copy(
4969 if( wide_string_copy(
44434970 &( ( *full_path )[ full_path_index ] ),
44444971 volume_name,
44454972 volume_name_length ) == NULL )
45005027
45015028 goto on_error;
45025029 }
4503 if( libcstring_wide_string_copy(
5030 if( wide_string_copy(
45045031 &( ( *full_path )[ full_path_index ] ),
45055032 current_directory_string_segment,
45065033 current_directory_string_segment_size - 1 ) == NULL )
45585085
45595086 goto on_error;
45605087 }
4561 if( libcstring_wide_string_copy(
5088 if( wide_string_copy(
45625089 &( ( *full_path )[ full_path_index ] ),
45635090 path_string_segment,
45645091 path_string_segment_size - 1 ) == NULL )
46445171 {
46455172 memory_free(
46465173 current_directory );
4647 }
4648 if( change_volume_name != NULL )
4649 {
4650 memory_free(
4651 change_volume_name );
4652 }
4653 if( current_working_directory != NULL )
4654 {
4655 memory_free(
4656 current_working_directory );
46575174 }
46585175 return( -1 );
46595176 }
46865203 wchar_t *last_used_path_string_segment = NULL;
46875204 wchar_t *path_string_segment = NULL;
46885205 static char *function = "libcpath_path_get_full_path_wide";
5206 size_t current_directory_length = 0;
46895207 size_t current_directory_size = 0;
46905208 size_t current_directory_string_segment_size = 0;
46915209 size_t full_path_index = 0;
46925210 size_t last_used_path_string_segment_size = 0;
46935211 size_t path_string_segment_size = 0;
5212 size_t safe_full_path_size = 0;
46945213 uint8_t path_type = LIBCPATH_TYPE_RELATIVE;
46955214 int current_directory_number_of_segments = 0;
46965215 int current_directory_segment_index = 0;
47205239
47215240 return( -1 );
47225241 }
4723 if( path_length >= (size_t) SSIZE_MAX )
5242 if( path_length > (size_t) ( SSIZE_MAX - 1 ) )
47245243 {
47255244 libcerror_error_set(
47265245 error,
47875306 }
47885307 if( current_directory != NULL )
47895308 {
5309 current_directory_length = wide_string_length(
5310 current_directory );
5311
47905312 if( libcsplit_wide_string_split(
47915313 current_directory,
4792 libcstring_wide_string_length(
4793 current_directory ) + 1,
5314 current_directory_length + 1,
47945315 (wchar_t) '/',
47955316 &current_directory_split_string,
47965317 error ) != 1 )
48285349 */
48295350 if( path_type == LIBCPATH_TYPE_ABSOLUTE )
48305351 {
4831 *full_path_size = 1;
5352 safe_full_path_size = 1;
48325353 }
48335354 /* If the path is relative
48345355 * add the size of the current directory
48475368
48485369 goto on_error;
48495370 }
4850 *full_path_size = current_directory_size - 1;
5371 safe_full_path_size = current_directory_size - 1;
48515372
48525373 if( ( current_directory_size >= 2 )
48535374 && ( current_directory[ current_directory_size - 2 ] != (wchar_t) '/' ) )
48545375 {
4855 *full_path_size += 1;
5376 safe_full_path_size++;
48565377 }
48575378 }
48585379 if( current_directory_split_string != NULL )
49615482 /* Remove the size of the parent directory name and a directory separator
49625483 * Note that the size includes the end of string character
49635484 */
4964 *full_path_size -= current_directory_string_segment_size;
5485 safe_full_path_size -= current_directory_string_segment_size;
49655486
49665487 if( libcsplit_wide_split_string_set_segment_by_index(
49675488 current_directory_split_string,
50165537 /* Remove the size of the parent directory name and a directory separator
50175538 * Note that the size includes the end of string character
50185539 */
5019 *full_path_size -= last_used_path_string_segment_size;
5540 safe_full_path_size -= last_used_path_string_segment_size;
50205541
50215542 if( libcsplit_wide_split_string_set_segment_by_index(
50225543 path_split_string,
51325653 /* Add the size of the directory or file name and a directory separator
51335654 * Note that the size includes the end of string character
51345655 */
5135 *full_path_size += path_string_segment_size;
5656 safe_full_path_size += path_string_segment_size;
51365657
51375658 last_used_path_segment_index = path_segment_index;
51385659 }
51415662 */
51425663 full_path_index = 0;
51435664
5144 *full_path = libcstring_wide_string_allocate(
5145 *full_path_size );
5665 *full_path = wide_string_allocate(
5666 safe_full_path_size );
51465667
51475668 if( *full_path == NULL )
51485669 {
51555676
51565677 goto on_error;
51575678 }
5679 if( memory_set(
5680 *full_path,
5681 0,
5682 sizeof( wchar_t ) * safe_full_path_size ) == NULL )
5683 {
5684 libcerror_error_set(
5685 error,
5686 LIBCERROR_ERROR_DOMAIN_MEMORY,
5687 LIBCERROR_MEMORY_ERROR_SET_FAILED,
5688 "%s: unable to clear full path.",
5689 function );
5690
5691 goto on_error;
5692 }
5693 *full_path_size = safe_full_path_size;
5694
51585695 if( path_type == LIBCPATH_TYPE_ABSOLUTE )
51595696 {
51605697 ( *full_path )[ full_path_index ] = (wchar_t) '/';
52025739
52035740 goto on_error;
52045741 }
5205 if( libcstring_wide_string_copy(
5742 if( wide_string_copy(
52065743 &( ( *full_path )[ full_path_index ] ),
52075744 current_directory_string_segment,
52085745 current_directory_string_segment_size - 1 ) == NULL )
52605797
52615798 goto on_error;
52625799 }
5263 if( libcstring_wide_string_copy(
5800 if( wide_string_copy(
52645801 &( ( *full_path )[ full_path_index ] ),
52655802 path_string_segment,
52665803 path_string_segment_size - 1 ) == NULL )
53515888 }
53525889
53535890 #endif /* defined( WINAPI ) */
5891
5892 /* Retrieves a sanitized version of the filename
5893 * Returns 1 if successful or -1 on error
5894 */
5895 int libcpath_path_get_sanitized_filename_wide(
5896 const wchar_t *filename,
5897 size_t filename_size,
5898 wchar_t **sanitized_filename,
5899 size_t *sanitized_filename_size,
5900 libcerror_error_t **error )
5901 {
5902 static char *function = "libcpath_path_get_sanitized_filename_wide";
5903
5904 if( sanitized_filename == NULL )
5905 {
5906 libcerror_error_set(
5907 error,
5908 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
5909 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
5910 "%s: invalid sanitized filename.",
5911 function );
5912
5913 return( -1 );
5914 }
5915 if( *sanitized_filename != NULL )
5916 {
5917 libcerror_error_set(
5918 error,
5919 LIBCERROR_ERROR_DOMAIN_RUNTIME,
5920 LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,
5921 "%s: invalid sanitized filename value already set.",
5922 function );
5923
5924 return( -1 );
5925 }
5926 if( sanitized_filename_size == NULL )
5927 {
5928 libcerror_error_set(
5929 error,
5930 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
5931 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
5932 "%s: invalid sanitized filename size.",
5933 function );
5934
5935 return( -1 );
5936 }
5937 /* TODO implement */
5938 return( -1 );
5939 }
5940
5941 /* Retrieves a sanitized version of the path
5942 * Returns 1 if successful or -1 on error
5943 */
5944 int libcpath_path_get_sanitized_path_wide(
5945 const wchar_t *path,
5946 size_t path_size,
5947 wchar_t **sanitized_path,
5948 size_t *sanitized_path_size,
5949 libcerror_error_t **error )
5950 {
5951 static char *function = "libcpath_path_get_sanitized_path_wide";
5952
5953 if( sanitized_path == NULL )
5954 {
5955 libcerror_error_set(
5956 error,
5957 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
5958 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
5959 "%s: invalid sanitized path.",
5960 function );
5961
5962 return( -1 );
5963 }
5964 if( *sanitized_path != NULL )
5965 {
5966 libcerror_error_set(
5967 error,
5968 LIBCERROR_ERROR_DOMAIN_RUNTIME,
5969 LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,
5970 "%s: invalid sanitized path value already set.",
5971 function );
5972
5973 return( -1 );
5974 }
5975 if( sanitized_path_size == NULL )
5976 {
5977 libcerror_error_set(
5978 error,
5979 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
5980 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
5981 "%s: invalid sanitized path size.",
5982 function );
5983
5984 return( -1 );
5985 }
5986 /* TODO implement */
5987 return( -1 );
5988 }
53545989
53555990 /* Combines the directory name and filename into a path
53565991 * Returns 1 if successful or -1 on error
53656000 libcerror_error_t **error )
53666001 {
53676002 static char *function = "libcpath_path_join_wide";
6003 size_t filename_index = 0;
53686004 size_t path_index = 0;
53696005
53706006 if( path == NULL )
54446080
54456081 return( -1 );
54466082 }
5447 *path_size = directory_name_length + filename_length + 1;
5448
5449 if( directory_name[ directory_name_length ] != (wchar_t) LIBCPATH_SEPARATOR )
5450 {
5451 *path_size += 1;
5452 }
5453 *path = libcstring_wide_string_allocate(
6083 /* TODO strip other patterns like /./ */
6084 while( directory_name_length > 0 )
6085 {
6086 if( directory_name[ directory_name_length - 1 ] != (wchar_t) LIBCPATH_SEPARATOR )
6087 {
6088 break;
6089 }
6090 directory_name_length--;
6091 }
6092 while( filename_length > 0 )
6093 {
6094 if( filename[ filename_index ] != (wchar_t) LIBCPATH_SEPARATOR )
6095 {
6096 break;
6097 }
6098 filename_index++;
6099 filename_length--;
6100 }
6101 *path_size = directory_name_length + filename_length + 2;
6102
6103 *path = wide_string_allocate(
54546104 *path_size );
54556105
54566106 if( *path == NULL )
54646114
54656115 goto on_error;
54666116 }
5467 if( libcstring_wide_string_copy(
6117 if( wide_string_copy(
54686118 *path,
54696119 directory_name,
54706120 directory_name_length ) == NULL )
54826132
54836133 ( *path )[ path_index++ ] = (wchar_t) LIBCPATH_SEPARATOR;
54846134
5485 if( libcstring_wide_string_copy(
6135 if( wide_string_copy(
54866136 &( ( *path )[ path_index ] ),
5487 filename,
6137 &( filename[ filename_index ] ),
54886138 filename_length ) == NULL )
54896139 {
54906140 libcerror_error_set(
55336183 return( 0 );
55346184 }
55356185 library_handle = LoadLibrary(
5536 _LIBCSTRING_SYSTEM_STRING( "kernel32.dll" ) );
6186 _SYSTEM_STRING( "kernel32.dll" ) );
55376187
55386188 if( library_handle == NULL )
55396189 {
56296279 char *narrow_directory_name = 0;
56306280 size_t directory_name_length = 0;
56316281 size_t narrow_directory_name_size = 0;
5632 int result = 0;
56336282
56346283 if( directory_name == NULL )
56356284 {
56426291
56436292 return( -1 );
56446293 }
5645 directory_name_length = libcstring_wide_string_length(
6294 directory_name_length = wide_string_length(
56466295 directory_name );
56476296
5648 if( libclocale_codepage == 0 )
5649 {
5650 #if SIZEOF_WCHAR_T == 4
5651 result = libuna_utf8_string_size_from_utf32(
5652 (libuna_utf32_character_t *) directory_name,
5653 directory_name_length + 1,
5654 &narrow_directory_name_size,
5655 error );
5656 #elif SIZEOF_WCHAR_T == 2
5657 result = libuna_utf8_string_size_from_utf16(
5658 (libuna_utf16_character_t *) directory_name,
5659 directory_name_length + 1,
5660 &narrow_directory_name_size,
5661 error );
5662 #else
5663 #error Unsupported size of wchar_t
5664 #endif /* SIZEOF_WCHAR_T */
5665 }
5666 else
5667 {
5668 #if SIZEOF_WCHAR_T == 4
5669 result = libuna_byte_stream_size_from_utf32(
5670 (libuna_utf32_character_t *) directory_name,
5671 directory_name_length + 1,
5672 libclocale_codepage,
5673 &narrow_directory_name_size,
5674 error );
5675 #elif SIZEOF_WCHAR_T == 2
5676 result = libuna_byte_stream_size_from_utf16(
5677 (libuna_utf16_character_t *) directory_name,
5678 directory_name_length + 1,
5679 libclocale_codepage,
5680 &narrow_directory_name_size,
5681 error );
5682 #else
5683 #error Unsupported size of wchar_t
5684 #endif /* SIZEOF_WCHAR_T */
5685 }
5686 if( result != 1 )
6297 if( libcpath_system_string_size_from_wide_string(
6298 directory_name,
6299 directory_name_length + 1,
6300 &narrow_directory_name_size,
6301 error ) != 1 )
56876302 {
56886303 libcerror_error_set(
56896304 error,
57066321
57076322 goto on_error;
57086323 }
5709 narrow_directory_name = libcstring_narrow_string_allocate(
6324 narrow_directory_name = narrow_string_allocate(
57106325 narrow_directory_name_size );
57116326
57126327 if( narrow_directory_name == NULL )
57206335
57216336 goto on_error;
57226337 }
5723 if( libclocale_codepage == 0 )
5724 {
5725 #if SIZEOF_WCHAR_T == 4
5726 result = libuna_utf8_string_copy_from_utf32(
5727 (libuna_utf8_character_t *) narrow_directory_name,
5728 narrow_directory_name_size,
5729 (libuna_utf32_character_t *) directory_name,
5730 directory_name_length + 1,
5731 error );
5732 #elif SIZEOF_WCHAR_T == 2
5733 result = libuna_utf8_string_copy_from_utf16(
5734 (libuna_utf8_character_t *) narrow_directory_name,
5735 narrow_directory_name_size,
5736 (libuna_utf16_character_t *) directory_name,
5737 directory_name_length + 1,
5738 error );
5739 #else
5740 #error Unsupported size of wchar_t
5741 #endif /* SIZEOF_WCHAR_T */
5742 }
5743 else
5744 {
5745 #if SIZEOF_WCHAR_T == 4
5746 result = libuna_byte_stream_copy_from_utf32(
5747 (uint8_t *) narrow_directory_name,
5748 narrow_directory_name_size,
5749 libclocale_codepage,
5750 (libuna_utf32_character_t *) directory_name,
5751 directory_name_length + 1,
5752 error );
5753 #elif SIZEOF_WCHAR_T == 2
5754 result = libuna_byte_stream_copy_from_utf16(
5755 (uint8_t *) narrow_directory_name,
5756 narrow_directory_name_size,
5757 libclocale_codepage,
5758 (libuna_utf16_character_t *) directory_name,
5759 directory_name_length + 1,
5760 error );
5761 #else
5762 #error Unsupported size of wchar_t
5763 #endif /* SIZEOF_WCHAR_T */
5764 }
5765 if( result != 1 )
6338 if( libcpath_system_string_copy_from_wide_string(
6339 narrow_directory_name,
6340 narrow_directory_name_size,
6341 directory_name,
6342 directory_name_length + 1,
6343 error ) != 1 )
57666344 {
57676345 libcerror_error_set(
57686346 error,
00 /*
11 * Path functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2626
2727 #include "libcpath_extern.h"
2828 #include "libcpath_libcerror.h"
29 #include "libcpath_libcstring.h"
3029
3130 #if defined( __cplusplus )
3231 extern "C" {
6867 libcerror_error_t **error );
6968
7069 LIBCPATH_EXTERN \
70 int libcpath_path_get_sanitized_filename(
71 const char *filename,
72 size_t filename_size,
73 char **sanitized_filename,
74 size_t *sanitized_filename_size,
75 libcerror_error_t **error );
76
77 LIBCPATH_EXTERN \
78 int libcpath_path_get_sanitized_path(
79 const char *path,
80 size_t path_size,
81 char **sanitized_path,
82 size_t *sanitized_path_size,
83 libcerror_error_t **error );
84
85 LIBCPATH_EXTERN \
7186 int libcpath_path_join(
7287 char **path,
7388 size_t *path_size,
88103 const char *directory_name,
89104 libcerror_error_t **error );
90105
106 /* TODO: deprecated remove */
91107 LIBCPATH_EXTERN \
92108 int libcpath_path_sanitize(
93109 char *path,
94110 size_t *path_size,
95111 libcerror_error_t **error );
96112
113 /* TODO: deprecated remove */
97114 LIBCPATH_EXTERN \
98115 int libcpath_path_sanitize_filename(
99116 char *filename,
133150 libcerror_error_t **error );
134151
135152 LIBCPATH_EXTERN \
153 int libcpath_path_get_sanitized_filename_wide(
154 const wchar_t *filename,
155 size_t filename_size,
156 wchar_t **sanitized_filename,
157 size_t *sanitized_filename_size,
158 libcerror_error_t **error );
159
160 LIBCPATH_EXTERN \
161 int libcpath_path_get_sanitized_path_wide(
162 const wchar_t *path,
163 size_t path_size,
164 wchar_t **sanitized_path,
165 size_t *sanitized_path_size,
166 libcerror_error_t **error );
167
168 LIBCPATH_EXTERN \
136169 int libcpath_path_join_wide(
137170 wchar_t **path,
138171 size_t *path_size,
153186 const wchar_t *directory_name,
154187 libcerror_error_t **error );
155188
189 /* TODO: deprecated remove */
156190 LIBCPATH_EXTERN \
157191 int libcpath_path_sanitize_wide(
158192 wchar_t *path,
159193 size_t *path_size,
160194 libcerror_error_t **error );
161195
196 /* TODO: deprecated remove */
162197 LIBCPATH_EXTERN \
163198 int libcpath_path_sanitize_filename_wide(
164199 wchar_t *filename,
171206 }
172207 #endif
173208
174 #endif
175
209 #endif /* !defined( _LIBCPATH_PATH_H ) */
210
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2323
2424 #include "libcpath_definitions.h"
2525 #include "libcpath_libcerror.h"
26 #include "libcpath_libcstring.h"
26 #include "libcpath_libclocale.h"
2727 #include "libcpath_support.h"
2828
2929 #if !defined( HAVE_LOCAL_LIBCPATH )
3636 return( (const char *) LIBCPATH_VERSION_STRING );
3737 }
3838
39 /* Retrieves the narrow system string codepage
40 * A value of 0 represents no codepage, UTF-8 encoding is used instead
41 * Returns 1 if successful or -1 on error
42 */
43 int libcpath_get_codepage(
44 int *codepage,
45 libcerror_error_t **error )
46 {
47 static char *function = "libcpath_get_codepage";
48
49 if( libclocale_codepage_get(
50 codepage,
51 error ) != 1 )
52 {
53 libcerror_error_set(
54 error,
55 LIBCERROR_ERROR_DOMAIN_RUNTIME,
56 LIBCERROR_RUNTIME_ERROR_GET_FAILED,
57 "%s: unable to retrieve codepage.",
58 function );
59
60 return( -1 );
61 }
62 return( 1 );
63 }
64
65 /* Sets the narrow system string codepage
66 * A value of 0 represents no codepage, UTF-8 encoding is used instead
67 * Returns 1 if successful or -1 on error
68 */
69 int libcpath_set_codepage(
70 int codepage,
71 libcerror_error_t **error )
72 {
73 static char *function = "libcpath_set_codepage";
74
75 if( libclocale_codepage_set(
76 codepage,
77 error ) != 1 )
78 {
79 libcerror_error_set(
80 error,
81 LIBCERROR_ERROR_DOMAIN_RUNTIME,
82 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
83 "%s: unable to set codepage.",
84 function );
85
86 return( -1 );
87 }
88 return( 1 );
89 }
90
3991 #endif /* !defined( HAVE_LOCAL_LIBCPATH ) */
4092
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 const char *libcpath_get_version(
3838 void );
3939
40 LIBCPATH_EXTERN \
41 int libcpath_get_codepage(
42 int *codepage,
43 libcerror_error_t **error );
44
45 LIBCPATH_EXTERN \
46 int libcpath_set_codepage(
47 int codepage,
48 libcerror_error_t **error );
49
4050 #endif /* !defined( HAVE_LOCAL_LIBCPATH ) */
4151
4252 #if defined( __cplusplus )
4353 }
4454 #endif
4555
46 #endif
56 #endif /* !defined( _LIBCPATH_SUPPORT_H ) */
4757
0 /*
1 * System string functions
2 *
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <memory.h>
23 #include <narrow_string.h>
24 #include <system_string.h>
25 #include <types.h>
26 #include <wide_string.h>
27
28 #include "libcpath_libcerror.h"
29 #include "libcpath_libclocale.h"
30 #include "libcpath_libuna.h"
31 #include "libcpath_system_string.h"
32
33 #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) && SIZEOF_WCHAR_T != 2 && SIZEOF_WCHAR_T != 4
34 #error Unsupported size of wchar_t
35 #endif
36
37 /* Determines the size of a narrow string from a system string
38 * Returns 1 if successful or -1 on error
39 */
40 int libcpath_system_string_size_to_narrow_string(
41 const system_character_t *system_string,
42 size_t system_string_size,
43 size_t *narrow_string_size,
44 libcerror_error_t **error )
45 {
46 static char *function = "libcpath_system_string_size_to_narrow_string";
47
48 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
49 int result = 0;
50 #endif
51
52 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
53 if( libclocale_codepage == 0 )
54 {
55 #if SIZEOF_WCHAR_T == 4
56 result = libuna_utf8_string_size_from_utf32(
57 (libuna_utf32_character_t *) system_string,
58 system_string_size,
59 narrow_string_size,
60 error );
61 #elif SIZEOF_WCHAR_T == 2
62 result = libuna_utf8_string_size_from_utf16(
63 (libuna_utf16_character_t *) system_string,
64 system_string_size,
65 narrow_string_size,
66 error );
67 #endif /* SIZEOF_WCHAR_T */
68 }
69 else
70 {
71 #if SIZEOF_WCHAR_T == 4
72 result = libuna_byte_stream_size_from_utf32(
73 (libuna_utf32_character_t *) system_string,
74 system_string_size,
75 libclocale_codepage,
76 narrow_string_size,
77 error );
78 #elif SIZEOF_WCHAR_T == 2
79 result = libuna_byte_stream_size_from_utf16(
80 (libuna_utf16_character_t *) system_string,
81 system_string_size,
82 libclocale_codepage,
83 narrow_string_size,
84 error );
85 #endif /* SIZEOF_WCHAR_T */
86 }
87 if( result != 1 )
88 {
89 libcerror_error_set(
90 error,
91 LIBCERROR_ERROR_DOMAIN_CONVERSION,
92 LIBCERROR_CONVERSION_ERROR_GENERIC,
93 "%s: unable to determine narrow string size.",
94 function );
95
96 return( -1 );
97 }
98 #else
99 if( system_string == NULL )
100 {
101 libcerror_error_set(
102 error,
103 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
104 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
105 "%s: invalid system string.",
106 function );
107
108 return( -1 );
109 }
110 if( system_string_size > (size_t) SSIZE_MAX )
111 {
112 libcerror_error_set(
113 error,
114 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
115 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
116 "%s: invalid system string size value exceeds maximum.",
117 function );
118
119 return( -1 );
120 }
121 if( narrow_string_size == NULL )
122 {
123 libcerror_error_set(
124 error,
125 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
126 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
127 "%s: invalid narrow string size.",
128 function );
129
130 return( -1 );
131 }
132 *narrow_string_size = system_string_size;
133
134 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
135
136 return( 1 );
137 }
138
139 /* Copies a system string to a narrow string
140 * Returns 1 if successful or -1 on error
141 */
142 int libcpath_system_string_copy_to_narrow_string(
143 const system_character_t *system_string,
144 size_t system_string_size,
145 char *narrow_string,
146 size_t narrow_string_size,
147 libcerror_error_t **error )
148 {
149 static char *function = "libcpath_system_string_copy_to_narrow_string";
150
151 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
152 int result = 0;
153 #endif
154
155 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
156 if( libclocale_codepage == 0 )
157 {
158 #if SIZEOF_WCHAR_T == 4
159 result = libuna_utf8_string_copy_from_utf32(
160 (libuna_utf8_character_t *) narrow_string,
161 narrow_string_size,
162 (libuna_utf32_character_t *) system_string,
163 system_string_size,
164 error );
165 #elif SIZEOF_WCHAR_T == 2
166 result = libuna_utf8_string_copy_from_utf16(
167 (libuna_utf8_character_t *) narrow_string,
168 narrow_string_size,
169 (libuna_utf16_character_t *) system_string,
170 system_string_size,
171 error );
172 #endif /* SIZEOF_WCHAR_T */
173 }
174 else
175 {
176 #if SIZEOF_WCHAR_T == 4
177 result = libuna_byte_stream_copy_from_utf32(
178 (uint8_t *) narrow_string,
179 narrow_string_size,
180 libclocale_codepage,
181 (libuna_utf32_character_t *) system_string,
182 system_string_size,
183 error );
184 #elif SIZEOF_WCHAR_T == 2
185 result = libuna_byte_stream_copy_from_utf16(
186 (uint8_t *) narrow_string,
187 narrow_string_size,
188 libclocale_codepage,
189 (libuna_utf16_character_t *) system_string,
190 system_string_size,
191 error );
192 #endif /* SIZEOF_WCHAR_T */
193 }
194 if( result != 1 )
195 {
196 libcerror_error_set(
197 error,
198 LIBCERROR_ERROR_DOMAIN_CONVERSION,
199 LIBCERROR_CONVERSION_ERROR_GENERIC,
200 "%s: unable to set narrow string.",
201 function );
202
203 return( -1 );
204 }
205 #else
206 if( system_string == NULL )
207 {
208 libcerror_error_set(
209 error,
210 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
211 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
212 "%s: invalid system string.",
213 function );
214
215 return( -1 );
216 }
217 if( system_string_size > (size_t) SSIZE_MAX )
218 {
219 libcerror_error_set(
220 error,
221 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
222 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
223 "%s: invalid system string size value exceeds maximum.",
224 function );
225
226 return( -1 );
227 }
228 if( narrow_string == NULL )
229 {
230 libcerror_error_set(
231 error,
232 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
233 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
234 "%s: invalid narrow string.",
235 function );
236
237 return( -1 );
238 }
239 if( narrow_string_size > (size_t) SSIZE_MAX )
240 {
241 libcerror_error_set(
242 error,
243 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
244 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
245 "%s: invalid narrow string size value exceeds maximum.",
246 function );
247
248 return( -1 );
249 }
250 if( narrow_string_size < system_string_size )
251 {
252 libcerror_error_set(
253 error,
254 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
255 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
256 "%s: invalid narrow string size value too small.",
257 function );
258
259 return( -1 );
260 }
261 if( system_string_copy(
262 narrow_string,
263 system_string,
264 system_string_size ) == NULL )
265 {
266 libcerror_error_set(
267 error,
268 LIBCERROR_ERROR_DOMAIN_MEMORY,
269 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
270 "%s: unable to set narrow string.",
271 function );
272
273 return( -1 );
274 }
275 narrow_string[ system_string_size - 1 ] = 0;
276
277 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
278
279 return( 1 );
280 }
281
282 /* Determines the size of a system string from a narrow string
283 * Returns 1 if successful or -1 on error
284 */
285 int libcpath_system_string_size_from_narrow_string(
286 const char *narrow_string,
287 size_t narrow_string_size,
288 size_t *system_string_size,
289 libcerror_error_t **error )
290 {
291 static char *function = "libcpath_system_string_size_from_narrow_string";
292
293 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
294 int result = 0;
295 #endif
296
297 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
298 if( libclocale_codepage == 0 )
299 {
300 #if SIZEOF_WCHAR_T == 4
301 result = libuna_utf32_string_size_from_utf8(
302 (libuna_utf8_character_t *) narrow_string,
303 narrow_string_size,
304 system_string_size,
305 error );
306 #elif SIZEOF_WCHAR_T == 2
307 result = libuna_utf16_string_size_from_utf8(
308 (libuna_utf8_character_t *) narrow_string,
309 narrow_string_size,
310 system_string_size,
311 error );
312 #endif /* SIZEOF_WCHAR_T */
313 }
314 else
315 {
316 #if SIZEOF_WCHAR_T == 4
317 result = libuna_utf32_string_size_from_byte_stream(
318 (uint8_t *) narrow_string,
319 narrow_string_size,
320 libclocale_codepage,
321 system_string_size,
322 error );
323 #elif SIZEOF_WCHAR_T == 2
324 result = libuna_utf16_string_size_from_byte_stream(
325 (uint8_t *) narrow_string,
326 narrow_string_size,
327 libclocale_codepage,
328 system_string_size,
329 error );
330 #endif /* SIZEOF_WCHAR_T */
331 }
332 if( result != 1 )
333 {
334 libcerror_error_set(
335 error,
336 LIBCERROR_ERROR_DOMAIN_CONVERSION,
337 LIBCERROR_CONVERSION_ERROR_GENERIC,
338 "%s: unable to determine system string size.",
339 function );
340
341 return( -1 );
342 }
343 #else
344 if( narrow_string == NULL )
345 {
346 libcerror_error_set(
347 error,
348 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
349 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
350 "%s: invalid narrow string.",
351 function );
352
353 return( -1 );
354 }
355 if( narrow_string_size > (size_t) SSIZE_MAX )
356 {
357 libcerror_error_set(
358 error,
359 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
360 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
361 "%s: invalid narrow string size value exceeds maximum.",
362 function );
363
364 return( -1 );
365 }
366 if( system_string_size == NULL )
367 {
368 libcerror_error_set(
369 error,
370 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
371 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
372 "%s: invalid system string size.",
373 function );
374
375 return( -1 );
376 }
377 *system_string_size = narrow_string_size;
378
379 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
380
381 return( 1 );
382 }
383
384 /* Copies a system string from a narrow string
385 * Returns 1 if successful or -1 on error
386 */
387 int libcpath_system_string_copy_from_narrow_string(
388 system_character_t *system_string,
389 size_t system_string_size,
390 const char *narrow_string,
391 size_t narrow_string_size,
392 libcerror_error_t **error )
393 {
394 static char *function = "libcpath_system_string_copy_from_narrow_string";
395
396 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
397 int result = 0;
398 #endif
399
400 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
401 if( libclocale_codepage == 0 )
402 {
403 #if SIZEOF_WCHAR_T == 4
404 result = libuna_utf32_string_copy_from_utf8(
405 (libuna_utf32_character_t *) system_string,
406 system_string_size,
407 (libuna_utf8_character_t *) narrow_string,
408 narrow_string_size,
409 error );
410 #elif SIZEOF_WCHAR_T == 2
411 result = libuna_utf16_string_copy_from_utf8(
412 (libuna_utf16_character_t *) system_string,
413 system_string_size,
414 (libuna_utf8_character_t *) narrow_string,
415 narrow_string_size,
416 error );
417 #endif /* SIZEOF_WCHAR_T */
418 }
419 else
420 {
421 #if SIZEOF_WCHAR_T == 4
422 result = libuna_utf32_string_copy_from_byte_stream(
423 (libuna_utf32_character_t *) system_string,
424 system_string_size,
425 (uint8_t *) narrow_string,
426 narrow_string_size,
427 libclocale_codepage,
428 error );
429 #elif SIZEOF_WCHAR_T == 2
430 result = libuna_utf16_string_copy_from_byte_stream(
431 (libuna_utf16_character_t *) system_string,
432 system_string_size,
433 (uint8_t *) narrow_string,
434 narrow_string_size,
435 libclocale_codepage,
436 error );
437 #endif /* SIZEOF_WCHAR_T */
438 }
439 if( result != 1 )
440 {
441 libcerror_error_set(
442 error,
443 LIBCERROR_ERROR_DOMAIN_CONVERSION,
444 LIBCERROR_CONVERSION_ERROR_GENERIC,
445 "%s: unable to set system string.",
446 function );
447
448 return( -1 );
449 }
450 #else
451 if( system_string == NULL )
452 {
453 libcerror_error_set(
454 error,
455 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
456 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
457 "%s: invalid system string.",
458 function );
459
460 return( -1 );
461 }
462 if( system_string_size > (size_t) SSIZE_MAX )
463 {
464 libcerror_error_set(
465 error,
466 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
467 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
468 "%s: invalid system string size value exceeds maximum.",
469 function );
470
471 return( -1 );
472 }
473 if( narrow_string == NULL )
474 {
475 libcerror_error_set(
476 error,
477 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
478 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
479 "%s: invalid narrow string.",
480 function );
481
482 return( -1 );
483 }
484 if( narrow_string_size > (size_t) SSIZE_MAX )
485 {
486 libcerror_error_set(
487 error,
488 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
489 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
490 "%s: invalid narrow string size value exceeds maximum.",
491 function );
492
493 return( -1 );
494 }
495 if( system_string_size < narrow_string_size )
496 {
497 libcerror_error_set(
498 error,
499 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
500 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
501 "%s: invalid system string size value too small.",
502 function );
503
504 return( -1 );
505 }
506 if( system_string_copy(
507 system_string,
508 narrow_string,
509 narrow_string_size ) == NULL )
510 {
511 libcerror_error_set(
512 error,
513 LIBCERROR_ERROR_DOMAIN_MEMORY,
514 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
515 "%s: unable to set narrow_string.",
516 function );
517
518 return( -1 );
519 }
520 system_string[ narrow_string_size - 1 ] = 0;
521
522 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
523
524 return( 1 );
525 }
526
527 #if defined( HAVE_WIDE_CHARACTER_TYPE )
528
529 /* Determines the size of a wide string from a system string
530 * Returns 1 if successful or -1 on error
531 */
532 int libcpath_system_string_size_to_wide_string(
533 const system_character_t *system_string,
534 size_t system_string_size,
535 size_t *wide_string_size,
536 libcerror_error_t **error )
537 {
538 static char *function = "libcpath_system_string_size_to_wide_string";
539
540 #if !defined( HAVE_WIDE_SYSTEM_CHARACTER )
541 int result = 0;
542 #endif
543
544 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
545 if( system_string == NULL )
546 {
547 libcerror_error_set(
548 error,
549 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
550 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
551 "%s: invalid system string.",
552 function );
553
554 return( -1 );
555 }
556 if( system_string_size > (size_t) SSIZE_MAX )
557 {
558 libcerror_error_set(
559 error,
560 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
561 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
562 "%s: invalid system string size value exceeds maximum.",
563 function );
564
565 return( -1 );
566 }
567 if( wide_string_size == NULL )
568 {
569 libcerror_error_set(
570 error,
571 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
572 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
573 "%s: invalid wide string size.",
574 function );
575
576 return( -1 );
577 }
578 *wide_string_size = system_string_size;
579 #else
580 if( libclocale_codepage == 0 )
581 {
582 #if SIZEOF_WCHAR_T == 4
583 result = libuna_utf32_string_size_from_utf8(
584 (libuna_utf8_character_t *) system_string,
585 system_string_size,
586 wide_string_size,
587 error );
588 #elif SIZEOF_WCHAR_T == 2
589 result = libuna_utf16_string_size_from_utf8(
590 (libuna_utf8_character_t *) system_string,
591 system_string_size,
592 wide_string_size,
593 error );
594 #endif /* SIZEOF_WCHAR_T */
595 }
596 else
597 {
598 #if SIZEOF_WCHAR_T == 4
599 result = libuna_utf32_string_size_from_byte_stream(
600 (uint8_t *) system_string,
601 system_string_size,
602 libclocale_codepage,
603 wide_string_size,
604 error );
605 #elif SIZEOF_WCHAR_T == 2
606 result = libuna_utf16_string_size_from_byte_stream(
607 (uint8_t *) system_string,
608 system_string_size,
609 libclocale_codepage,
610 wide_string_size,
611 error );
612 #endif /* SIZEOF_WCHAR_T */
613 }
614 if( result != 1 )
615 {
616 libcerror_error_set(
617 error,
618 LIBCERROR_ERROR_DOMAIN_CONVERSION,
619 LIBCERROR_CONVERSION_ERROR_GENERIC,
620 "%s: unable to determine wide string size.",
621 function );
622
623 return( -1 );
624 }
625 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
626
627 return( 1 );
628 }
629
630 /* Copies a system string to a wide string
631 * Returns 1 if successful or -1 on error
632 */
633 int libcpath_system_string_copy_to_wide_string(
634 const system_character_t *system_string,
635 size_t system_string_size,
636 wchar_t *wide_string,
637 size_t wide_string_size,
638 libcerror_error_t **error )
639 {
640 static char *function = "libcpath_system_string_copy_to_wide_string";
641
642 #if !defined( HAVE_WIDE_SYSTEM_CHARACTER )
643 int result = 0;
644 #endif
645
646 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
647 if( system_string == NULL )
648 {
649 libcerror_error_set(
650 error,
651 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
652 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
653 "%s: invalid system string.",
654 function );
655
656 return( -1 );
657 }
658 if( system_string_size > (size_t) SSIZE_MAX )
659 {
660 libcerror_error_set(
661 error,
662 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
663 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
664 "%s: invalid system string size value exceeds maximum.",
665 function );
666
667 return( -1 );
668 }
669 if( wide_string == NULL )
670 {
671 libcerror_error_set(
672 error,
673 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
674 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
675 "%s: invalid wide string.",
676 function );
677
678 return( -1 );
679 }
680 if( wide_string_size > (size_t) SSIZE_MAX )
681 {
682 libcerror_error_set(
683 error,
684 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
685 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
686 "%s: invalid wide string size value exceeds maximum.",
687 function );
688
689 return( -1 );
690 }
691 if( wide_string_size < system_string_size )
692 {
693 libcerror_error_set(
694 error,
695 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
696 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
697 "%s: invalid wide string size value too small.",
698 function );
699
700 return( -1 );
701 }
702 if( system_string_copy(
703 wide_string,
704 system_string,
705 system_string_size ) == NULL )
706 {
707 libcerror_error_set(
708 error,
709 LIBCERROR_ERROR_DOMAIN_MEMORY,
710 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
711 "%s: unable to set wide string.",
712 function );
713
714 return( -1 );
715 }
716 wide_string[ system_string_size - 1 ] = 0;
717 #else
718 if( libclocale_codepage == 0 )
719 {
720 #if SIZEOF_WCHAR_T == 4
721 result = libuna_utf32_string_copy_from_utf8(
722 (libuna_utf32_character_t *) wide_string,
723 wide_string_size,
724 (libuna_utf8_character_t *) system_string,
725 system_string_size,
726 error );
727 #elif SIZEOF_WCHAR_T == 2
728 result = libuna_utf16_string_copy_from_utf8(
729 (libuna_utf16_character_t *) wide_string,
730 wide_string_size,
731 (libuna_utf8_character_t *) system_string,
732 system_string_size,
733 error );
734 #endif /* SIZEOF_WCHAR_T */
735 }
736 else
737 {
738 #if SIZEOF_WCHAR_T == 4
739 result = libuna_utf32_string_copy_from_byte_stream(
740 (libuna_utf32_character_t *) wide_string,
741 wide_string_size,
742 (uint8_t *) system_string,
743 system_string_size,
744 libclocale_codepage,
745 error );
746 #elif SIZEOF_WCHAR_T == 2
747 result = libuna_utf16_string_copy_from_byte_stream(
748 (libuna_utf16_character_t *) wide_string,
749 wide_string_size,
750 (uint8_t *) system_string,
751 system_string_size,
752 libclocale_codepage,
753 error );
754 #endif /* SIZEOF_WCHAR_T */
755 }
756 if( result != 1 )
757 {
758 libcerror_error_set(
759 error,
760 LIBCERROR_ERROR_DOMAIN_CONVERSION,
761 LIBCERROR_CONVERSION_ERROR_GENERIC,
762 "%s: unable to set wide string.",
763 function );
764
765 return( -1 );
766 }
767 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
768
769 return( 1 );
770 }
771
772 /* Determines the size of a system string from a wide string
773 * Returns 1 if successful or -1 on error
774 */
775 int libcpath_system_string_size_from_wide_string(
776 const wchar_t *wide_string,
777 size_t wide_string_size,
778 size_t *system_string_size,
779 libcerror_error_t **error )
780 {
781 static char *function = "libcpath_system_string_size_from_wide_string";
782
783 #if !defined( HAVE_WIDE_SYSTEM_CHARACTER )
784 int result = 0;
785 #endif
786
787 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
788 if( wide_string == NULL )
789 {
790 libcerror_error_set(
791 error,
792 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
793 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
794 "%s: invalid wide string.",
795 function );
796
797 return( -1 );
798 }
799 if( wide_string_size > (size_t) SSIZE_MAX )
800 {
801 libcerror_error_set(
802 error,
803 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
804 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
805 "%s: invalid wide string size value exceeds maximum.",
806 function );
807
808 return( -1 );
809 }
810 if( system_string_size == NULL )
811 {
812 libcerror_error_set(
813 error,
814 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
815 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
816 "%s: invalid system string size.",
817 function );
818
819 return( -1 );
820 }
821 *system_string_size = wide_string_size;
822 #else
823 if( libclocale_codepage == 0 )
824 {
825 #if SIZEOF_WCHAR_T == 4
826 result = libuna_utf8_string_size_from_utf32(
827 (libuna_utf32_character_t *) wide_string,
828 wide_string_size,
829 system_string_size,
830 error );
831 #elif SIZEOF_WCHAR_T == 2
832 result = libuna_utf8_string_size_from_utf16(
833 (libuna_utf16_character_t *) wide_string,
834 wide_string_size,
835 system_string_size,
836 error );
837 #endif /* SIZEOF_WCHAR_T */
838 }
839 else
840 {
841 #if SIZEOF_WCHAR_T == 4
842 result = libuna_byte_stream_size_from_utf32(
843 (libuna_utf32_character_t *) wide_string,
844 wide_string_size,
845 libclocale_codepage,
846 system_string_size,
847 error );
848 #elif SIZEOF_WCHAR_T == 2
849 result = libuna_byte_stream_size_from_utf16(
850 (libuna_utf16_character_t *) wide_string,
851 wide_string_size,
852 libclocale_codepage,
853 system_string_size,
854 error );
855 #endif /* SIZEOF_WCHAR_T */
856 }
857 if( result != 1 )
858 {
859 libcerror_error_set(
860 error,
861 LIBCERROR_ERROR_DOMAIN_CONVERSION,
862 LIBCERROR_CONVERSION_ERROR_GENERIC,
863 "%s: unable to determine wide string size.",
864 function );
865
866 return( -1 );
867 }
868 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
869
870 return( 1 );
871 }
872
873 /* Copies a system string from a wide string
874 * Returns 1 if successful or -1 on error
875 */
876 int libcpath_system_string_copy_from_wide_string(
877 system_character_t *system_string,
878 size_t system_string_size,
879 const wchar_t *wide_string,
880 size_t wide_string_size,
881 libcerror_error_t **error )
882 {
883 static char *function = "libcpath_system_string_copy_from_wide_string";
884
885 #if !defined( HAVE_WIDE_SYSTEM_CHARACTER )
886 int result = 0;
887 #endif
888
889 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
890 if( system_string == NULL )
891 {
892 libcerror_error_set(
893 error,
894 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
895 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
896 "%s: invalid system string.",
897 function );
898
899 return( -1 );
900 }
901 if( system_string_size > (size_t) SSIZE_MAX )
902 {
903 libcerror_error_set(
904 error,
905 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
906 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
907 "%s: invalid system string size value exceeds maximum.",
908 function );
909
910 return( -1 );
911 }
912 if( wide_string == NULL )
913 {
914 libcerror_error_set(
915 error,
916 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
917 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
918 "%s: invalid wide string.",
919 function );
920
921 return( -1 );
922 }
923 if( wide_string_size > (size_t) SSIZE_MAX )
924 {
925 libcerror_error_set(
926 error,
927 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
928 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
929 "%s: invalid wide string size value exceeds maximum.",
930 function );
931
932 return( -1 );
933 }
934 if( system_string_size < wide_string_size )
935 {
936 libcerror_error_set(
937 error,
938 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
939 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
940 "%s: invalid system string size value too small.",
941 function );
942
943 return( -1 );
944 }
945 if( system_string_copy(
946 system_string,
947 wide_string,
948 wide_string_size ) == NULL )
949 {
950 libcerror_error_set(
951 error,
952 LIBCERROR_ERROR_DOMAIN_MEMORY,
953 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
954 "%s: unable to set wide_string.",
955 function );
956
957 return( -1 );
958 }
959 system_string[ wide_string_size - 1 ] = 0;
960 #else
961 if( libclocale_codepage == 0 )
962 {
963 #if SIZEOF_WCHAR_T == 4
964 result = libuna_utf8_string_copy_from_utf32(
965 (libuna_utf8_character_t *) system_string,
966 system_string_size,
967 (libuna_utf32_character_t *) wide_string,
968 wide_string_size,
969 error );
970 #elif SIZEOF_WCHAR_T == 2
971 result = libuna_utf8_string_copy_from_utf16(
972 (libuna_utf8_character_t *) system_string,
973 system_string_size,
974 (libuna_utf16_character_t *) wide_string,
975 wide_string_size,
976 error );
977 #endif /* SIZEOF_WCHAR_T */
978 }
979 else
980 {
981 #if SIZEOF_WCHAR_T == 4
982 result = libuna_byte_stream_copy_from_utf32(
983 (uint8_t *) system_string,
984 system_string_size,
985 libclocale_codepage,
986 (libuna_utf32_character_t *) wide_string,
987 wide_string_size,
988 error );
989 #elif SIZEOF_WCHAR_T == 2
990 result = libuna_byte_stream_copy_from_utf16(
991 (uint8_t *) system_string,
992 system_string_size,
993 libclocale_codepage,
994 (libuna_utf16_character_t *) wide_string,
995 wide_string_size,
996 error );
997 #endif /* SIZEOF_WCHAR_T */
998 }
999 if( result != 1 )
1000 {
1001 libcerror_error_set(
1002 error,
1003 LIBCERROR_ERROR_DOMAIN_CONVERSION,
1004 LIBCERROR_CONVERSION_ERROR_GENERIC,
1005 "%s: unable to set wide string.",
1006 function );
1007
1008 return( -1 );
1009 }
1010 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
1011
1012 return( 1 );
1013 }
1014
1015 #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */
1016
0 /*
1 * System string functions
2 *
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCPATH_SYSTEM_STRING_H )
22 #define _LIBCPATH_SYSTEM_STRING_H
23
24 #include <common.h>
25 #include <types.h>
26
27 #include "libcpath_libcerror.h"
28
29 #if defined( __cplusplus )
30 extern "C" {
31 #endif
32
33 int libcpath_system_string_size_to_narrow_string(
34 const system_character_t *system_string,
35 size_t system_string_size,
36 size_t *narrow_string_size,
37 libcerror_error_t **error );
38
39 int libcpath_system_string_copy_to_narrow_string(
40 const system_character_t *system_string,
41 size_t system_string_size,
42 char *narrow_string,
43 size_t narrow_string_size,
44 libcerror_error_t **error );
45
46 int libcpath_system_string_size_from_narrow_string(
47 const char *narrow_string,
48 size_t narrow_string_size,
49 size_t *system_string_size,
50 libcerror_error_t **error );
51
52 int libcpath_system_string_copy_from_narrow_string(
53 system_character_t *system_string,
54 size_t system_string_size,
55 const char *narrow_string,
56 size_t narrow_string_size,
57 libcerror_error_t **error );
58
59 #if defined( HAVE_WIDE_CHARACTER_TYPE )
60
61 int libcpath_system_string_size_to_wide_string(
62 const system_character_t *system_string,
63 size_t system_string_size,
64 size_t *wide_string_size,
65 libcerror_error_t **error );
66
67 int libcpath_system_string_copy_to_wide_string(
68 const system_character_t *system_string,
69 size_t system_string_size,
70 wchar_t *wide_string,
71 size_t wide_string_size,
72 libcerror_error_t **error );
73
74 int libcpath_system_string_size_from_wide_string(
75 const wchar_t *wide_string,
76 size_t wide_string_size,
77 size_t *system_string_size,
78 libcerror_error_t **error );
79
80 int libcpath_system_string_copy_from_wide_string(
81 system_character_t *system_string,
82 size_t system_string_size,
83 const wchar_t *wide_string,
84 size_t wide_string_size,
85 libcerror_error_t **error );
86
87 #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */
88
89 #if defined( __cplusplus )
90 }
91 #endif
92
93 #endif /* !defined( _LIBCPATH_SYSTEM_STRING_H ) */
94
00 /*
11 * The internal unused definition
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
11 AM_CPPFLAGS = \
22 -I$(top_srcdir)/include \
33 -I$(top_srcdir)/common \
4 @LIBCSTRING_CPPFLAGS@ \
54 @LIBCERROR_CPPFLAGS@
65
76 noinst_LTLIBRARIES = libcsplit.la
1312 libcsplit_narrow_split_string.c libcsplit_narrow_split_string.h \
1413 libcsplit_narrow_string.c libcsplit_narrow_string.h \
1514 libcsplit_libcerror.h \
16 libcsplit_libcstring.h \
1715 libcsplit_support.c libcsplit_support.h \
1816 libcsplit_types.h \
1917 libcsplit_unused.h \
2018 libcsplit_wide_split_string.c libcsplit_wide_split_string.h \
2119 libcsplit_wide_string.c libcsplit_wide_string.h
2220 endif
23
2421
2522 MAINTAINERCLEANFILES = \
2623 Makefile.in
9797 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9898 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9999 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101100 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102101 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103102 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
108107 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109108 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110109 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
110 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
111 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
113112 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114113 $(ACLOCAL_M4)
115114 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
124123 libcsplit_narrow_split_string.c \
125124 libcsplit_narrow_split_string.h libcsplit_narrow_string.c \
126125 libcsplit_narrow_string.h libcsplit_libcerror.h \
127 libcsplit_libcstring.h libcsplit_support.c libcsplit_support.h \
128 libcsplit_types.h libcsplit_unused.h \
129 libcsplit_wide_split_string.c libcsplit_wide_split_string.h \
130 libcsplit_wide_string.c libcsplit_wide_string.h
126 libcsplit_support.c libcsplit_support.h libcsplit_types.h \
127 libcsplit_unused.h libcsplit_wide_split_string.c \
128 libcsplit_wide_split_string.h libcsplit_wide_string.c \
129 libcsplit_wide_string.h
131130 @HAVE_LOCAL_LIBCSPLIT_TRUE@am_libcsplit_la_OBJECTS = \
132131 @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_error.lo \
133132 @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_narrow_split_string.lo \
244243 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
245244 HAVE_LIBCPATH = @HAVE_LIBCPATH@
246245 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
247 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
248 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
249246 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
250247 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
251248 HAVE_LIBFDATA = @HAVE_LIBFDATA@
264261 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
265262 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
266263 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
267 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
268 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
269264 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
270265 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
271266 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
312307 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
313308 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
314309 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
315 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
316 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
317 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
318 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
319310 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
320311 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
321312 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
348339 LTLIBICONV = @LTLIBICONV@
349340 LTLIBINTL = @LTLIBINTL@
350341 LTLIBOBJS = @LTLIBOBJS@
342 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
351343 MAKEINFO = @MAKEINFO@
352344 MANIFEST_TOOL = @MANIFEST_TOOL@
353345 MKDIR_P = @MKDIR_P@
454446 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
455447 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
456448 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
457 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
458 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
459 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
460 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
461 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
462 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
463449 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
464450 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
465451 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
528514 libcpath_LIBS = @libcpath_LIBS@
529515 libcsplit_CFLAGS = @libcsplit_CFLAGS@
530516 libcsplit_LIBS = @libcsplit_LIBS@
531 libcstring_CFLAGS = @libcstring_CFLAGS@
532 libcstring_LIBS = @libcstring_LIBS@
533 libcsystem_CFLAGS = @libcsystem_CFLAGS@
534 libcsystem_LIBS = @libcsystem_LIBS@
535517 libcthreads_CFLAGS = @libcthreads_CFLAGS@
536518 libcthreads_LIBS = @libcthreads_LIBS@
537519 libdir = @libdir@
583565 @HAVE_LOCAL_LIBCSPLIT_TRUE@AM_CPPFLAGS = \
584566 @HAVE_LOCAL_LIBCSPLIT_TRUE@ -I$(top_srcdir)/include \
585567 @HAVE_LOCAL_LIBCSPLIT_TRUE@ -I$(top_srcdir)/common \
586 @HAVE_LOCAL_LIBCSPLIT_TRUE@ @LIBCSTRING_CPPFLAGS@ \
587568 @HAVE_LOCAL_LIBCSPLIT_TRUE@ @LIBCERROR_CPPFLAGS@
588569
589570 @HAVE_LOCAL_LIBCSPLIT_TRUE@noinst_LTLIBRARIES = libcsplit.la
594575 @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_narrow_split_string.c libcsplit_narrow_split_string.h \
595576 @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_narrow_string.c libcsplit_narrow_string.h \
596577 @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_libcerror.h \
597 @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_libcstring.h \
598578 @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_support.c libcsplit_support.h \
599579 @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_types.h \
600580 @HAVE_LOCAL_LIBCSPLIT_TRUE@ libcsplit_unused.h \
00 /*
11 * The internal definitions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3434 */
3535 #else
3636
37 #define LIBCSPLIT_VERSION 20160425
37 #define LIBCSPLIT_VERSION 20170109
3838
3939 /* The libcsplit version string
4040 */
41 #define LIBCSPLIT_VERSION_STRING "20160425"
41 #define LIBCSPLIT_VERSION_STRING "20170109"
4242
4343 #endif /* !defined( HAVE_LOCAL_LIBCSPLIT ) */
4444
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4343 libcsplit_error_t *error,
4444 FILE *stream )
4545 {
46 return( libcerror_error_fprint(
47 (libcerror_error_t *) error,
48 stream ) );
46 int print_count = 0;
47
48 print_count = libcerror_error_fprint(
49 (libcerror_error_t *) error,
50 stream );
51
52 return( print_count );
4953 }
5054
5155 /* Prints a descriptive string of the error to the string
5761 char *string,
5862 size_t size )
5963 {
60 return( libcerror_error_sprint(
61 (libcerror_error_t *) error,
62 string,
63 size ) );
64 int print_count = 0;
65
66 print_count = libcerror_error_sprint(
67 (libcerror_error_t *) error,
68 string,
69 size );
70
71 return( print_count );
6472 }
6573
6674 /* Prints a backtrace of the error to the stream
7078 libcsplit_error_t *error,
7179 FILE *stream )
7280 {
73 return( libcerror_error_backtrace_fprint(
74 (libcerror_error_t *) error,
75 stream ) );
81 int print_count = 0;
82
83 print_count = libcerror_error_backtrace_fprint(
84 (libcerror_error_t *) error,
85 stream );
86
87 return( print_count );
7688 }
7789
7890 /* Prints a backtrace of the error to the string
8496 char *string,
8597 size_t size )
8698 {
87 return( libcerror_error_backtrace_sprint(
88 (libcerror_error_t *) error,
89 string,
90 size ) );
99 int print_count = 0;
100
101 print_count = libcerror_error_backtrace_sprint(
102 (libcerror_error_t *) error,
103 string,
104 size );
105
106 return( print_count );
91107 }
92108
93109 #endif /* !defined( HAVE_LOCAL_LIBCSPLIT ) */
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal extern definition
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 #include <libcsplit/extern.h>
3838
3939 #else
40 #define LIBCSPLIT_EXTERN /* extern */
4041
41 #define LIBCSPLIT_EXTERN extern
42 #endif /* !defined( HAVE_LOCAL_LIBCSPLIT ) */
4243
43 #endif
44 #endif /* !defined( _LIBCSPLIT_INTERNAL_EXTERN_H ) */
4445
45 #endif
46
00 /*
11 * The internal libcerror header
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
+0
-51
libcsplit/libcsplit_libcstring.h less more
0 /*
1 * The internal libcstring header
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSPLIT_LIBCSTRING_H )
22 #define _LIBCSPLIT_LIBCSTRING_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring
27 */
28 #if defined( HAVE_LOCAL_LIBCSTRING )
29
30 #include <libcstring_definitions.h>
31 #include <libcstring_narrow_string.h>
32 #include <libcstring_system_string.h>
33 #include <libcstring_types.h>
34 #include <libcstring_wide_string.h>
35
36 #else
37
38 /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT
39 * before including libcstring.h
40 */
41 #if defined( _WIN32 ) && defined( DLL_IMPORT )
42 #define LIBCSTRING_DLL_IMPORT
43 #endif
44
45 #include <libcstring.h>
46
47 #endif /* defined( HAVE_LOCAL_LIBCSTRING ) */
48
49 #endif /* !defined( _LIBCSPLIT_LIBCSTRING_H ) */
50
00 /*
11 * Split narrow string functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2020
2121 #include <common.h>
2222 #include <memory.h>
23 #include <narrow_string.h>
2324 #include <types.h>
2425
2526 #include "libcsplit_libcerror.h"
26 #include "libcsplit_libcstring.h"
2727 #include "libcsplit_narrow_split_string.h"
2828 #include "libcsplit_types.h"
2929
108108 if( ( string != NULL )
109109 && ( string_size > 0 ) )
110110 {
111 internal_split_string->string = libcstring_narrow_string_allocate(
111 internal_split_string->string = narrow_string_allocate(
112112 string_size );
113113
114114 if( internal_split_string->string == NULL )
00 /*
11 * Split narrow string functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
102102 }
103103 #endif
104104
105 #endif
105 #endif /* !defined( _LIBCSPLIT_INTERNAL_NARROW_SPLIT_STRING_H ) */
106106
00 /*
11 * Narrow character string functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Narrow character string functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4444 }
4545 #endif
4646
47 #endif
47 #endif /* !defined( _LIBCSPLIT_NARROW_STRING_H ) */
4848
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2222 #include <types.h>
2323
2424 #include "libcsplit_definitions.h"
25 #include "libcsplit_libcerror.h"
26 #include "libcsplit_libcstring.h"
2725 #include "libcsplit_support.h"
2826
2927 #if !defined( HAVE_LOCAL_LIBCSPLIT )
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2525 #include <types.h>
2626
2727 #include "libcsplit_extern.h"
28 #include "libcsplit_libcerror.h"
2928
3029 #if defined( __cplusplus )
3130 extern "C" {
4342 }
4443 #endif
4544
46 #endif
45 #endif /* !defined( _LIBCSPLIT_SUPPORT_H ) */
4746
00 /*
11 * The internal type definitions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal unused definition
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Split wide string functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2020
2121 #include <common.h>
2222 #include <memory.h>
23 #include <wide_string.h>
2324 #include <types.h>
2425
2526 #include "libcsplit_libcerror.h"
26 #include "libcsplit_libcstring.h"
2727 #include "libcsplit_wide_split_string.h"
2828 #include "libcsplit_types.h"
2929
110110 if( ( string != NULL )
111111 && ( string_size > 0 ) )
112112 {
113 internal_split_string->string = libcstring_wide_string_allocate(
113 internal_split_string->string = wide_string_allocate(
114114 string_size );
115115
116116 if( internal_split_string->string == NULL )
00 /*
11 * Split wide string functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
6666 int number_of_segments,
6767 libcerror_error_t **error );
6868
69 LIBCSPLIT_EXTERN \
6970 int libcsplit_wide_split_string_free(
7071 libcsplit_wide_split_string_t **split_string,
7172 libcerror_error_t **error );
7273
74 LIBCSPLIT_EXTERN \
7375 int libcsplit_wide_split_string_get_string(
7476 libcsplit_wide_split_string_t *split_string,
7577 wchar_t **string,
7678 size_t *string_size,
7779 libcerror_error_t **error );
7880
81 LIBCSPLIT_EXTERN \
7982 int libcsplit_wide_split_string_get_number_of_segments(
8083 libcsplit_wide_split_string_t *split_string,
8184 int *number_of_segments,
8285 libcerror_error_t **error );
8386
87 LIBCSPLIT_EXTERN \
8488 int libcsplit_wide_split_string_get_segment_by_index(
8589 libcsplit_wide_split_string_t *split_string,
8690 int segment_index,
8892 size_t *string_segment_size,
8993 libcerror_error_t **error );
9094
95 LIBCSPLIT_EXTERN \
9196 int libcsplit_wide_split_string_set_segment_by_index(
9297 libcsplit_wide_split_string_t *split_string,
9398 int segment_index,
101106 }
102107 #endif
103108
104 #endif
109 #endif /* !defined( _LIBCSPLIT_INTERNAL_WIDE_SPLIT_STRING_H ) */
105110
00 /*
11 * Wide character string functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Wide character string functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4848 }
4949 #endif
5050
51 #endif
51 #endif /* !defined( _LIBCSPLIT_WIDE_STRING_H ) */
5252
+0
-29
libcstring/Makefile.am less more
0 if HAVE_LOCAL_LIBCSTRING
1 AM_CPPFLAGS = \
2 -I$(top_srcdir)/include \
3 -I$(top_srcdir)/common
4
5 noinst_LTLIBRARIES = libcstring.la
6
7 libcstring_la_SOURCES = \
8 libcstring_definitions.h \
9 libcstring_extern.h \
10 libcstring_narrow_string.h \
11 libcstring_support.c libcstring_support.h \
12 libcstring_system_string.h \
13 libcstring_types.h \
14 libcstring_unused.h \
15 libcstring_wide_string.c libcstring_wide_string.h
16 endif
17
18
19 MAINTAINERCLEANFILES = \
20 Makefile.in
21
22 distclean: clean
23 /bin/rm -f Makefile
24
25 splint:
26 @echo "Running splint on libcstring ..."
27 -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcstring_la_SOURCES)
28
+0
-892
libcstring/Makefile.in less more
0 # Makefile.in generated by automake 1.15 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2014 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 VPATH = @srcdir@
17 am__is_gnu_make = { \
18 if test -z '$(MAKELEVEL)'; then \
19 false; \
20 elif test -n '$(MAKE_HOST)'; then \
21 true; \
22 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
23 true; \
24 else \
25 false; \
26 fi; \
27 }
28 am__make_running_with_option = \
29 case $${target_option-} in \
30 ?) ;; \
31 *) echo "am__make_running_with_option: internal error: invalid" \
32 "target option '$${target_option-}' specified" >&2; \
33 exit 1;; \
34 esac; \
35 has_opt=no; \
36 sane_makeflags=$$MAKEFLAGS; \
37 if $(am__is_gnu_make); then \
38 sane_makeflags=$$MFLAGS; \
39 else \
40 case $$MAKEFLAGS in \
41 *\\[\ \ ]*) \
42 bs=\\; \
43 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
44 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
45 esac; \
46 fi; \
47 skip_next=no; \
48 strip_trailopt () \
49 { \
50 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
51 }; \
52 for flg in $$sane_makeflags; do \
53 test $$skip_next = yes && { skip_next=no; continue; }; \
54 case $$flg in \
55 *=*|--*) continue;; \
56 -*I) strip_trailopt 'I'; skip_next=yes;; \
57 -*I?*) strip_trailopt 'I';; \
58 -*O) strip_trailopt 'O'; skip_next=yes;; \
59 -*O?*) strip_trailopt 'O';; \
60 -*l) strip_trailopt 'l'; skip_next=yes;; \
61 -*l?*) strip_trailopt 'l';; \
62 -[dEDm]) skip_next=yes;; \
63 -[JT]) skip_next=yes;; \
64 esac; \
65 case $$flg in \
66 *$$target_option*) has_opt=yes; break;; \
67 esac; \
68 done; \
69 test $$has_opt = yes
70 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
71 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
72 pkgdatadir = $(datadir)/@PACKAGE@
73 pkgincludedir = $(includedir)/@PACKAGE@
74 pkglibdir = $(libdir)/@PACKAGE@
75 pkglibexecdir = $(libexecdir)/@PACKAGE@
76 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
77 install_sh_DATA = $(install_sh) -c -m 644
78 install_sh_PROGRAM = $(install_sh) -c
79 install_sh_SCRIPT = $(install_sh) -c
80 INSTALL_HEADER = $(INSTALL_DATA)
81 transform = $(program_transform_name)
82 NORMAL_INSTALL = :
83 PRE_INSTALL = :
84 POST_INSTALL = :
85 NORMAL_UNINSTALL = :
86 PRE_UNINSTALL = :
87 POST_UNINSTALL = :
88 build_triplet = @build@
89 host_triplet = @host@
90 subdir = libcstring
91 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
92 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \
93 $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \
94 $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
95 $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
96 $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \
97 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
98 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
99 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
104 $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \
105 $(top_srcdir)/m4/libmapidb.m4 $(top_srcdir)/m4/libtool.m4 \
106 $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \
107 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
108 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
113 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114 $(ACLOCAL_M4)
115 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
116 mkinstalldirs = $(install_sh) -d
117 CONFIG_HEADER = $(top_builddir)/common/config.h
118 CONFIG_CLEAN_FILES =
119 CONFIG_CLEAN_VPATH_FILES =
120 LTLIBRARIES = $(noinst_LTLIBRARIES)
121 libcstring_la_LIBADD =
122 am__libcstring_la_SOURCES_DIST = libcstring_definitions.h \
123 libcstring_extern.h libcstring_narrow_string.h \
124 libcstring_support.c libcstring_support.h \
125 libcstring_system_string.h libcstring_types.h \
126 libcstring_unused.h libcstring_wide_string.c \
127 libcstring_wide_string.h
128 @HAVE_LOCAL_LIBCSTRING_TRUE@am_libcstring_la_OBJECTS = \
129 @HAVE_LOCAL_LIBCSTRING_TRUE@ libcstring_support.lo \
130 @HAVE_LOCAL_LIBCSTRING_TRUE@ libcstring_wide_string.lo
131 libcstring_la_OBJECTS = $(am_libcstring_la_OBJECTS)
132 AM_V_lt = $(am__v_lt_@AM_V@)
133 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
134 am__v_lt_0 = --silent
135 am__v_lt_1 =
136 @HAVE_LOCAL_LIBCSTRING_TRUE@am_libcstring_la_rpath =
137 AM_V_P = $(am__v_P_@AM_V@)
138 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
139 am__v_P_0 = false
140 am__v_P_1 = :
141 AM_V_GEN = $(am__v_GEN_@AM_V@)
142 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
143 am__v_GEN_0 = @echo " GEN " $@;
144 am__v_GEN_1 =
145 AM_V_at = $(am__v_at_@AM_V@)
146 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
147 am__v_at_0 = @
148 am__v_at_1 =
149 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common
150 depcomp = $(SHELL) $(top_srcdir)/depcomp
151 am__depfiles_maybe = depfiles
152 am__mv = mv -f
153 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
154 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
155 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
156 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
157 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
158 $(AM_CFLAGS) $(CFLAGS)
159 AM_V_CC = $(am__v_CC_@AM_V@)
160 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
161 am__v_CC_0 = @echo " CC " $@;
162 am__v_CC_1 =
163 CCLD = $(CC)
164 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
165 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
166 $(AM_LDFLAGS) $(LDFLAGS) -o $@
167 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
168 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
169 am__v_CCLD_0 = @echo " CCLD " $@;
170 am__v_CCLD_1 =
171 SOURCES = $(libcstring_la_SOURCES)
172 DIST_SOURCES = $(am__libcstring_la_SOURCES_DIST)
173 am__can_run_installinfo = \
174 case $$AM_UPDATE_INFO_DIR in \
175 n|no|NO) false;; \
176 *) (install-info --version) >/dev/null 2>&1;; \
177 esac
178 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
179 # Read a list of newline-separated strings from the standard input,
180 # and print each of them once, without duplicates. Input order is
181 # *not* preserved.
182 am__uniquify_input = $(AWK) '\
183 BEGIN { nonempty = 0; } \
184 { items[$$0] = 1; nonempty = 1; } \
185 END { if (nonempty) { for (i in items) print i; }; } \
186 '
187 # Make sure the list of sources is unique. This is necessary because,
188 # e.g., the same source file might be shared among _SOURCES variables
189 # for different programs/libraries.
190 am__define_uniq_tagged_files = \
191 list='$(am__tagged_files)'; \
192 unique=`for i in $$list; do \
193 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
194 done | $(am__uniquify_input)`
195 ETAGS = etags
196 CTAGS = ctags
197 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
198 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
199 ACLOCAL = @ACLOCAL@
200 AMTAR = @AMTAR@
201 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
202 AR = @AR@
203 AS = @AS@
204 AUTOCONF = @AUTOCONF@
205 AUTOHEADER = @AUTOHEADER@
206 AUTOMAKE = @AUTOMAKE@
207 AWK = @AWK@
208 CC = @CC@
209 CCDEPMODE = @CCDEPMODE@
210 CFLAGS = @CFLAGS@
211 CPP = @CPP@
212 CPPFLAGS = @CPPFLAGS@
213 CYGPATH_W = @CYGPATH_W@
214 DEFS = @DEFS@
215 DEPDIR = @DEPDIR@
216 DLLTOOL = @DLLTOOL@
217 DPKG_DATE = @DPKG_DATE@
218 DSYMUTIL = @DSYMUTIL@
219 DUMPBIN = @DUMPBIN@
220 ECHO_C = @ECHO_C@
221 ECHO_N = @ECHO_N@
222 ECHO_T = @ECHO_T@
223 EGREP = @EGREP@
224 EXEEXT = @EXEEXT@
225 FGREP = @FGREP@
226 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
227 GMSGFMT = @GMSGFMT@
228 GMSGFMT_015 = @GMSGFMT_015@
229 GREP = @GREP@
230 HAVE_DLLMAIN = @HAVE_DLLMAIN@
231 HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
232 HAVE_LIBBFIO = @HAVE_LIBBFIO@
233 HAVE_LIBCDATA = @HAVE_LIBCDATA@
234 HAVE_LIBCERROR = @HAVE_LIBCERROR@
235 HAVE_LIBCFILE = @HAVE_LIBCFILE@
236 HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@
237 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
238 HAVE_LIBCPATH = @HAVE_LIBCPATH@
239 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
240 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
241 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
242 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
243 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
244 HAVE_LIBFDATA = @HAVE_LIBFDATA@
245 HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@
246 HAVE_LIBFGUID = @HAVE_LIBFGUID@
247 HAVE_LIBFMAPI = @HAVE_LIBFMAPI@
248 HAVE_LIBFVALUE = @HAVE_LIBFVALUE@
249 HAVE_LIBFWNT = @HAVE_LIBFWNT@
250 HAVE_LIBMAPIDB = @HAVE_LIBMAPIDB@
251 HAVE_LIBUNA = @HAVE_LIBUNA@
252 HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@
253 HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@
254 HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@
255 HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@
256 HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@
257 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
258 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
259 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
260 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
261 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
262 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
263 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
264 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
265 HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@
266 HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@
267 HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@
268 HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@
269 HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@
270 HAVE_LOCAL_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@
271 HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@
272 HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@
273 HAVE_OFF64_T = @HAVE_OFF64_T@
274 HAVE_PTHREAD = @HAVE_PTHREAD@
275 HAVE_SIZE32_T = @HAVE_SIZE32_T@
276 HAVE_SIZE64_T = @HAVE_SIZE64_T@
277 HAVE_SSIZE32_T = @HAVE_SSIZE32_T@
278 HAVE_SSIZE64_T = @HAVE_SSIZE64_T@
279 HAVE_STDINT_H = @HAVE_STDINT_H@
280 HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
281 HAVE_WCHAR_H = @HAVE_WCHAR_H@
282 HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@
283 INSTALL = @INSTALL@
284 INSTALL_DATA = @INSTALL_DATA@
285 INSTALL_PROGRAM = @INSTALL_PROGRAM@
286 INSTALL_SCRIPT = @INSTALL_SCRIPT@
287 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
288 INTLLIBS = @INTLLIBS@
289 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
290 LD = @LD@
291 LDFLAGS = @LDFLAGS@
292 LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@
293 LIBBFIO_LIBADD = @LIBBFIO_LIBADD@
294 LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@
295 LIBCDATA_LIBADD = @LIBCDATA_LIBADD@
296 LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@
297 LIBCERROR_LIBADD = @LIBCERROR_LIBADD@
298 LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@
299 LIBCFILE_LIBADD = @LIBCFILE_LIBADD@
300 LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@
301 LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@
302 LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@
303 LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@
304 LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@
305 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
306 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
307 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
308 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
309 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
310 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
311 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
312 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
313 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
314 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
315 LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@
316 LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@
317 LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@
318 LIBFDATA_LIBADD = @LIBFDATA_LIBADD@
319 LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@
320 LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@
321 LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@
322 LIBFGUID_LIBADD = @LIBFGUID_LIBADD@
323 LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@
324 LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@
325 LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@
326 LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@
327 LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@
328 LIBFWNT_LIBADD = @LIBFWNT_LIBADD@
329 LIBICONV = @LIBICONV@
330 LIBINTL = @LIBINTL@
331 LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@
332 LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@
333 LIBOBJS = @LIBOBJS@
334 LIBS = @LIBS@
335 LIBTOOL = @LIBTOOL@
336 LIBTOOL_DEPS = @LIBTOOL_DEPS@
337 LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@
338 LIBUNA_LIBADD = @LIBUNA_LIBADD@
339 LIPO = @LIPO@
340 LN_S = @LN_S@
341 LTLIBICONV = @LTLIBICONV@
342 LTLIBINTL = @LTLIBINTL@
343 LTLIBOBJS = @LTLIBOBJS@
344 MAKEINFO = @MAKEINFO@
345 MANIFEST_TOOL = @MANIFEST_TOOL@
346 MKDIR_P = @MKDIR_P@
347 MSGFMT = @MSGFMT@
348 MSGFMT_015 = @MSGFMT_015@
349 MSGMERGE = @MSGMERGE@
350 NM = @NM@
351 NMEDIT = @NMEDIT@
352 OBJDUMP = @OBJDUMP@
353 OBJEXT = @OBJEXT@
354 OTOOL = @OTOOL@
355 OTOOL64 = @OTOOL64@
356 PACKAGE = @PACKAGE@
357 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
358 PACKAGE_NAME = @PACKAGE_NAME@
359 PACKAGE_STRING = @PACKAGE_STRING@
360 PACKAGE_TARNAME = @PACKAGE_TARNAME@
361 PACKAGE_URL = @PACKAGE_URL@
362 PACKAGE_VERSION = @PACKAGE_VERSION@
363 PATH_SEPARATOR = @PATH_SEPARATOR@
364 PKGCONFIG = @PKGCONFIG@
365 PKG_CONFIG = @PKG_CONFIG@
366 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
367 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
368 POSUB = @POSUB@
369 PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@
370 PTHREAD_LIBADD = @PTHREAD_LIBADD@
371 PWD = @PWD@
372 PYTHON = @PYTHON@
373 PYTHON2 = @PYTHON2@
374 PYTHON2_CONFIG = @PYTHON2_CONFIG@
375 PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@
376 PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@
377 PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@
378 PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@
379 PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@
380 PYTHON2_PLATFORM = @PYTHON2_PLATFORM@
381 PYTHON2_PREFIX = @PYTHON2_PREFIX@
382 PYTHON2_VERSION = @PYTHON2_VERSION@
383 PYTHON3 = @PYTHON3@
384 PYTHON3_CONFIG = @PYTHON3_CONFIG@
385 PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@
386 PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@
387 PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@
388 PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@
389 PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@
390 PYTHON3_PLATFORM = @PYTHON3_PLATFORM@
391 PYTHON3_PREFIX = @PYTHON3_PREFIX@
392 PYTHON3_VERSION = @PYTHON3_VERSION@
393 PYTHON_CONFIG = @PYTHON_CONFIG@
394 PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
395 PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
396 PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
397 PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@
398 PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@
399 PYTHON_PLATFORM = @PYTHON_PLATFORM@
400 PYTHON_PREFIX = @PYTHON_PREFIX@
401 PYTHON_VERSION = @PYTHON_VERSION@
402 RANLIB = @RANLIB@
403 SED = @SED@
404 SET_MAKE = @SET_MAKE@
405 SHELL = @SHELL@
406 SPEC_DATE = @SPEC_DATE@
407 STATIC_LDFLAGS = @STATIC_LDFLAGS@
408 STRIP = @STRIP@
409 USE_NLS = @USE_NLS@
410 VERSION = @VERSION@
411 XGETTEXT = @XGETTEXT@
412 XGETTEXT_015 = @XGETTEXT_015@
413 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
414 abs_builddir = @abs_builddir@
415 abs_srcdir = @abs_srcdir@
416 abs_top_builddir = @abs_top_builddir@
417 abs_top_srcdir = @abs_top_srcdir@
418 ac_ct_AR = @ac_ct_AR@
419 ac_ct_CC = @ac_ct_CC@
420 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
421 am__include = @am__include@
422 am__leading_dot = @am__leading_dot@
423 am__quote = @am__quote@
424 am__tar = @am__tar@
425 am__untar = @am__untar@
426 ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@
427 ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@
428 ax_libbfio_spec_requires = @ax_libbfio_spec_requires@
429 ax_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@
430 ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@
431 ax_libcdata_spec_requires = @ax_libcdata_spec_requires@
432 ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@
433 ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@
434 ax_libcerror_spec_requires = @ax_libcerror_spec_requires@
435 ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@
436 ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@
437 ax_libcfile_spec_requires = @ax_libcfile_spec_requires@
438 ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@
439 ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@
440 ax_libclocale_spec_requires = @ax_libclocale_spec_requires@
441 ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@
442 ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@
443 ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@
444 ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@
445 ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@
446 ax_libcpath_spec_requires = @ax_libcpath_spec_requires@
447 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
448 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
449 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
450 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
451 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
452 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
453 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
454 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
455 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
456 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
457 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
458 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
459 ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@
460 ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@
461 ax_libfcache_spec_requires = @ax_libfcache_spec_requires@
462 ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@
463 ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@
464 ax_libfdata_spec_requires = @ax_libfdata_spec_requires@
465 ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@
466 ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@
467 ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@
468 ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@
469 ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@
470 ax_libfguid_spec_requires = @ax_libfguid_spec_requires@
471 ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@
472 ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@
473 ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@
474 ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@
475 ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@
476 ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@
477 ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@
478 ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@
479 ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@
480 ax_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@
481 ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@
482 ax_libmapidb_spec_requires = @ax_libmapidb_spec_requires@
483 ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@
484 ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@
485 ax_libuna_spec_requires = @ax_libuna_spec_requires@
486 ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@
487 bindir = @bindir@
488 build = @build@
489 build_alias = @build_alias@
490 build_cpu = @build_cpu@
491 build_os = @build_os@
492 build_vendor = @build_vendor@
493 builddir = @builddir@
494 datadir = @datadir@
495 datarootdir = @datarootdir@
496 docdir = @docdir@
497 dvidir = @dvidir@
498 exec_prefix = @exec_prefix@
499 host = @host@
500 host_alias = @host_alias@
501 host_cpu = @host_cpu@
502 host_os = @host_os@
503 host_vendor = @host_vendor@
504 htmldir = @htmldir@
505 includedir = @includedir@
506 infodir = @infodir@
507 install_sh = @install_sh@
508 libbfio_CFLAGS = @libbfio_CFLAGS@
509 libbfio_LIBS = @libbfio_LIBS@
510 libcdata_CFLAGS = @libcdata_CFLAGS@
511 libcdata_LIBS = @libcdata_LIBS@
512 libcerror_CFLAGS = @libcerror_CFLAGS@
513 libcerror_LIBS = @libcerror_LIBS@
514 libcfile_CFLAGS = @libcfile_CFLAGS@
515 libcfile_LIBS = @libcfile_LIBS@
516 libclocale_CFLAGS = @libclocale_CFLAGS@
517 libclocale_LIBS = @libclocale_LIBS@
518 libcnotify_CFLAGS = @libcnotify_CFLAGS@
519 libcnotify_LIBS = @libcnotify_LIBS@
520 libcpath_CFLAGS = @libcpath_CFLAGS@
521 libcpath_LIBS = @libcpath_LIBS@
522 libcsplit_CFLAGS = @libcsplit_CFLAGS@
523 libcsplit_LIBS = @libcsplit_LIBS@
524 libcstring_CFLAGS = @libcstring_CFLAGS@
525 libcstring_LIBS = @libcstring_LIBS@
526 libcsystem_CFLAGS = @libcsystem_CFLAGS@
527 libcsystem_LIBS = @libcsystem_LIBS@
528 libcthreads_CFLAGS = @libcthreads_CFLAGS@
529 libcthreads_LIBS = @libcthreads_LIBS@
530 libdir = @libdir@
531 libesedb_spec_build_requires = @libesedb_spec_build_requires@
532 libesedb_spec_requires = @libesedb_spec_requires@
533 libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@
534 libexecdir = @libexecdir@
535 libfcache_CFLAGS = @libfcache_CFLAGS@
536 libfcache_LIBS = @libfcache_LIBS@
537 libfdata_CFLAGS = @libfdata_CFLAGS@
538 libfdata_LIBS = @libfdata_LIBS@
539 libfdatetime_CFLAGS = @libfdatetime_CFLAGS@
540 libfdatetime_LIBS = @libfdatetime_LIBS@
541 libfguid_CFLAGS = @libfguid_CFLAGS@
542 libfguid_LIBS = @libfguid_LIBS@
543 libfmapi_CFLAGS = @libfmapi_CFLAGS@
544 libfmapi_LIBS = @libfmapi_LIBS@
545 libfvalue_CFLAGS = @libfvalue_CFLAGS@
546 libfvalue_LIBS = @libfvalue_LIBS@
547 libfwnt_CFLAGS = @libfwnt_CFLAGS@
548 libfwnt_LIBS = @libfwnt_LIBS@
549 libmapidb_CFLAGS = @libmapidb_CFLAGS@
550 libmapidb_LIBS = @libmapidb_LIBS@
551 libuna_CFLAGS = @libuna_CFLAGS@
552 libuna_LIBS = @libuna_LIBS@
553 localedir = @localedir@
554 localstatedir = @localstatedir@
555 mandir = @mandir@
556 mkdir_p = @mkdir_p@
557 oldincludedir = @oldincludedir@
558 pdfdir = @pdfdir@
559 prefix = @prefix@
560 program_transform_name = @program_transform_name@
561 psdir = @psdir@
562 pyexecdir = @pyexecdir@
563 pyexecdir2 = @pyexecdir2@
564 pyexecdir3 = @pyexecdir3@
565 pythondir = @pythondir@
566 pythondir2 = @pythondir2@
567 pythondir3 = @pythondir3@
568 sbindir = @sbindir@
569 sharedstatedir = @sharedstatedir@
570 srcdir = @srcdir@
571 sysconfdir = @sysconfdir@
572 target_alias = @target_alias@
573 top_build_prefix = @top_build_prefix@
574 top_builddir = @top_builddir@
575 top_srcdir = @top_srcdir@
576 @HAVE_LOCAL_LIBCSTRING_TRUE@AM_CPPFLAGS = \
577 @HAVE_LOCAL_LIBCSTRING_TRUE@ -I$(top_srcdir)/include \
578 @HAVE_LOCAL_LIBCSTRING_TRUE@ -I$(top_srcdir)/common
579
580 @HAVE_LOCAL_LIBCSTRING_TRUE@noinst_LTLIBRARIES = libcstring.la
581 @HAVE_LOCAL_LIBCSTRING_TRUE@libcstring_la_SOURCES = \
582 @HAVE_LOCAL_LIBCSTRING_TRUE@ libcstring_definitions.h \
583 @HAVE_LOCAL_LIBCSTRING_TRUE@ libcstring_extern.h \
584 @HAVE_LOCAL_LIBCSTRING_TRUE@ libcstring_narrow_string.h \
585 @HAVE_LOCAL_LIBCSTRING_TRUE@ libcstring_support.c libcstring_support.h \
586 @HAVE_LOCAL_LIBCSTRING_TRUE@ libcstring_system_string.h \
587 @HAVE_LOCAL_LIBCSTRING_TRUE@ libcstring_types.h \
588 @HAVE_LOCAL_LIBCSTRING_TRUE@ libcstring_unused.h \
589 @HAVE_LOCAL_LIBCSTRING_TRUE@ libcstring_wide_string.c libcstring_wide_string.h
590
591 MAINTAINERCLEANFILES = \
592 Makefile.in
593
594 all: all-am
595
596 .SUFFIXES:
597 .SUFFIXES: .c .lo .o .obj
598 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
599 @for dep in $?; do \
600 case '$(am__configure_deps)' in \
601 *$$dep*) \
602 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
603 && { if test -f $@; then exit 0; else break; fi; }; \
604 exit 1;; \
605 esac; \
606 done; \
607 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libcstring/Makefile'; \
608 $(am__cd) $(top_srcdir) && \
609 $(AUTOMAKE) --gnu libcstring/Makefile
610 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
611 @case '$?' in \
612 *config.status*) \
613 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
614 *) \
615 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
616 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
617 esac;
618
619 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
620 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
621
622 $(top_srcdir)/configure: $(am__configure_deps)
623 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
624 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
625 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
626 $(am__aclocal_m4_deps):
627
628 clean-noinstLTLIBRARIES:
629 -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
630 @list='$(noinst_LTLIBRARIES)'; \
631 locs=`for p in $$list; do echo $$p; done | \
632 sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
633 sort -u`; \
634 test -z "$$locs" || { \
635 echo rm -f $${locs}; \
636 rm -f $${locs}; \
637 }
638
639 libcstring.la: $(libcstring_la_OBJECTS) $(libcstring_la_DEPENDENCIES) $(EXTRA_libcstring_la_DEPENDENCIES)
640 $(AM_V_CCLD)$(LINK) $(am_libcstring_la_rpath) $(libcstring_la_OBJECTS) $(libcstring_la_LIBADD) $(LIBS)
641
642 mostlyclean-compile:
643 -rm -f *.$(OBJEXT)
644
645 distclean-compile:
646 -rm -f *.tab.c
647
648 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcstring_support.Plo@am__quote@
649 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcstring_wide_string.Plo@am__quote@
650
651 .c.o:
652 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
653 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
654 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
655 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
656 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
657
658 .c.obj:
659 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
660 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
661 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
662 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
663 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
664
665 .c.lo:
666 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
667 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
668 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
669 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
670 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
671
672 mostlyclean-libtool:
673 -rm -f *.lo
674
675 clean-libtool:
676 -rm -rf .libs _libs
677
678 ID: $(am__tagged_files)
679 $(am__define_uniq_tagged_files); mkid -fID $$unique
680 tags: tags-am
681 TAGS: tags
682
683 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
684 set x; \
685 here=`pwd`; \
686 $(am__define_uniq_tagged_files); \
687 shift; \
688 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
689 test -n "$$unique" || unique=$$empty_fix; \
690 if test $$# -gt 0; then \
691 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
692 "$$@" $$unique; \
693 else \
694 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
695 $$unique; \
696 fi; \
697 fi
698 ctags: ctags-am
699
700 CTAGS: ctags
701 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
702 $(am__define_uniq_tagged_files); \
703 test -z "$(CTAGS_ARGS)$$unique" \
704 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
705 $$unique
706
707 GTAGS:
708 here=`$(am__cd) $(top_builddir) && pwd` \
709 && $(am__cd) $(top_srcdir) \
710 && gtags -i $(GTAGS_ARGS) "$$here"
711 cscopelist: cscopelist-am
712
713 cscopelist-am: $(am__tagged_files)
714 list='$(am__tagged_files)'; \
715 case "$(srcdir)" in \
716 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
717 *) sdir=$(subdir)/$(srcdir) ;; \
718 esac; \
719 for i in $$list; do \
720 if test -f "$$i"; then \
721 echo "$(subdir)/$$i"; \
722 else \
723 echo "$$sdir/$$i"; \
724 fi; \
725 done >> $(top_builddir)/cscope.files
726
727 distclean-tags:
728 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
729
730 distdir: $(DISTFILES)
731 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
732 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
733 list='$(DISTFILES)'; \
734 dist_files=`for file in $$list; do echo $$file; done | \
735 sed -e "s|^$$srcdirstrip/||;t" \
736 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
737 case $$dist_files in \
738 */*) $(MKDIR_P) `echo "$$dist_files" | \
739 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
740 sort -u` ;; \
741 esac; \
742 for file in $$dist_files; do \
743 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
744 if test -d $$d/$$file; then \
745 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
746 if test -d "$(distdir)/$$file"; then \
747 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
748 fi; \
749 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
750 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
751 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
752 fi; \
753 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
754 else \
755 test -f "$(distdir)/$$file" \
756 || cp -p $$d/$$file "$(distdir)/$$file" \
757 || exit 1; \
758 fi; \
759 done
760 check-am: all-am
761 check: check-am
762 all-am: Makefile $(LTLIBRARIES)
763 installdirs:
764 install: install-am
765 install-exec: install-exec-am
766 install-data: install-data-am
767 uninstall: uninstall-am
768
769 install-am: all-am
770 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
771
772 installcheck: installcheck-am
773 install-strip:
774 if test -z '$(STRIP)'; then \
775 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
776 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
777 install; \
778 else \
779 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
780 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
781 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
782 fi
783 mostlyclean-generic:
784
785 clean-generic:
786
787 distclean-generic:
788 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
789 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
790
791 maintainer-clean-generic:
792 @echo "This command is intended for maintainers to use"
793 @echo "it deletes files that may require special tools to rebuild."
794 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
795 clean: clean-am
796
797 clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
798 mostlyclean-am
799
800 distclean-am: clean-am distclean-compile distclean-generic \
801 distclean-tags
802
803 dvi: dvi-am
804
805 dvi-am:
806
807 html: html-am
808
809 html-am:
810
811 info: info-am
812
813 info-am:
814
815 install-data-am:
816
817 install-dvi: install-dvi-am
818
819 install-dvi-am:
820
821 install-exec-am:
822
823 install-html: install-html-am
824
825 install-html-am:
826
827 install-info: install-info-am
828
829 install-info-am:
830
831 install-man:
832
833 install-pdf: install-pdf-am
834
835 install-pdf-am:
836
837 install-ps: install-ps-am
838
839 install-ps-am:
840
841 installcheck-am:
842
843 maintainer-clean: maintainer-clean-am
844 -rm -rf ./$(DEPDIR)
845 -rm -f Makefile
846 maintainer-clean-am: distclean-am maintainer-clean-generic
847
848 mostlyclean: mostlyclean-am
849
850 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
851 mostlyclean-libtool
852
853 pdf: pdf-am
854
855 pdf-am:
856
857 ps: ps-am
858
859 ps-am:
860
861 uninstall-am:
862
863 .MAKE: install-am install-strip
864
865 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
866 clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \
867 ctags-am distclean distclean-compile distclean-generic \
868 distclean-libtool distclean-tags distdir dvi dvi-am html \
869 html-am info info-am install install-am install-data \
870 install-data-am install-dvi install-dvi-am install-exec \
871 install-exec-am install-html install-html-am install-info \
872 install-info-am install-man install-pdf install-pdf-am \
873 install-ps install-ps-am install-strip installcheck \
874 installcheck-am installdirs maintainer-clean \
875 maintainer-clean-generic mostlyclean mostlyclean-compile \
876 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
877 tags tags-am uninstall uninstall-am
878
879 .PRECIOUS: Makefile
880
881
882 distclean: clean
883 /bin/rm -f Makefile
884
885 splint:
886 @echo "Running splint on libcstring ..."
887 -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcstring_la_SOURCES)
888
889 # Tell versions [3.59,3.63) of GNU make to not export all variables.
890 # Otherwise a system limit (for SysV at least) may be exceeded.
891 .NOEXPORT:
+0
-62
libcstring/libcstring_definitions.h less more
0 /*
1 * The internal definitions
2 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSTRING_INTERNAL_DEFINITIONS_H )
22 #define _LIBCSTRING_INTERNAL_DEFINITIONS_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring
27 */
28 #if !defined( HAVE_LOCAL_LIBCSTRING )
29 #include <libcstring/definitions.h>
30
31 /* The definitions in <libcstring/definitions.h> are copied here
32 * for local use of libcstring
33 */
34 #else
35
36 /* Detect if the code is being compiled with Windows Unicode support
37 */
38 #if defined( WINAPI ) && ( defined( _UNICODE ) || defined( UNICODE ) )
39 #define LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER 1
40 #endif
41
42 #define LIBCSTRING_VERSION 20160425
43
44 /* The libcstring version string
45 */
46 #define LIBCSTRING_VERSION_STRING "20160425"
47
48 #if defined( WINAPI ) && ( defined( _UNICODE ) || defined( UNICODE ) )
49 #define PRIc_LIBCSTRING_SYSTEM "lc"
50 #define PRIs_LIBCSTRING_SYSTEM "ls"
51
52 #else
53 #define PRIc_LIBCSTRING_SYSTEM "c"
54 #define PRIs_LIBCSTRING_SYSTEM "s"
55
56 #endif
57
58 #endif
59
60 #endif
61
+0
-46
libcstring/libcstring_extern.h less more
0 /*
1 * The internal extern definition
2 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSTRING_INTERNAL_EXTERN_H )
22 #define _LIBCSTRING_INTERNAL_EXTERN_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring
27 */
28 #if !defined( HAVE_LOCAL_LIBCSTRING )
29
30 /* If libtool DLL support is enabled set LIBCSTRING_DLL_EXPORT
31 * before including libcstring/extern.h
32 */
33 #if defined( _WIN32 ) && defined( DLL_EXPORT )
34 #define LIBCSTRING_DLL_EXPORT
35 #endif
36
37 #include <libcstring/extern.h>
38
39 #else
40 #define LIBCSTRING_EXTERN extern
41
42 #endif
43
44 #endif
45
+0
-188
libcstring/libcstring_narrow_string.h less more
0 /*
1 * Narrow character string functions
2 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSTRING_NARROW_STRING_H )
22 #define _LIBCSTRING_NARROW_STRING_H
23
24 #include <common.h>
25 #include <memory.h>
26 #include <types.h>
27
28 #if defined( HAVE_GLIB_H )
29 #include <glib.h>
30 #endif
31
32 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
33 #include <stdlib.h>
34 #endif
35
36 #if defined( HAVE_STRING_H ) || defined( WINAPI )
37 #include <string.h>
38 #endif
39
40 #include "libcstring_types.h"
41
42 #if defined( __cplusplus )
43 extern "C" {
44 #endif
45
46 /* String allocation
47 */
48 #define libcstring_narrow_string_allocate( size ) \
49 (char *) memory_allocate( sizeof( char ) * ( size ) )
50
51 /* String reallocation
52 */
53 #define libcstring_narrow_string_reallocate( string, size ) \
54 (char *) memory_reallocate( string, ( sizeof( char ) * ( size ) ) )
55
56 /* String length
57 */
58 #if defined( HAVE_STRLEN ) || defined( WINAPI )
59 #define libcstring_narrow_string_length( string ) \
60 strlen( string )
61 #endif
62
63 /* String compare
64 */
65 #if defined( HAVE_MEMCMP ) || defined( WINAPI )
66 #define libcstring_narrow_string_compare( string1, string2, size ) \
67 memcmp( (void *) string1, (void *) string2, size )
68
69 #elif defined( HAVE_STRNCMP )
70 #define libcstring_narrow_string_compare( string1, string2, size ) \
71 strncmp( string1, string2, size )
72 #endif
73
74 /* Caseless string compare
75 */
76 #if defined( HAVE_GLIB_H )
77 #define libcstring_narrow_string_compare_no_case( string1, string2, size ) \
78 g_ascii_strncasecmp( string1, string2, size )
79
80 #elif defined( _MSC_VER )
81 #define libcstring_narrow_string_compare_no_case( string1, string2, size ) \
82 _strnicmp( string1, string2, size )
83
84 #elif defined( WINAPI ) || defined( HAVE_STRNICMP )
85 #define libcstring_narrow_string_compare_no_case( string1, string2, size ) \
86 strnicmp( string1, string2, size )
87
88 #elif defined( HAVE_STRNCASECMP )
89 #define libcstring_narrow_string_compare_no_case( string1, string2, size ) \
90 strncasecmp( string1, string2, size )
91
92 #elif defined( HAVE_STRCASECMP )
93 #define libcstring_narrow_string_compare_no_case( string1, string2, size ) \
94 strcasecmp( string1, string2 )
95 #endif
96
97 /* String copy
98 */
99 #if defined( HAVE_MEMCPY ) || defined( WINAPI )
100 #define libcstring_narrow_string_copy( destination, source, size ) \
101 (char *) memcpy( (void *) destination, (void *) source, size )
102
103 #elif defined( HAVE_STRNCPY )
104 #define libcstring_narrow_string_copy( destination, source, size ) \
105 strncpy( destination, source, size )
106 #endif
107
108 /* String character search
109 */
110 #if defined( HAVE_MEMCHR ) || defined( WINAPI )
111 #define libcstring_narrow_string_search_character( string, character, size ) \
112 (char *) memchr( (void *) string, (int) character, size )
113
114 #elif defined( HAVE_STRCHR )
115 #define libcstring_narrow_string_search_character( string, character, size ) \
116 strchr( string, (int) character )
117 #endif
118
119 /* String reverse character search
120 */
121 #if defined( HAVE_MEMRCHR ) && ( HAVE_DECL_MEMRCHR == 1 )
122 #define libcstring_narrow_string_search_character_reverse( string, character, size ) \
123 (char *) memrchr( (void *) string, (int) character, size )
124
125 #elif defined( HAVE_STRRCHR ) || defined( WINAPI )
126 #define libcstring_narrow_string_search_character_reverse( string, character, size ) \
127 strrchr( string, (int) character )
128 #endif
129
130 /* String sub-string search
131 */
132 #if defined( HAVE_STRSTR ) || defined( WINAPI )
133 #define libcstring_narrow_string_search_string( string, substring, size ) \
134 strstr( string, substring )
135 #endif
136
137 /* String formatted print (snprintf)
138 */
139 #if defined( HAVE_GLIB_H )
140 #define libcstring_narrow_string_snprintf( target, size, ... ) \
141 g_snprintf( target, size, __VA_ARGS__ )
142
143 #elif defined( _MSC_VER )
144 #define libcstring_narrow_string_snprintf( target, size, ... ) \
145 sprintf_s( target, size, __VA_ARGS__ )
146
147 #elif defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )
148 #define libcstring_narrow_string_snprintf \
149 snprintf
150
151 #elif defined( HAVE_SNPRINTF ) || defined( WINAPI )
152 #define libcstring_narrow_string_snprintf( target, size, ... ) \
153 snprintf( target, size, __VA_ARGS__ )
154 #endif
155
156 /* String input conversion (sscanf)
157 */
158 #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )
159 #define libcstring_narrow_string_sscanf \
160 sscanf
161
162 #elif defined( HAVE_SSCANF ) || defined( WINAPI )
163 #define libcstring_narrow_string_sscanf( string, format, ... ) \
164 sscanf( string, format, __VA_ARGS__ )
165 #endif
166
167 /* Variable arguments formatted print to string function (vsnprintf)
168 */
169 #if defined( HAVE_GLIB_H )
170 #define libcstring_narrow_string_vsnprintf( string, size, format, ... ) \
171 g_vsnprintf( string, size, format, __VA_ARGS__ )
172
173 #elif defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )
174 #define libcstring_narrow_string_vsnprintf \
175 vsnprintf
176
177 #elif defined( HAVE_VSNPRINTF ) || defined( WINAPI )
178 #define libcstring_narrow_string_vsnprintf( string, size, format, ... ) \
179 vsnprintf( string, size, format, __VA_ARGS__ )
180 #endif
181
182 #if defined( __cplusplus )
183 }
184 #endif
185
186 #endif
187
+0
-39
libcstring/libcstring_support.c less more
0 /*
1 * Support functions
2 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <types.h>
23
24 #include "libcstring_definitions.h"
25 #include "libcstring_support.h"
26
27 #if !defined( HAVE_LOCAL_LIBCSTRING )
28
29 /* Returns the library version as a string
30 */
31 const char *libcstring_get_version(
32 void )
33 {
34 return( (const char *) LIBCSTRING_VERSION_STRING );
35 }
36
37 #endif /* !defined( HAVE_LOCAL_LIBCSTRING ) */
38
+0
-49
libcstring/libcstring_support.h less more
0 /*
1 * Support functions
2 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSTRING_SUPPORT_H )
22 #define _LIBCSTRING_SUPPORT_H
23
24 #include <common.h>
25 #include <types.h>
26
27 #include <stdio.h>
28
29 #include "libcstring_extern.h"
30
31 #if defined( __cplusplus )
32 extern "C" {
33 #endif
34
35 #if !defined( HAVE_LOCAL_LIBCSTRING )
36
37 LIBCSTRING_EXTERN \
38 const char *libcstring_get_version(
39 void );
40
41 #endif /* !defined( HAVE_LOCAL_LIBCSTRING ) */
42
43 #if defined( __cplusplus )
44 }
45 #endif
46
47 #endif /* !defined( _LIBCSTRING_SUPPORT_H ) */
48
+0
-154
libcstring/libcstring_system_string.h less more
0 /*
1 * System character type string functions
2 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSTRING_SYSTEM_STRING_H )
22 #define _LIBCSTRING_SYSTEM_STRING_H
23
24 #include <common.h>
25 #include <types.h>
26
27 #include "libcstring_definitions.h"
28 #include "libcstring_narrow_string.h"
29 #include "libcstring_types.h"
30 #include "libcstring_wide_string.h"
31
32 #if defined( _cplusplus )
33 extern "C" {
34 #endif
35
36 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
37
38 #if SIZEOF_WCHAR_T != 2
39 #error Unsupported wide system character size
40 #endif
41
42 /* Intermediate version of the macro required
43 * for correct evaluation predefined string
44 */
45 #define _LIBCSTRING_SYSTEM_STRING_INTERMEDIATE( string ) \
46 L ## string
47
48 #define _LIBCSTRING_SYSTEM_STRING( string ) \
49 _LIBCSTRING_SYSTEM_STRING_INTERMEDIATE( string )
50
51 #define libcstring_system_string_allocate( size ) \
52 libcstring_wide_string_allocate( size )
53
54 #define libcstring_system_string_reallocate( string, size ) \
55 libcstring_wide_string_reallocate( string, size )
56
57 #define libcstring_system_string_compare( destination, source, size ) \
58 libcstring_wide_string_compare( destination, source, size )
59
60 #define libcstring_system_string_compare_no_case( destination, source, size ) \
61 libcstring_wide_string_compare_no_case( destination, source, size )
62
63 #define libcstring_system_string_copy( destination, source, size ) \
64 libcstring_wide_string_copy( destination, source, size )
65
66 #define libcstring_system_string_length( string ) \
67 libcstring_wide_string_length( string )
68
69 #define libcstring_system_string_search_character( string, character, size ) \
70 libcstring_wide_string_search_character( string, character, size )
71
72 #define libcstring_system_string_search_character_reverse( string, character, size ) \
73 libcstring_wide_string_search_character_reverse( string, character, size )
74
75 #define libcstring_system_string_search_string( string, substring, size ) \
76 libcstring_wide_string_search_string( string, substring, size )
77
78 #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )
79 #define libcstring_system_string_sprintf \
80 libcstring_wide_string_snwprintf
81
82 #else
83 #define libcstring_system_string_sprintf( string, size, format, ... ) \
84 libcstring_wide_string_snwprintf( string, size, format, __VA_ARGS__ )
85 #endif
86
87 #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )
88 #define libcstring_system_string_vsprintf \
89 libcstring_wide_string_vsnwprintf
90
91 #else
92 #define libcstring_system_string_vsprintf( string, size, format, ... ) \
93 libcstring_wide_string_vsnwprintf( string, size, format, __VA_ARGS__ )
94 #endif
95
96 #else
97
98 #define _LIBCSTRING_SYSTEM_STRING( string ) \
99 string
100
101 #define libcstring_system_string_allocate( size ) \
102 libcstring_narrow_string_allocate( size )
103
104 #define libcstring_system_string_reallocate( string, size ) \
105 libcstring_narrow_string_reallocate( string, size )
106
107 #define libcstring_system_string_compare( destination, source, size ) \
108 libcstring_narrow_string_compare( destination, source, size )
109
110 #define libcstring_system_string_compare_no_case( destination, source, size ) \
111 libcstring_narrow_string_compare_no_case( destination, source, size )
112
113 #define libcstring_system_string_copy( destination, source, size ) \
114 libcstring_narrow_string_copy( destination, source, size )
115
116 #define libcstring_system_string_length( string ) \
117 libcstring_narrow_string_length( string )
118
119 #define libcstring_system_string_search_character( string, character, size ) \
120 libcstring_narrow_string_search_character( string, character, size )
121
122 #define libcstring_system_string_search_character_reverse( string, character, size ) \
123 libcstring_narrow_string_search_character_reverse( string, character, size )
124
125 #define libcstring_system_string_search_string( string, substring, size ) \
126 libcstring_narrow_string_search_string( string, substring, size )
127
128 #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )
129 #define libcstring_system_string_sprintf \
130 libcstring_narrow_string_snprintf
131
132 #else
133 #define libcstring_system_string_sprintf( string, size, format, ... ) \
134 libcstring_narrow_string_snprintf( string, size, format, __VA_ARGS__ )
135 #endif
136
137 #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )
138 #define libcstring_system_string_vsprintf \
139 libcstring_narrow_string_vsnprintf
140
141 #else
142 #define libcstring_system_string_vsprintf( string, size, format, ... ) \
143 libcstring_narrow_string_vsnprintf( string, size, format, __VA_ARGS__ )
144 #endif
145
146 #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */
147
148 #if defined( _cplusplus )
149 }
150 #endif
151
152 #endif
153
+0
-63
libcstring/libcstring_types.h less more
0 /*
1 * Type definitions
2 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSTRING_TYPES_H )
22 #define _LIBCSTRING_TYPES_H
23
24 #include <common.h>
25 #include <types.h>
26
27 #if defined( _cplusplus )
28 extern "C" {
29 #endif
30
31 /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring
32 * The definitions in <libcstring/types.h> are copied here
33 * for local use of libcstring
34 */
35 #if defined( HAVE_LOCAL_LIBCSTRING )
36
37 #if defined( WINAPI ) && ( defined( _UNICODE ) || defined( UNICODE ) )
38
39 /* The system character type is wide
40 * A system string contains either UTF-16 or UTF-32
41 */
42 typedef wchar_t libcstring_system_character_t;
43 typedef wint_t libcstring_system_integer_t;
44
45 #else
46
47 /* The system character type is narrow
48 * A system string contains either UTF-8 or extended ASCII with a codepage
49 */
50 typedef char libcstring_system_character_t;
51 typedef int libcstring_system_integer_t;
52
53 #endif
54
55 #endif
56
57 #if defined( _cplusplus )
58 }
59 #endif
60
61 #endif
62
+0
-44
libcstring/libcstring_unused.h less more
0 /*
1 * The internal unused definition
2 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSTRING_INTERNAL_UNUSED_H )
22 #define _LIBCSTRING_INTERNAL_UNUSED_H
23
24 #include <common.h>
25
26 #if !defined( LIBCSTRING_ATTRIBUTE_UNUSED )
27 #if defined( __GNUC__ ) && __GNUC__ >= 3
28 #define LIBCSTRING_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
29 #else
30 #define LIBCSTRING_ATTRIBUTE_UNUSED
31 #endif
32 #endif
33
34 #if defined( _MSC_VER )
35 #define LIBCSTRING_UNREFERENCED_PARAMETER( parameter ) \
36 UNREFERENCED_PARAMETER( parameter );
37 #else
38 #define LIBCSTRING_UNREFERENCED_PARAMETER( parameter ) \
39 /* parameter */
40 #endif
41
42 #endif /* !defined( _LIBCSTRING_INTERNAL_UNUSED_H ) */
43
+0
-70
libcstring/libcstring_wide_string.c less more
0 /*
1 * Wide character string functions
2 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <types.h>
23
24 #if defined( HAVE_WCTYPE_H )
25 #include <wctype.h>
26 #endif
27
28 #include "libcstring_types.h"
29 #include "libcstring_wide_string.h"
30
31 #if defined( TOWLOWER ) && !defined( HAVE_WCSNCASECMP ) && !defined( HAVE_WCSCASECMP ) && !defined( WINAPI )
32
33 /* Replacement for missing: wcsncasecmp
34 * Compares no more than a specified number of wide characters of string1 and string2,
35 * ignoring case, returning less than, equal to or greater than zero if string1 is
36 * less than, equal to or greater than string.
37 */
38 int libcstring_wide_string_compare_no_case(
39 const wchar_t *string1,
40 const wchar_t *string2,
41 size_t comparision_length )
42 {
43 wint_t character1 = 0;
44 wint_t character2 = 0;
45
46 if( string1 == string2 )
47 {
48 return( 0 );
49 }
50 while( comparision_length > 0 )
51 {
52 character1 = towlower( *string1 );
53 character2 = towlower( *string2 );
54
55 if( ( character1 == 0 )
56 || ( character1 != character2 ) )
57 {
58 return( character1 - character2 );
59 }
60 string1++;
61 string2++;
62
63 comparision_length--;
64 }
65 return( 0 );
66 }
67
68 #endif /* defined( TOWLOWER ) && !defined( HAVE_WCSNCASECMP ) && !defined( HAVE_WCSCASECMP ) && !defined( WINAPI ) */
69
+0
-176
libcstring/libcstring_wide_string.h less more
0 /*
1 * Wide character string functions
2 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSTRING_WIDE_STRING_H )
22 #define _LIBCSTRING_WIDE_STRING_H
23
24 #include <common.h>
25 #include <memory.h>
26 #include <types.h>
27
28 #if defined( HAVE_WCHAR_H ) || defined( WINAPI )
29 #include <wchar.h>
30 #endif
31
32 #include "libcstring_extern.h"
33 #include "libcstring_types.h"
34
35 #if defined( __cplusplus )
36 extern "C" {
37 #endif
38
39 /* String allocation
40 */
41 #define libcstring_wide_string_allocate( size ) \
42 (wchar_t *) memory_allocate( sizeof( wchar_t ) * ( size ) )
43
44 /* String reallocation
45 */
46 #define libcstring_wide_string_reallocate( string, size ) \
47 (wchar_t *) memory_reallocate( string, ( sizeof( wchar_t ) * ( size ) ) )
48
49 /* String length
50 */
51 #if defined( HAVE_WCSLEN ) || defined( WINAPI )
52 #define libcstring_wide_string_length( string ) \
53 wcslen( string )
54 #endif
55
56 /* String compare
57 */
58 #if defined( HAVE_WMEMCMP )
59 #define libcstring_wide_string_compare( string1, string2, size ) \
60 wmemcmp( (void *) string1, (void *) string2, size )
61
62 #elif defined( HAVE_WCSNCMP ) || defined( WINAPI )
63 #define libcstring_wide_string_compare( string1, string2, size ) \
64 wcsncmp( string1, string2, size )
65 #endif
66
67 /* Caseless string compare
68 */
69 #if defined( _MSC_VER ) || ( defined( __BORLANDC__ ) && ( __BORLANDC__ >= 0x0551 ) )
70 #define libcstring_wide_string_compare_no_case( string1, string2, size ) \
71 _wcsnicmp( string1, string2, size )
72
73 #elif defined( WINAPI ) || defined( HAVE_WCSNICMP )
74 #define libcstring_wide_string_compare_no_case( string1, string2, size ) \
75 wcsnicmp( string1, string2, size )
76
77 #elif defined( HAVE_WCSNCASECMP )
78 #define libcstring_wide_string_compare_no_case( string1, string2, size ) \
79 wcsncasecmp( string1, string2, size )
80
81 #elif defined( HAVE_WCSCASECMP )
82 #define libcstring_wide_string_compare_no_case( string1, string2, size ) \
83 wcscasecmp( string1, string2 )
84
85 #elif defined( HAVE_TOWLOWER )
86 LIBCSTRING_EXTERN \
87 int libcstring_wide_string_compare_no_case(
88 const wchar_t *string1,
89 const wchar_t *string2,
90 size_t comparision_length );
91
92 #endif
93
94 /* String copy
95 */
96 #if defined( HAVE_WMEMCPY )
97 #define libcstring_wide_string_copy( destination, source, size ) \
98 (wchar_t *) wmemcpy( (void *) destination, (void *) source, size )
99
100 #elif defined( HAVE_WCSNCPY ) || defined( WINAPI )
101 #define libcstring_wide_string_copy( destination, source, size ) \
102 wcsncpy( destination, source, size )
103 #endif
104
105 /* String character search
106 */
107 #if defined( HAVE_WMEMCHR )
108 #define libcstring_wide_string_search_character( string, character, size ) \
109 (wchar_t *) wmemchr( (void *) string, (wchar_t) character, size )
110
111 #elif defined( HAVE_WCSCHR ) || defined( WINAPI )
112 #define libcstring_wide_string_search_character( string, character, size ) \
113 wcschr( string, (wchar_t) character )
114
115 #endif
116
117 /* String reverse character search
118 */
119 #if defined( HAVE_WMEMRCHR )
120 #define libcstring_wide_string_search_character_reverse( string, character, size ) \
121 (wchar_t *) wmemrchr( (void *) string, (wchar_t) character, size )
122
123 #elif defined( HAVE_WCSRCHR ) || defined( WINAPI )
124 #define libcstring_wide_string_search_character_reverse( string, character, size ) \
125 wcsrchr( string, (wchar_t) character )
126 #endif
127
128 /* String sub-string search
129 */
130 #if defined( HAVE_WCSSTR ) || defined( WINAPI )
131 #define libcstring_wide_string_search_string( string, substring, size ) \
132 wcsstr( string, substring )
133
134 #endif
135
136 /* String formatted print (snwprintf)
137 */
138 #if defined( _MSC_VER )
139 #define libcstring_wide_string_snwprintf( target, size, ... ) \
140 swprintf_s( target, size, __VA_ARGS__ )
141
142 #elif defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )
143 #define libcstring_wide_string_snwprintf \
144 snwprintf
145
146 #elif defined( WINAPI )
147 #define libcstring_wide_string_snwprintf( target, size, ... ) \
148 snwprintf( target, size, __VA_ARGS__ )
149
150 #elif defined( HAVE_SWPRINTF )
151 #define libcstring_wide_string_snwprintf( target, size, ... ) \
152 swprintf( target, size, __VA_ARGS__ )
153 #endif
154
155 /* Variable arguments formatted print to string function (vsnwprintf)
156 */
157 #if defined( __BORLANDC__ ) && ( __BORLANDC__ < 0x0560 )
158 #define libcstring_wide_string_vsnwprintf \
159 _vsnwprintf
160
161 #elif defined( WINAPI )
162 #define libcstring_wide_string_vsnwprintf( string, size, format, ... ) \
163 _vsnwprintf( string, size, format, __VA_ARGS__ )
164
165 #elif defined( HAVE_VSWPRINTF )
166 #define libcstring_wide_string_vsnwprintf( string, size, format, ... ) \
167 vswprintf( string, size, format, __VA_ARGS__ )
168 #endif
169
170 #if defined( __cplusplus )
171 }
172 #endif
173
174 #endif
175
+0
-45
libcsystem/Makefile.am less more
0 if HAVE_LOCAL_LIBCSYSTEM
1 AM_CPPFLAGS = \
2 -I$(top_srcdir)/include \
3 -I$(top_srcdir)/common \
4 @LIBCSTRING_CPPFLAGS@ \
5 @LIBCERROR_CPPFLAGS@ \
6 @LIBCLOCALE_CPPFLAGS@ \
7 @LIBCNOTIFY_CPPFLAGS@ \
8 @LIBUNA_CPPFLAGS@
9
10 noinst_LTLIBRARIES = libcsystem.la
11
12 libcsystem_la_SOURCES = \
13 libcsystem_definitions.h \
14 libcsystem_error.c libcsystem_error.h \
15 libcsystem_extern.h \
16 libcsystem_find.h \
17 libcsystem_file_io.h \
18 libcsystem_getopt.c libcsystem_getopt.h \
19 libcsystem_glob.c libcsystem_glob.h \
20 libcsystem_i18n.h \
21 libcsystem_libcstring.h \
22 libcsystem_libcerror.h \
23 libcsystem_libclocale.h \
24 libcsystem_libcnotify.h \
25 libcsystem_libcstring.h \
26 libcsystem_libuna.h \
27 libcsystem_signal.c libcsystem_signal.h \
28 libcsystem_string.c libcsystem_string.h \
29 libcsystem_support.c libcsystem_support.h \
30 libcsystem_types.h \
31 libcsystem_unused.h
32 endif
33
34
35 MAINTAINERCLEANFILES = \
36 Makefile.in
37
38 distclean: clean
39 /bin/rm -f Makefile
40
41 splint:
42 @echo "Running splint on libcsystem ..."
43 -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcsystem_la_SOURCES)
44
+0
-920
libcsystem/Makefile.in less more
0 # Makefile.in generated by automake 1.15 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994-2014 Free Software Foundation, Inc.
4
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 VPATH = @srcdir@
17 am__is_gnu_make = { \
18 if test -z '$(MAKELEVEL)'; then \
19 false; \
20 elif test -n '$(MAKE_HOST)'; then \
21 true; \
22 elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
23 true; \
24 else \
25 false; \
26 fi; \
27 }
28 am__make_running_with_option = \
29 case $${target_option-} in \
30 ?) ;; \
31 *) echo "am__make_running_with_option: internal error: invalid" \
32 "target option '$${target_option-}' specified" >&2; \
33 exit 1;; \
34 esac; \
35 has_opt=no; \
36 sane_makeflags=$$MAKEFLAGS; \
37 if $(am__is_gnu_make); then \
38 sane_makeflags=$$MFLAGS; \
39 else \
40 case $$MAKEFLAGS in \
41 *\\[\ \ ]*) \
42 bs=\\; \
43 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
44 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
45 esac; \
46 fi; \
47 skip_next=no; \
48 strip_trailopt () \
49 { \
50 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
51 }; \
52 for flg in $$sane_makeflags; do \
53 test $$skip_next = yes && { skip_next=no; continue; }; \
54 case $$flg in \
55 *=*|--*) continue;; \
56 -*I) strip_trailopt 'I'; skip_next=yes;; \
57 -*I?*) strip_trailopt 'I';; \
58 -*O) strip_trailopt 'O'; skip_next=yes;; \
59 -*O?*) strip_trailopt 'O';; \
60 -*l) strip_trailopt 'l'; skip_next=yes;; \
61 -*l?*) strip_trailopt 'l';; \
62 -[dEDm]) skip_next=yes;; \
63 -[JT]) skip_next=yes;; \
64 esac; \
65 case $$flg in \
66 *$$target_option*) has_opt=yes; break;; \
67 esac; \
68 done; \
69 test $$has_opt = yes
70 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
71 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
72 pkgdatadir = $(datadir)/@PACKAGE@
73 pkgincludedir = $(includedir)/@PACKAGE@
74 pkglibdir = $(libdir)/@PACKAGE@
75 pkglibexecdir = $(libexecdir)/@PACKAGE@
76 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
77 install_sh_DATA = $(install_sh) -c -m 644
78 install_sh_PROGRAM = $(install_sh) -c
79 install_sh_SCRIPT = $(install_sh) -c
80 INSTALL_HEADER = $(INSTALL_DATA)
81 transform = $(program_transform_name)
82 NORMAL_INSTALL = :
83 PRE_INSTALL = :
84 POST_INSTALL = :
85 NORMAL_UNINSTALL = :
86 PRE_UNINSTALL = :
87 POST_UNINSTALL = :
88 build_triplet = @build@
89 host_triplet = @host@
90 subdir = libcsystem
91 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
92 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \
93 $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/iconv.m4 \
94 $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
95 $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
96 $(top_srcdir)/m4/libbfio.m4 $(top_srcdir)/m4/libcdata.m4 \
97 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
98 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
99 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
104 $(top_srcdir)/m4/libfvalue.m4 $(top_srcdir)/m4/libfwnt.m4 \
105 $(top_srcdir)/m4/libmapidb.m4 $(top_srcdir)/m4/libtool.m4 \
106 $(top_srcdir)/m4/libuna.m4 $(top_srcdir)/m4/ltoptions.m4 \
107 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
108 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
113 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114 $(ACLOCAL_M4)
115 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
116 mkinstalldirs = $(install_sh) -d
117 CONFIG_HEADER = $(top_builddir)/common/config.h
118 CONFIG_CLEAN_FILES =
119 CONFIG_CLEAN_VPATH_FILES =
120 LTLIBRARIES = $(noinst_LTLIBRARIES)
121 libcsystem_la_LIBADD =
122 am__libcsystem_la_SOURCES_DIST = libcsystem_definitions.h \
123 libcsystem_error.c libcsystem_error.h libcsystem_extern.h \
124 libcsystem_find.h libcsystem_file_io.h libcsystem_getopt.c \
125 libcsystem_getopt.h libcsystem_glob.c libcsystem_glob.h \
126 libcsystem_i18n.h libcsystem_libcstring.h \
127 libcsystem_libcerror.h libcsystem_libclocale.h \
128 libcsystem_libcnotify.h libcsystem_libuna.h \
129 libcsystem_signal.c libcsystem_signal.h libcsystem_string.c \
130 libcsystem_string.h libcsystem_support.c libcsystem_support.h \
131 libcsystem_types.h libcsystem_unused.h
132 @HAVE_LOCAL_LIBCSYSTEM_TRUE@am_libcsystem_la_OBJECTS = \
133 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_error.lo \
134 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_getopt.lo \
135 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_glob.lo \
136 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_signal.lo \
137 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_string.lo \
138 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_support.lo
139 libcsystem_la_OBJECTS = $(am_libcsystem_la_OBJECTS)
140 AM_V_lt = $(am__v_lt_@AM_V@)
141 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
142 am__v_lt_0 = --silent
143 am__v_lt_1 =
144 @HAVE_LOCAL_LIBCSYSTEM_TRUE@am_libcsystem_la_rpath =
145 AM_V_P = $(am__v_P_@AM_V@)
146 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
147 am__v_P_0 = false
148 am__v_P_1 = :
149 AM_V_GEN = $(am__v_GEN_@AM_V@)
150 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
151 am__v_GEN_0 = @echo " GEN " $@;
152 am__v_GEN_1 =
153 AM_V_at = $(am__v_at_@AM_V@)
154 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
155 am__v_at_0 = @
156 am__v_at_1 =
157 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/common
158 depcomp = $(SHELL) $(top_srcdir)/depcomp
159 am__depfiles_maybe = depfiles
160 am__mv = mv -f
161 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
162 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
163 LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
164 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
165 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
166 $(AM_CFLAGS) $(CFLAGS)
167 AM_V_CC = $(am__v_CC_@AM_V@)
168 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
169 am__v_CC_0 = @echo " CC " $@;
170 am__v_CC_1 =
171 CCLD = $(CC)
172 LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
173 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
174 $(AM_LDFLAGS) $(LDFLAGS) -o $@
175 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
176 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
177 am__v_CCLD_0 = @echo " CCLD " $@;
178 am__v_CCLD_1 =
179 SOURCES = $(libcsystem_la_SOURCES)
180 DIST_SOURCES = $(am__libcsystem_la_SOURCES_DIST)
181 am__can_run_installinfo = \
182 case $$AM_UPDATE_INFO_DIR in \
183 n|no|NO) false;; \
184 *) (install-info --version) >/dev/null 2>&1;; \
185 esac
186 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
187 # Read a list of newline-separated strings from the standard input,
188 # and print each of them once, without duplicates. Input order is
189 # *not* preserved.
190 am__uniquify_input = $(AWK) '\
191 BEGIN { nonempty = 0; } \
192 { items[$$0] = 1; nonempty = 1; } \
193 END { if (nonempty) { for (i in items) print i; }; } \
194 '
195 # Make sure the list of sources is unique. This is necessary because,
196 # e.g., the same source file might be shared among _SOURCES variables
197 # for different programs/libraries.
198 am__define_uniq_tagged_files = \
199 list='$(am__tagged_files)'; \
200 unique=`for i in $$list; do \
201 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
202 done | $(am__uniquify_input)`
203 ETAGS = etags
204 CTAGS = ctags
205 am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
206 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
207 ACLOCAL = @ACLOCAL@
208 AMTAR = @AMTAR@
209 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
210 AR = @AR@
211 AS = @AS@
212 AUTOCONF = @AUTOCONF@
213 AUTOHEADER = @AUTOHEADER@
214 AUTOMAKE = @AUTOMAKE@
215 AWK = @AWK@
216 CC = @CC@
217 CCDEPMODE = @CCDEPMODE@
218 CFLAGS = @CFLAGS@
219 CPP = @CPP@
220 CPPFLAGS = @CPPFLAGS@
221 CYGPATH_W = @CYGPATH_W@
222 DEFS = @DEFS@
223 DEPDIR = @DEPDIR@
224 DLLTOOL = @DLLTOOL@
225 DPKG_DATE = @DPKG_DATE@
226 DSYMUTIL = @DSYMUTIL@
227 DUMPBIN = @DUMPBIN@
228 ECHO_C = @ECHO_C@
229 ECHO_N = @ECHO_N@
230 ECHO_T = @ECHO_T@
231 EGREP = @EGREP@
232 EXEEXT = @EXEEXT@
233 FGREP = @FGREP@
234 GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
235 GMSGFMT = @GMSGFMT@
236 GMSGFMT_015 = @GMSGFMT_015@
237 GREP = @GREP@
238 HAVE_DLLMAIN = @HAVE_DLLMAIN@
239 HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
240 HAVE_LIBBFIO = @HAVE_LIBBFIO@
241 HAVE_LIBCDATA = @HAVE_LIBCDATA@
242 HAVE_LIBCERROR = @HAVE_LIBCERROR@
243 HAVE_LIBCFILE = @HAVE_LIBCFILE@
244 HAVE_LIBCLOCALE = @HAVE_LIBCLOCALE@
245 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
246 HAVE_LIBCPATH = @HAVE_LIBCPATH@
247 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
248 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
249 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
250 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
251 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
252 HAVE_LIBFDATA = @HAVE_LIBFDATA@
253 HAVE_LIBFDATETIME = @HAVE_LIBFDATETIME@
254 HAVE_LIBFGUID = @HAVE_LIBFGUID@
255 HAVE_LIBFMAPI = @HAVE_LIBFMAPI@
256 HAVE_LIBFVALUE = @HAVE_LIBFVALUE@
257 HAVE_LIBFWNT = @HAVE_LIBFWNT@
258 HAVE_LIBMAPIDB = @HAVE_LIBMAPIDB@
259 HAVE_LIBUNA = @HAVE_LIBUNA@
260 HAVE_LOCAL_LIBBFIO = @HAVE_LOCAL_LIBBFIO@
261 HAVE_LOCAL_LIBCDATA = @HAVE_LOCAL_LIBCDATA@
262 HAVE_LOCAL_LIBCERROR = @HAVE_LOCAL_LIBCERROR@
263 HAVE_LOCAL_LIBCFILE = @HAVE_LOCAL_LIBCFILE@
264 HAVE_LOCAL_LIBCLOCALE = @HAVE_LOCAL_LIBCLOCALE@
265 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
266 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
267 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
268 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
269 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
270 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
271 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
272 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
273 HAVE_LOCAL_LIBFDATETIME = @HAVE_LOCAL_LIBFDATETIME@
274 HAVE_LOCAL_LIBFGUID = @HAVE_LOCAL_LIBFGUID@
275 HAVE_LOCAL_LIBFMAPI = @HAVE_LOCAL_LIBFMAPI@
276 HAVE_LOCAL_LIBFVALUE = @HAVE_LOCAL_LIBFVALUE@
277 HAVE_LOCAL_LIBFWNT = @HAVE_LOCAL_LIBFWNT@
278 HAVE_LOCAL_LIBMAPIDB = @HAVE_LOCAL_LIBMAPIDB@
279 HAVE_LOCAL_LIBUNA = @HAVE_LOCAL_LIBUNA@
280 HAVE_MULTI_THREAD_SUPPORT = @HAVE_MULTI_THREAD_SUPPORT@
281 HAVE_OFF64_T = @HAVE_OFF64_T@
282 HAVE_PTHREAD = @HAVE_PTHREAD@
283 HAVE_SIZE32_T = @HAVE_SIZE32_T@
284 HAVE_SIZE64_T = @HAVE_SIZE64_T@
285 HAVE_SSIZE32_T = @HAVE_SSIZE32_T@
286 HAVE_SSIZE64_T = @HAVE_SSIZE64_T@
287 HAVE_STDINT_H = @HAVE_STDINT_H@
288 HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
289 HAVE_WCHAR_H = @HAVE_WCHAR_H@
290 HAVE_WIDE_CHARACTER_TYPE = @HAVE_WIDE_CHARACTER_TYPE@
291 INSTALL = @INSTALL@
292 INSTALL_DATA = @INSTALL_DATA@
293 INSTALL_PROGRAM = @INSTALL_PROGRAM@
294 INSTALL_SCRIPT = @INSTALL_SCRIPT@
295 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
296 INTLLIBS = @INTLLIBS@
297 INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
298 LD = @LD@
299 LDFLAGS = @LDFLAGS@
300 LIBBFIO_CPPFLAGS = @LIBBFIO_CPPFLAGS@
301 LIBBFIO_LIBADD = @LIBBFIO_LIBADD@
302 LIBCDATA_CPPFLAGS = @LIBCDATA_CPPFLAGS@
303 LIBCDATA_LIBADD = @LIBCDATA_LIBADD@
304 LIBCERROR_CPPFLAGS = @LIBCERROR_CPPFLAGS@
305 LIBCERROR_LIBADD = @LIBCERROR_LIBADD@
306 LIBCFILE_CPPFLAGS = @LIBCFILE_CPPFLAGS@
307 LIBCFILE_LIBADD = @LIBCFILE_LIBADD@
308 LIBCLOCALE_CPPFLAGS = @LIBCLOCALE_CPPFLAGS@
309 LIBCLOCALE_LIBADD = @LIBCLOCALE_LIBADD@
310 LIBCNOTIFY_CPPFLAGS = @LIBCNOTIFY_CPPFLAGS@
311 LIBCNOTIFY_LIBADD = @LIBCNOTIFY_LIBADD@
312 LIBCPATH_CPPFLAGS = @LIBCPATH_CPPFLAGS@
313 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
314 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
315 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
316 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
317 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
318 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
319 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
320 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
321 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
322 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
323 LIBFCACHE_CPPFLAGS = @LIBFCACHE_CPPFLAGS@
324 LIBFCACHE_LIBADD = @LIBFCACHE_LIBADD@
325 LIBFDATA_CPPFLAGS = @LIBFDATA_CPPFLAGS@
326 LIBFDATA_LIBADD = @LIBFDATA_LIBADD@
327 LIBFDATETIME_CPPFLAGS = @LIBFDATETIME_CPPFLAGS@
328 LIBFDATETIME_LIBADD = @LIBFDATETIME_LIBADD@
329 LIBFGUID_CPPFLAGS = @LIBFGUID_CPPFLAGS@
330 LIBFGUID_LIBADD = @LIBFGUID_LIBADD@
331 LIBFMAPI_CPPFLAGS = @LIBFMAPI_CPPFLAGS@
332 LIBFMAPI_LIBADD = @LIBFMAPI_LIBADD@
333 LIBFVALUE_CPPFLAGS = @LIBFVALUE_CPPFLAGS@
334 LIBFVALUE_LIBADD = @LIBFVALUE_LIBADD@
335 LIBFWNT_CPPFLAGS = @LIBFWNT_CPPFLAGS@
336 LIBFWNT_LIBADD = @LIBFWNT_LIBADD@
337 LIBICONV = @LIBICONV@
338 LIBINTL = @LIBINTL@
339 LIBMAPIDB_CPPFLAGS = @LIBMAPIDB_CPPFLAGS@
340 LIBMAPIDB_LIBADD = @LIBMAPIDB_LIBADD@
341 LIBOBJS = @LIBOBJS@
342 LIBS = @LIBS@
343 LIBTOOL = @LIBTOOL@
344 LIBTOOL_DEPS = @LIBTOOL_DEPS@
345 LIBUNA_CPPFLAGS = @LIBUNA_CPPFLAGS@
346 LIBUNA_LIBADD = @LIBUNA_LIBADD@
347 LIPO = @LIPO@
348 LN_S = @LN_S@
349 LTLIBICONV = @LTLIBICONV@
350 LTLIBINTL = @LTLIBINTL@
351 LTLIBOBJS = @LTLIBOBJS@
352 MAKEINFO = @MAKEINFO@
353 MANIFEST_TOOL = @MANIFEST_TOOL@
354 MKDIR_P = @MKDIR_P@
355 MSGFMT = @MSGFMT@
356 MSGFMT_015 = @MSGFMT_015@
357 MSGMERGE = @MSGMERGE@
358 NM = @NM@
359 NMEDIT = @NMEDIT@
360 OBJDUMP = @OBJDUMP@
361 OBJEXT = @OBJEXT@
362 OTOOL = @OTOOL@
363 OTOOL64 = @OTOOL64@
364 PACKAGE = @PACKAGE@
365 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
366 PACKAGE_NAME = @PACKAGE_NAME@
367 PACKAGE_STRING = @PACKAGE_STRING@
368 PACKAGE_TARNAME = @PACKAGE_TARNAME@
369 PACKAGE_URL = @PACKAGE_URL@
370 PACKAGE_VERSION = @PACKAGE_VERSION@
371 PATH_SEPARATOR = @PATH_SEPARATOR@
372 PKGCONFIG = @PKGCONFIG@
373 PKG_CONFIG = @PKG_CONFIG@
374 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
375 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
376 POSUB = @POSUB@
377 PTHREAD_CPPFLAGS = @PTHREAD_CPPFLAGS@
378 PTHREAD_LIBADD = @PTHREAD_LIBADD@
379 PWD = @PWD@
380 PYTHON = @PYTHON@
381 PYTHON2 = @PYTHON2@
382 PYTHON2_CONFIG = @PYTHON2_CONFIG@
383 PYTHON2_CPPFLAGS = @PYTHON2_CPPFLAGS@
384 PYTHON2_EXEC_PREFIX = @PYTHON2_EXEC_PREFIX@
385 PYTHON2_LDFLAGS = @PYTHON2_LDFLAGS@
386 PYTHON2_LIBRARY_DIR = @PYTHON2_LIBRARY_DIR@
387 PYTHON2_PACKAGE_DIR = @PYTHON2_PACKAGE_DIR@
388 PYTHON2_PLATFORM = @PYTHON2_PLATFORM@
389 PYTHON2_PREFIX = @PYTHON2_PREFIX@
390 PYTHON2_VERSION = @PYTHON2_VERSION@
391 PYTHON3 = @PYTHON3@
392 PYTHON3_CONFIG = @PYTHON3_CONFIG@
393 PYTHON3_CPPFLAGS = @PYTHON3_CPPFLAGS@
394 PYTHON3_EXEC_PREFIX = @PYTHON3_EXEC_PREFIX@
395 PYTHON3_LDFLAGS = @PYTHON3_LDFLAGS@
396 PYTHON3_LIBRARY_DIR = @PYTHON3_LIBRARY_DIR@
397 PYTHON3_PACKAGE_DIR = @PYTHON3_PACKAGE_DIR@
398 PYTHON3_PLATFORM = @PYTHON3_PLATFORM@
399 PYTHON3_PREFIX = @PYTHON3_PREFIX@
400 PYTHON3_VERSION = @PYTHON3_VERSION@
401 PYTHON_CONFIG = @PYTHON_CONFIG@
402 PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
403 PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
404 PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
405 PYTHON_LIBRARY_DIR = @PYTHON_LIBRARY_DIR@
406 PYTHON_PACKAGE_DIR = @PYTHON_PACKAGE_DIR@
407 PYTHON_PLATFORM = @PYTHON_PLATFORM@
408 PYTHON_PREFIX = @PYTHON_PREFIX@
409 PYTHON_VERSION = @PYTHON_VERSION@
410 RANLIB = @RANLIB@
411 SED = @SED@
412 SET_MAKE = @SET_MAKE@
413 SHELL = @SHELL@
414 SPEC_DATE = @SPEC_DATE@
415 STATIC_LDFLAGS = @STATIC_LDFLAGS@
416 STRIP = @STRIP@
417 USE_NLS = @USE_NLS@
418 VERSION = @VERSION@
419 XGETTEXT = @XGETTEXT@
420 XGETTEXT_015 = @XGETTEXT_015@
421 XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
422 abs_builddir = @abs_builddir@
423 abs_srcdir = @abs_srcdir@
424 abs_top_builddir = @abs_top_builddir@
425 abs_top_srcdir = @abs_top_srcdir@
426 ac_ct_AR = @ac_ct_AR@
427 ac_ct_CC = @ac_ct_CC@
428 ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
429 am__include = @am__include@
430 am__leading_dot = @am__leading_dot@
431 am__quote = @am__quote@
432 am__tar = @am__tar@
433 am__untar = @am__untar@
434 ax_libbfio_pc_libs_private = @ax_libbfio_pc_libs_private@
435 ax_libbfio_spec_build_requires = @ax_libbfio_spec_build_requires@
436 ax_libbfio_spec_requires = @ax_libbfio_spec_requires@
437 ax_libcdata_pc_libs_private = @ax_libcdata_pc_libs_private@
438 ax_libcdata_spec_build_requires = @ax_libcdata_spec_build_requires@
439 ax_libcdata_spec_requires = @ax_libcdata_spec_requires@
440 ax_libcerror_pc_libs_private = @ax_libcerror_pc_libs_private@
441 ax_libcerror_spec_build_requires = @ax_libcerror_spec_build_requires@
442 ax_libcerror_spec_requires = @ax_libcerror_spec_requires@
443 ax_libcfile_pc_libs_private = @ax_libcfile_pc_libs_private@
444 ax_libcfile_spec_build_requires = @ax_libcfile_spec_build_requires@
445 ax_libcfile_spec_requires = @ax_libcfile_spec_requires@
446 ax_libclocale_pc_libs_private = @ax_libclocale_pc_libs_private@
447 ax_libclocale_spec_build_requires = @ax_libclocale_spec_build_requires@
448 ax_libclocale_spec_requires = @ax_libclocale_spec_requires@
449 ax_libcnotify_pc_libs_private = @ax_libcnotify_pc_libs_private@
450 ax_libcnotify_spec_build_requires = @ax_libcnotify_spec_build_requires@
451 ax_libcnotify_spec_requires = @ax_libcnotify_spec_requires@
452 ax_libcpath_pc_libs_private = @ax_libcpath_pc_libs_private@
453 ax_libcpath_spec_build_requires = @ax_libcpath_spec_build_requires@
454 ax_libcpath_spec_requires = @ax_libcpath_spec_requires@
455 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
456 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
457 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
458 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
459 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
460 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
461 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
462 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
463 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
464 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
465 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
466 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
467 ax_libfcache_pc_libs_private = @ax_libfcache_pc_libs_private@
468 ax_libfcache_spec_build_requires = @ax_libfcache_spec_build_requires@
469 ax_libfcache_spec_requires = @ax_libfcache_spec_requires@
470 ax_libfdata_pc_libs_private = @ax_libfdata_pc_libs_private@
471 ax_libfdata_spec_build_requires = @ax_libfdata_spec_build_requires@
472 ax_libfdata_spec_requires = @ax_libfdata_spec_requires@
473 ax_libfdatetime_pc_libs_private = @ax_libfdatetime_pc_libs_private@
474 ax_libfdatetime_spec_build_requires = @ax_libfdatetime_spec_build_requires@
475 ax_libfdatetime_spec_requires = @ax_libfdatetime_spec_requires@
476 ax_libfguid_pc_libs_private = @ax_libfguid_pc_libs_private@
477 ax_libfguid_spec_build_requires = @ax_libfguid_spec_build_requires@
478 ax_libfguid_spec_requires = @ax_libfguid_spec_requires@
479 ax_libfmapi_pc_libs_private = @ax_libfmapi_pc_libs_private@
480 ax_libfmapi_spec_build_requires = @ax_libfmapi_spec_build_requires@
481 ax_libfmapi_spec_requires = @ax_libfmapi_spec_requires@
482 ax_libfvalue_pc_libs_private = @ax_libfvalue_pc_libs_private@
483 ax_libfvalue_spec_build_requires = @ax_libfvalue_spec_build_requires@
484 ax_libfvalue_spec_requires = @ax_libfvalue_spec_requires@
485 ax_libfwnt_pc_libs_private = @ax_libfwnt_pc_libs_private@
486 ax_libfwnt_spec_build_requires = @ax_libfwnt_spec_build_requires@
487 ax_libfwnt_spec_requires = @ax_libfwnt_spec_requires@
488 ax_libmapidb_pc_libs_private = @ax_libmapidb_pc_libs_private@
489 ax_libmapidb_spec_build_requires = @ax_libmapidb_spec_build_requires@
490 ax_libmapidb_spec_requires = @ax_libmapidb_spec_requires@
491 ax_libuna_pc_libs_private = @ax_libuna_pc_libs_private@
492 ax_libuna_spec_build_requires = @ax_libuna_spec_build_requires@
493 ax_libuna_spec_requires = @ax_libuna_spec_requires@
494 ax_pthread_pc_libs_private = @ax_pthread_pc_libs_private@
495 bindir = @bindir@
496 build = @build@
497 build_alias = @build_alias@
498 build_cpu = @build_cpu@
499 build_os = @build_os@
500 build_vendor = @build_vendor@
501 builddir = @builddir@
502 datadir = @datadir@
503 datarootdir = @datarootdir@
504 docdir = @docdir@
505 dvidir = @dvidir@
506 exec_prefix = @exec_prefix@
507 host = @host@
508 host_alias = @host_alias@
509 host_cpu = @host_cpu@
510 host_os = @host_os@
511 host_vendor = @host_vendor@
512 htmldir = @htmldir@
513 includedir = @includedir@
514 infodir = @infodir@
515 install_sh = @install_sh@
516 libbfio_CFLAGS = @libbfio_CFLAGS@
517 libbfio_LIBS = @libbfio_LIBS@
518 libcdata_CFLAGS = @libcdata_CFLAGS@
519 libcdata_LIBS = @libcdata_LIBS@
520 libcerror_CFLAGS = @libcerror_CFLAGS@
521 libcerror_LIBS = @libcerror_LIBS@
522 libcfile_CFLAGS = @libcfile_CFLAGS@
523 libcfile_LIBS = @libcfile_LIBS@
524 libclocale_CFLAGS = @libclocale_CFLAGS@
525 libclocale_LIBS = @libclocale_LIBS@
526 libcnotify_CFLAGS = @libcnotify_CFLAGS@
527 libcnotify_LIBS = @libcnotify_LIBS@
528 libcpath_CFLAGS = @libcpath_CFLAGS@
529 libcpath_LIBS = @libcpath_LIBS@
530 libcsplit_CFLAGS = @libcsplit_CFLAGS@
531 libcsplit_LIBS = @libcsplit_LIBS@
532 libcstring_CFLAGS = @libcstring_CFLAGS@
533 libcstring_LIBS = @libcstring_LIBS@
534 libcsystem_CFLAGS = @libcsystem_CFLAGS@
535 libcsystem_LIBS = @libcsystem_LIBS@
536 libcthreads_CFLAGS = @libcthreads_CFLAGS@
537 libcthreads_LIBS = @libcthreads_LIBS@
538 libdir = @libdir@
539 libesedb_spec_build_requires = @libesedb_spec_build_requires@
540 libesedb_spec_requires = @libesedb_spec_requires@
541 libesedb_spec_tools_build_requires = @libesedb_spec_tools_build_requires@
542 libexecdir = @libexecdir@
543 libfcache_CFLAGS = @libfcache_CFLAGS@
544 libfcache_LIBS = @libfcache_LIBS@
545 libfdata_CFLAGS = @libfdata_CFLAGS@
546 libfdata_LIBS = @libfdata_LIBS@
547 libfdatetime_CFLAGS = @libfdatetime_CFLAGS@
548 libfdatetime_LIBS = @libfdatetime_LIBS@
549 libfguid_CFLAGS = @libfguid_CFLAGS@
550 libfguid_LIBS = @libfguid_LIBS@
551 libfmapi_CFLAGS = @libfmapi_CFLAGS@
552 libfmapi_LIBS = @libfmapi_LIBS@
553 libfvalue_CFLAGS = @libfvalue_CFLAGS@
554 libfvalue_LIBS = @libfvalue_LIBS@
555 libfwnt_CFLAGS = @libfwnt_CFLAGS@
556 libfwnt_LIBS = @libfwnt_LIBS@
557 libmapidb_CFLAGS = @libmapidb_CFLAGS@
558 libmapidb_LIBS = @libmapidb_LIBS@
559 libuna_CFLAGS = @libuna_CFLAGS@
560 libuna_LIBS = @libuna_LIBS@
561 localedir = @localedir@
562 localstatedir = @localstatedir@
563 mandir = @mandir@
564 mkdir_p = @mkdir_p@
565 oldincludedir = @oldincludedir@
566 pdfdir = @pdfdir@
567 prefix = @prefix@
568 program_transform_name = @program_transform_name@
569 psdir = @psdir@
570 pyexecdir = @pyexecdir@
571 pyexecdir2 = @pyexecdir2@
572 pyexecdir3 = @pyexecdir3@
573 pythondir = @pythondir@
574 pythondir2 = @pythondir2@
575 pythondir3 = @pythondir3@
576 sbindir = @sbindir@
577 sharedstatedir = @sharedstatedir@
578 srcdir = @srcdir@
579 sysconfdir = @sysconfdir@
580 target_alias = @target_alias@
581 top_build_prefix = @top_build_prefix@
582 top_builddir = @top_builddir@
583 top_srcdir = @top_srcdir@
584 @HAVE_LOCAL_LIBCSYSTEM_TRUE@AM_CPPFLAGS = \
585 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ -I$(top_srcdir)/include \
586 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ -I$(top_srcdir)/common \
587 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ @LIBCSTRING_CPPFLAGS@ \
588 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ @LIBCERROR_CPPFLAGS@ \
589 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ @LIBCLOCALE_CPPFLAGS@ \
590 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ @LIBCNOTIFY_CPPFLAGS@ \
591 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ @LIBUNA_CPPFLAGS@
592
593 @HAVE_LOCAL_LIBCSYSTEM_TRUE@noinst_LTLIBRARIES = libcsystem.la
594 @HAVE_LOCAL_LIBCSYSTEM_TRUE@libcsystem_la_SOURCES = \
595 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_definitions.h \
596 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_error.c libcsystem_error.h \
597 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_extern.h \
598 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_find.h \
599 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_file_io.h \
600 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_getopt.c libcsystem_getopt.h \
601 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_glob.c libcsystem_glob.h \
602 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_i18n.h \
603 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_libcstring.h \
604 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_libcerror.h \
605 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_libclocale.h \
606 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_libcnotify.h \
607 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_libcstring.h \
608 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_libuna.h \
609 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_signal.c libcsystem_signal.h \
610 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_string.c libcsystem_string.h \
611 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_support.c libcsystem_support.h \
612 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_types.h \
613 @HAVE_LOCAL_LIBCSYSTEM_TRUE@ libcsystem_unused.h
614
615 MAINTAINERCLEANFILES = \
616 Makefile.in
617
618 all: all-am
619
620 .SUFFIXES:
621 .SUFFIXES: .c .lo .o .obj
622 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
623 @for dep in $?; do \
624 case '$(am__configure_deps)' in \
625 *$$dep*) \
626 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
627 && { if test -f $@; then exit 0; else break; fi; }; \
628 exit 1;; \
629 esac; \
630 done; \
631 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libcsystem/Makefile'; \
632 $(am__cd) $(top_srcdir) && \
633 $(AUTOMAKE) --gnu libcsystem/Makefile
634 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
635 @case '$?' in \
636 *config.status*) \
637 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
638 *) \
639 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
640 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
641 esac;
642
643 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
644 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
645
646 $(top_srcdir)/configure: $(am__configure_deps)
647 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
648 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
649 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
650 $(am__aclocal_m4_deps):
651
652 clean-noinstLTLIBRARIES:
653 -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
654 @list='$(noinst_LTLIBRARIES)'; \
655 locs=`for p in $$list; do echo $$p; done | \
656 sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
657 sort -u`; \
658 test -z "$$locs" || { \
659 echo rm -f $${locs}; \
660 rm -f $${locs}; \
661 }
662
663 libcsystem.la: $(libcsystem_la_OBJECTS) $(libcsystem_la_DEPENDENCIES) $(EXTRA_libcsystem_la_DEPENDENCIES)
664 $(AM_V_CCLD)$(LINK) $(am_libcsystem_la_rpath) $(libcsystem_la_OBJECTS) $(libcsystem_la_LIBADD) $(LIBS)
665
666 mostlyclean-compile:
667 -rm -f *.$(OBJEXT)
668
669 distclean-compile:
670 -rm -f *.tab.c
671
672 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsystem_error.Plo@am__quote@
673 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsystem_getopt.Plo@am__quote@
674 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsystem_glob.Plo@am__quote@
675 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsystem_signal.Plo@am__quote@
676 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsystem_string.Plo@am__quote@
677 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcsystem_support.Plo@am__quote@
678
679 .c.o:
680 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
681 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
682 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
683 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
684 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
685
686 .c.obj:
687 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
688 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
689 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
690 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
691 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
692
693 .c.lo:
694 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
695 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
696 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
697 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
698 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
699
700 mostlyclean-libtool:
701 -rm -f *.lo
702
703 clean-libtool:
704 -rm -rf .libs _libs
705
706 ID: $(am__tagged_files)
707 $(am__define_uniq_tagged_files); mkid -fID $$unique
708 tags: tags-am
709 TAGS: tags
710
711 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
712 set x; \
713 here=`pwd`; \
714 $(am__define_uniq_tagged_files); \
715 shift; \
716 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
717 test -n "$$unique" || unique=$$empty_fix; \
718 if test $$# -gt 0; then \
719 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
720 "$$@" $$unique; \
721 else \
722 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
723 $$unique; \
724 fi; \
725 fi
726 ctags: ctags-am
727
728 CTAGS: ctags
729 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
730 $(am__define_uniq_tagged_files); \
731 test -z "$(CTAGS_ARGS)$$unique" \
732 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
733 $$unique
734
735 GTAGS:
736 here=`$(am__cd) $(top_builddir) && pwd` \
737 && $(am__cd) $(top_srcdir) \
738 && gtags -i $(GTAGS_ARGS) "$$here"
739 cscopelist: cscopelist-am
740
741 cscopelist-am: $(am__tagged_files)
742 list='$(am__tagged_files)'; \
743 case "$(srcdir)" in \
744 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
745 *) sdir=$(subdir)/$(srcdir) ;; \
746 esac; \
747 for i in $$list; do \
748 if test -f "$$i"; then \
749 echo "$(subdir)/$$i"; \
750 else \
751 echo "$$sdir/$$i"; \
752 fi; \
753 done >> $(top_builddir)/cscope.files
754
755 distclean-tags:
756 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
757
758 distdir: $(DISTFILES)
759 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
760 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
761 list='$(DISTFILES)'; \
762 dist_files=`for file in $$list; do echo $$file; done | \
763 sed -e "s|^$$srcdirstrip/||;t" \
764 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
765 case $$dist_files in \
766 */*) $(MKDIR_P) `echo "$$dist_files" | \
767 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
768 sort -u` ;; \
769 esac; \
770 for file in $$dist_files; do \
771 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
772 if test -d $$d/$$file; then \
773 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
774 if test -d "$(distdir)/$$file"; then \
775 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
776 fi; \
777 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
778 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
779 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
780 fi; \
781 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
782 else \
783 test -f "$(distdir)/$$file" \
784 || cp -p $$d/$$file "$(distdir)/$$file" \
785 || exit 1; \
786 fi; \
787 done
788 check-am: all-am
789 check: check-am
790 all-am: Makefile $(LTLIBRARIES)
791 installdirs:
792 install: install-am
793 install-exec: install-exec-am
794 install-data: install-data-am
795 uninstall: uninstall-am
796
797 install-am: all-am
798 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
799
800 installcheck: installcheck-am
801 install-strip:
802 if test -z '$(STRIP)'; then \
803 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
804 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
805 install; \
806 else \
807 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
808 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
809 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
810 fi
811 mostlyclean-generic:
812
813 clean-generic:
814
815 distclean-generic:
816 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
817 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
818
819 maintainer-clean-generic:
820 @echo "This command is intended for maintainers to use"
821 @echo "it deletes files that may require special tools to rebuild."
822 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
823 clean: clean-am
824
825 clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
826 mostlyclean-am
827
828 distclean-am: clean-am distclean-compile distclean-generic \
829 distclean-tags
830
831 dvi: dvi-am
832
833 dvi-am:
834
835 html: html-am
836
837 html-am:
838
839 info: info-am
840
841 info-am:
842
843 install-data-am:
844
845 install-dvi: install-dvi-am
846
847 install-dvi-am:
848
849 install-exec-am:
850
851 install-html: install-html-am
852
853 install-html-am:
854
855 install-info: install-info-am
856
857 install-info-am:
858
859 install-man:
860
861 install-pdf: install-pdf-am
862
863 install-pdf-am:
864
865 install-ps: install-ps-am
866
867 install-ps-am:
868
869 installcheck-am:
870
871 maintainer-clean: maintainer-clean-am
872 -rm -rf ./$(DEPDIR)
873 -rm -f Makefile
874 maintainer-clean-am: distclean-am maintainer-clean-generic
875
876 mostlyclean: mostlyclean-am
877
878 mostlyclean-am: mostlyclean-compile mostlyclean-generic \
879 mostlyclean-libtool
880
881 pdf: pdf-am
882
883 pdf-am:
884
885 ps: ps-am
886
887 ps-am:
888
889 uninstall-am:
890
891 .MAKE: install-am install-strip
892
893 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
894 clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \
895 ctags-am distclean distclean-compile distclean-generic \
896 distclean-libtool distclean-tags distdir dvi dvi-am html \
897 html-am info info-am install install-am install-data \
898 install-data-am install-dvi install-dvi-am install-exec \
899 install-exec-am install-html install-html-am install-info \
900 install-info-am install-man install-pdf install-pdf-am \
901 install-ps install-ps-am install-strip installcheck \
902 installcheck-am installdirs maintainer-clean \
903 maintainer-clean-generic mostlyclean mostlyclean-compile \
904 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
905 tags tags-am uninstall uninstall-am
906
907 .PRECIOUS: Makefile
908
909
910 distclean: clean
911 /bin/rm -f Makefile
912
913 splint:
914 @echo "Running splint on libcsystem ..."
915 -splint -preproc -redef $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(libcsystem_la_SOURCES)
916
917 # Tell versions [3.59,3.63) of GNU make to not export all variables.
918 # Otherwise a system limit (for SysV at least) may be exceeded.
919 .NOEXPORT:
+0
-101
libcsystem/libcsystem_definitions.h less more
0 /*
1 * The internal definitions
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( LIBCSYSTEM_INTERNAL_DEFINITIONS_H )
22 #define LIBCSYSTEM_INTERNAL_DEFINITIONS_H
23
24 #include <common.h>
25 #include <types.h>
26
27 /* Define HAVE_LOCAL_LIBCSYSTEM for local use of libcsystem
28 */
29 #if !defined( HAVE_LOCAL_LIBCSYSTEM )
30 #include <libcsystem/definitions.h>
31
32 /* The definitions in <libcsystem/definitions.h> are copied here
33 * for local use of libcsystem
34 */
35 #else
36
37 #define LIBCSYSTEM_VERSION 20160425
38
39 /* The libcstring version string
40 */
41 #define LIBCSYSTEM_VERSION_STRING "20160425"
42
43 /* The file access flags
44 * bit 1 set to 1 for read access
45 * bit 2 set to 1 for write access
46 * bit 3 set to 1 to truncate an existing file on write
47 * bit 4-8 not used
48 */
49 enum LIBCSYSTEM_ACCESS_FLAGS
50 {
51 LIBCSYSTEM_ACCESS_FLAG_READ = 0x01,
52 LIBCSYSTEM_ACCESS_FLAG_WRITE = 0x02,
53 LIBCSYSTEM_ACCESS_FLAG_TRUNCATE = 0x04
54 };
55
56 /* The file access macros
57 */
58 #define LIBCSYSTEM_OPEN_READ ( LIBCSYSTEM_ACCESS_FLAG_READ )
59 #define LIBCSYSTEM_OPEN_WRITE ( LIBCSYSTEM_ACCESS_FLAG_WRITE )
60 #define LIBCSYSTEM_OPEN_READ_WRITE ( LIBCSYSTEM_ACCESS_FLAG_READ | LIBCSYSTEM_ACCESS_FLAG_WRITE )
61 #define LIBCSYSTEM_OPEN_WRITE_TRUNCATE ( LIBCSYSTEM_ACCESS_FLAG_WRITE | LIBCSYSTEM_ACCESS_FLAG_TRUNCATE )
62 #define LIBCSYSTEM_OPEN_READ_WRITE_TRUNCATE ( LIBCSYSTEM_ACCESS_FLAG_READ | LIBCSYSTEM_ACCESS_FLAG_WRITE | LIBCSYSTEM_ACCESS_FLAG_TRUNCATE )
63
64 /* The access behavior types
65 */
66 enum LIBCSYSTEM_ACCESS_BEHAVIOR
67 {
68 LIBCSYSTEM_ACCESS_BEHAVIOR_NORMAL,
69 LIBCSYSTEM_ACCESS_BEHAVIOR_RANDOM,
70 LIBCSYSTEM_ACCESS_BEHAVIOR_SEQUENTIAL
71 };
72
73 #endif /* !defined( HAVE_LOCAL_LIBCSYSTEM ) */
74
75 /* Platform specific macros
76 */
77 #if defined( WINAPI )
78
79 #if defined( _MSC_VER )
80 #define LIBCSYSTEM_LARGE_INTEGER_ZERO { 0, 0 }
81
82 #elif defined( __BORLANDC__ )
83 #define LIBCSYSTEM_LARGE_INTEGER_ZERO { 0 }
84
85 #elif defined( __CYGWIN__ )
86 #define LIBCSYSTEM_LARGE_INTEGER_ZERO { { 0, 0 } }
87
88 #elif defined( __MINGW32_VERSION ) || defined( __MINGW64_VERSION_MAJOR )
89 #define LIBCSYSTEM_LARGE_INTEGER_ZERO { { 0, 0 } }
90
91 #endif
92
93 #if !defined( INVALID_FILE_ATTRIBUTES )
94 #define INVALID_FILE_ATTRIBUTES ( (DWORD) -1 )
95 #endif
96
97 #endif /* defined( WINAPI ) */
98
99 #endif
100
+0
-95
libcsystem/libcsystem_error.c less more
0 /*
1 * Error functions
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <types.h>
24
25 #include "libcsystem_error.h"
26 #include "libcsystem_libcerror.h"
27
28 #if !defined( HAVE_LOCAL_LIBCSYSTEM )
29
30 /* Free an error and its elements
31 */
32 void libcsystem_error_free(
33 libcsystem_error_t **error )
34 {
35 libcerror_error_free(
36 (libcerror_error_t **) error );
37 }
38
39 /* Prints a descriptive string of the error to the stream
40 * Returns the number of printed characters if successful or -1 on error
41 */
42 int libcsystem_error_fprint(
43 libcsystem_error_t *error,
44 FILE *stream )
45 {
46 return( libcerror_error_fprint(
47 (libcerror_error_t *) error,
48 stream ) );
49 }
50
51 /* Prints a descriptive string of the error to the string
52 * The end-of-string character is not included in the return value
53 * Returns the number of printed characters if successful or -1 on error
54 */
55 int libcsystem_error_sprint(
56 libcsystem_error_t *error,
57 char *string,
58 size_t size )
59 {
60 return( libcerror_error_sprint(
61 (libcerror_error_t *) error,
62 string,
63 size ) );
64 }
65
66 /* Prints a backtrace of the error to the stream
67 * Returns the number of printed characters if successful or -1 on error
68 */
69 int libcsystem_error_backtrace_fprint(
70 libcsystem_error_t *error,
71 FILE *stream )
72 {
73 return( libcerror_error_backtrace_fprint(
74 (libcerror_error_t *) error,
75 stream ) );
76 }
77
78 /* Prints a backtrace of the error to the string
79 * The end-of-string character is not included in the return value
80 * Returns the number of printed characters if successful or -1 on error
81 */
82 int libcsystem_error_backtrace_sprint(
83 libcsystem_error_t *error,
84 char *string,
85 size_t size )
86 {
87 return( libcerror_error_backtrace_sprint(
88 (libcerror_error_t *) error,
89 string,
90 size ) );
91 }
92
93 #endif /* !defined( HAVE_LOCAL_LIBCSYSTEM ) */
94
+0
-74
libcsystem/libcsystem_error.h less more
0 /*
1 * Error functions
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSYSTEM_INTERNAL_ERROR_H )
22 #define _LIBCSYSTEM_INTERNAL_ERROR_H
23
24 #include <common.h>
25 #include <file_stream.h>
26 #include <types.h>
27
28 #if !defined( HAVE_LOCAL_LIBCSYSTEM )
29 #include <libcsystem/error.h>
30 #endif
31
32 #include "libcsystem_extern.h"
33
34 #if defined( __cplusplus )
35 extern "C" {
36 #endif
37
38 #if !defined( HAVE_LOCAL_LIBCSYSTEM )
39
40 LIBCSYSTEM_EXTERN \
41 void libcsystem_error_free(
42 libcsystem_error_t **error );
43
44 LIBCSYSTEM_EXTERN \
45 int libcsystem_error_fprint(
46 libcsystem_error_t *error,
47 FILE *stream );
48
49 LIBCSYSTEM_EXTERN \
50 int libcsystem_error_sprint(
51 libcsystem_error_t *error,
52 char *string,
53 size_t size );
54
55 LIBCSYSTEM_EXTERN \
56 int libcsystem_error_backtrace_fprint(
57 libcsystem_error_t *error,
58 FILE *stream );
59
60 LIBCSYSTEM_EXTERN \
61 int libcsystem_error_backtrace_sprint(
62 libcsystem_error_t *error,
63 char *string,
64 size_t size );
65
66 #endif /* !defined( HAVE_LOCAL_LIBCSYSTEM ) */
67
68 #if defined( __cplusplus )
69 }
70 #endif
71
72 #endif /* !defined( _LIBCSYSTEM_INTERNAL_ERROR_H ) */
73
+0
-47
libcsystem/libcsystem_extern.h less more
0 /*
1 * The internal extern definition
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSYSTEM_INTERNAL_EXTERN_H )
22 #define _LIBCSYSTEM_INTERNAL_EXTERN_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCSYSTEM for local use of libcsystem
27 */
28 #if !defined( HAVE_LOCAL_LIBCSYSTEM )
29
30 /* If libtool DLL support is enabled set LIBCSYSTEM_DLL_EXPORT
31 * before including libcsystem/extern.h
32 */
33 #if defined( _WIN32 ) && defined( DLL_EXPORT )
34 #define LIBCSYSTEM_DLL_EXPORT
35 #endif
36
37 #include <libcsystem/extern.h>
38
39 #else
40
41 #define LIBCSYSTEM_EXTERN extern
42
43 #endif
44
45 #endif
46
+0
-127
libcsystem/libcsystem_file_io.h less more
0 /*
1 * File IO functions
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSYSTEM_FILE_IO_H )
22 #define _LIBCSYSTEM_FILE_IO_H
23
24 #include <common.h>
25 #include <types.h>
26
27 #if defined( HAVE_SYS_STAT_H ) || defined( WINAPI )
28 #include <sys/stat.h>
29 #endif
30
31 #if defined( HAVE_FCNTL_H ) || defined( WINAPI )
32 #include <fcntl.h>
33 #endif
34
35 #if defined( WINAPI )
36 #include <io.h>
37
38 #elif defined( HAVE_UNISTD_H )
39 #include <unistd.h>
40 #endif
41
42 #if defined( __cplusplus )
43 extern "C" {
44 #endif
45
46 #if defined( WINAPI ) && !defined( __CYGWIN__ )
47 #define LIBCSYSTEM_FILE_IO_O_CREAT _O_CREAT
48 #define LIBCSYSTEM_FILE_IO_O_RDONLY _O_RDONLY
49 #define LIBCSYSTEM_FILE_IO_O_RDWR _O_RDWR
50 #define LIBCSYSTEM_FILE_IO_O_WRONLY _O_WRONLY
51 #define LIBCSYSTEM_FILE_IO_O_TRUNC _O_TRUNC
52
53 #else
54 #define LIBCSYSTEM_FILE_IO_O_CREAT O_CREAT
55 #define LIBCSYSTEM_FILE_IO_O_RDONLY O_RDONLY
56 #define LIBCSYSTEM_FILE_IO_O_RDWR O_RDWR
57 #define LIBCSYSTEM_FILE_IO_O_WRONLY O_WRONLY
58 #define LIBCSYSTEM_FILE_IO_O_TRUNC O_TRUNC
59
60 #endif
61
62 #if defined( WINAPI ) && !defined( __CYGWIN__ )
63 #define libcsystem_file_io_open( filename, flags ) \
64 _open( filename, flags )
65
66 #elif defined( HAVE_OPEN )
67 #define libcsystem_file_io_open( filename, flags ) \
68 open( filename, flags, 0644 )
69 #endif
70
71 #if defined( WINAPI ) && !defined( __CYGWIN__ )
72 #define libcsystem_file_io_wopen( filename, flags ) \
73 _wopen( filename, flags )
74 #endif
75
76 #if defined( WINAPI ) && !defined( __CYGWIN__ )
77 #define libcsystem_file_io_close( file_descriptor ) \
78 _close( file_descriptor )
79
80 #elif defined( HAVE_CLOSE )
81 #define libcsystem_file_io_close( file_descriptor ) \
82 close( file_descriptor )
83 #endif
84
85 #if defined( WINAPI ) && !defined( __CYGWIN__ )
86 #define libcsystem_file_io_read( file_descriptor, buffer, size ) \
87 _read( file_descriptor, (void *) buffer, (unsigned int) size )
88
89 #elif defined( HAVE_READ )
90 #define libcsystem_file_io_read( file_descriptor, buffer, size ) \
91 read( file_descriptor, (void *) buffer, size )
92 #endif
93
94 #if defined( WINAPI ) && !defined( __CYGWIN__ )
95 #define libcsystem_file_io_lseek( file_descriptor, offset, whence ) \
96 _lseeki64( file_descriptor, offset, whence )
97
98 #elif defined( HAVE_LSEEK )
99 #define libcsystem_file_io_lseek( file_descriptor, offset, whence ) \
100 lseek( file_descriptor, offset, whence )
101 #endif
102
103 #if defined( WINAPI ) && !defined( __CYGWIN__ )
104 #define libcsystem_file_io_resize( file_descriptor, size ) \
105 _chsize( file_descriptor, (long) size )
106
107 #elif defined( HAVE_FTRUNCATE )
108 #define libcsystem_file_io_resize( file_descriptor, size ) \
109 ftruncate( file_descriptor, (off_t) size )
110 #endif
111
112 #if defined( WINAPI ) && !defined( __CYGWIN__ )
113 #define libcsystem_file_io_write( file_descriptor, buffer, size ) \
114 _write( file_descriptor, (const void *) buffer, (unsigned int) size )
115
116 #elif defined( HAVE_WRITE )
117 #define libcsystem_file_io_write( file_descriptor, buffer, size ) \
118 write( file_descriptor, (const void *) buffer, size )
119 #endif
120
121 #if defined( __cplusplus )
122 }
123 #endif
124
125 #endif
126
+0
-135
libcsystem/libcsystem_find.h less more
0 /*
1 * Find functions
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSYSTEM_FIND_H )
22 #define _LIBCSYSTEM_FIND_H
23
24 #include <common.h>
25 #include <types.h>
26
27 #if defined( __BORLANDC__ ) && __BORLANDC__ <= 0x0520
28 #include <dir.h>
29 #elif defined( HAVE_IO_H ) || defined( WINAPI )
30 #include <io.h>
31 #endif
32
33 #include "libcsystem_string.h"
34
35 #if defined( __cplusplus )
36 extern "C" {
37 #endif
38
39 /* The find data structure type
40 */
41 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
42
43 #if defined( __BORLANDC__ ) && __BORLANDC__ <= 0x0520
44 #define libcsystem_find_data_t struct _wffblk
45 #else
46 #define libcsystem_find_data_t struct _wfinddata_t
47 #endif
48
49 #else
50
51 #if defined( __BORLANDC__ ) && __BORLANDC__ <= 0x0520
52 #define libcsystem_find_data_t struct ffblk
53 #else
54 #define libcsystem_find_data_t struct _finddata_t
55 #endif
56
57 #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */
58
59 /* The find first function
60 */
61 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
62
63 #if defined( __BORLANDC__ )
64 #if __BORLANDC__ <= 0x0520
65 #define libcsystem_find_first( filter, fileinfo ) \
66 _wfindfirst( filter, fileinfo, 0 )
67 #else
68 #define libcsystem_find_first( filter, fileinfo ) \
69 __wfindfirst( filter, fileinfo )
70 #endif
71
72 #else
73 #define libcsystem_find_first( filter, fileinfo ) \
74 _wfindfirst( filter, fileinfo )
75 #endif
76
77 #else
78
79 #if defined( __BORLANDC__ ) && __BORLANDC__ <= 0x0520
80 #define libcsystem_find_first( filter, fileinfo ) \
81 findfirst( filter, fileinfo, 0 )
82 #else
83 #define libcsystem_find_first( filter, fileinfo ) \
84 _findfirst( filter, fileinfo )
85 #endif
86
87 #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */
88
89 /* The find next function
90 */
91 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
92
93 #if defined( __BORLANDC__ )
94 #if __BORLANDC__ <= 0x0520
95 #define libcsystem_find_next( handle, fileinfo ) \
96 _wfindnext( fileinfo )
97 #else
98 #define libcsystem_find_next( handle, fileinfo ) \
99 __wfindnext( handle, fileinfo )
100 #endif
101
102 #else
103 #define libcsystem_find_next( handle, fileinfo ) \
104 _wfindnext( handle, fileinfo )
105 #endif
106
107 #else
108
109 #if defined( __BORLANDC__ ) && __BORLANDC__ <= 0x0520
110 #define libcsystem_find_next( handle, fileinfo ) \
111 findnext( fileinfo )
112 #else
113 #define libcsystem_find_next( handle, fileinfo ) \
114 _findnext( handle, fileinfo )
115 #endif
116
117 #endif /* defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER ) */
118
119 /* The find close function
120 */
121 #if defined( __BORLANDC__ ) && __BORLANDC__ <= 0x0520
122 #define libcsystem_find_close( handle ) \
123 0
124 #else
125 #define libcsystem_find_close( handle ) \
126 _findclose( handle )
127 #endif
128
129 #if defined( __cplusplus )
130 }
131 #endif
132
133 #endif
134
+0
-170
libcsystem/libcsystem_getopt.c less more
0 /*
1 * GetOpt functions
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <types.h>
23
24 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
25 #include <stdlib.h>
26 #endif
27
28 #include "libcsystem_getopt.h"
29 #include "libcsystem_libcnotify.h"
30 #include "libcsystem_libcstring.h"
31
32 #if !defined( HAVE_GETOPT )
33
34 /* The current option argument
35 */
36 libcstring_system_character_t *optarg = NULL;
37
38 /* The option index
39 * Start with argument 1 (argument 0 is the program name)
40 */
41 int optind = 1;
42
43 /* Value to indicate the current option
44 */
45 libcstring_system_integer_t optopt = 0;
46
47 /* Get the program options
48 * Function for platforms that do not have the getopt function
49 * Returns the option character processed, or -1 on error,
50 * ? if the option was not in the options string, : if the option argument was missing
51 */
52 libcstring_system_integer_t libcsystem_getopt(
53 int argument_count,
54 libcstring_system_character_t * const argument_values[],
55 const libcstring_system_character_t *options_string )
56 {
57 libcstring_system_character_t *option_value = NULL;
58 libcstring_system_character_t *argument_value = NULL;
59 static char *function = "libcsystem_getopt";
60 size_t options_string_length = 0;
61
62 if( optind >= argument_count )
63 {
64 return( (libcstring_system_integer_t) -1 );
65 }
66 argument_value = argument_values[ optind ];
67
68 /* Check if the argument value is not an empty string
69 */
70 if( *argument_value == 0 )
71 {
72 return( (libcstring_system_integer_t) -1 );
73 }
74 /* Check if the first character is a option marker '-'
75 */
76 if( *argument_value != (libcstring_system_character_t) '-' )
77 {
78 return( (libcstring_system_integer_t) -1 );
79 }
80 argument_value++;
81
82 /* Check if long options are provided '--'
83 */
84 if( *argument_value == (libcstring_system_character_t) '-' )
85 {
86 optind++;
87
88 return( (libcstring_system_integer_t) -1 );
89 }
90 options_string_length = libcstring_system_string_length(
91 options_string );
92
93 optopt = *argument_value;
94 option_value = libcstring_system_string_search_character(
95 options_string,
96 optopt,
97 options_string_length );
98
99 argument_value++;
100
101 /* Check if an argument was specified or that the option was not found
102 * in the option string
103 */
104 if( ( optopt == (libcstring_system_integer_t) ':' )
105 || ( option_value == NULL ) )
106 {
107 if( *argument_value == (libcstring_system_character_t) '\0' )
108 {
109 optind++;
110 }
111 if( ( *options_string != (libcstring_system_character_t) ':' )
112 && ( optopt != (libcstring_system_integer_t) '?' ) )
113 {
114 libcnotify_printf(
115 "%s: no such option: %" PRIc_LIBCSTRING_SYSTEM ".\n",
116 function,
117 optopt );
118 }
119 return( (libcstring_system_integer_t) '?' );
120 }
121 option_value++;
122
123 /* Check if no option argument is required
124 */
125 if( *option_value != (libcstring_system_character_t) ':' )
126 {
127 optarg = NULL;
128
129 if( *argument_value == (libcstring_system_character_t) '\0' )
130 {
131 optind++;
132 }
133 }
134 /* Check if the argument is right after the option flag with no space in between
135 */
136 else if( *argument_value != (libcstring_system_character_t) '\0' )
137 {
138 optarg = argument_value;
139
140 optind++;
141 }
142 else
143 {
144 optind++;
145
146 /* Check if the argument was provided as the next argument value
147 */
148 if( argument_count <= optind )
149 {
150 if( *option_value == ':' )
151 {
152 return( (libcstring_system_integer_t) ':' );
153 }
154 libcnotify_printf(
155 "%s: option: %" PRIc_LIBCSTRING_SYSTEM " requires an argument.\n",
156 function,
157 optopt );
158
159 return( (libcstring_system_integer_t) '?' );
160 }
161 optarg = argument_values[ optind ];
162
163 optind++;
164 }
165 return( optopt );
166 }
167
168 #endif
169
+0
-68
libcsystem/libcsystem_getopt.h less more
0 /*
1 * GetOpt functions
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSYSTEM_GETOPT_H )
22 #define _LIBCSYSTEM_GETOPT_H
23
24 #include <common.h>
25 #include <types.h>
26
27 #include "libcsystem_extern.h"
28 #include "libcsystem_libcstring.h"
29
30 /* unistd.h is included here to export getopt, optarg, optind and optopt
31 */
32 #if defined( HAVE_UNISTD_H )
33 #include <unistd.h>
34 #endif
35
36 #if defined( __cplusplus )
37 extern "C" {
38 #endif
39
40 #if defined( HAVE_GETOPT )
41 #define libcsystem_getopt( argument_count, argument_values, options_string ) \
42 getopt( argument_count, argument_values, options_string )
43
44 #else
45 LIBCSYSTEM_EXTERN \
46 libcstring_system_character_t *optarg;
47
48 LIBCSYSTEM_EXTERN \
49 int optind;
50
51 LIBCSYSTEM_EXTERN \
52 libcstring_system_integer_t optopt;
53
54 LIBCSYSTEM_EXTERN \
55 libcstring_system_integer_t libcsystem_getopt(
56 int argument_count,
57 libcstring_system_character_t * const argument_values[],
58 const libcstring_system_character_t *options_string );
59
60 #endif /* defined( HAVE_GETOPT ) */
61
62 #if defined( __cplusplus )
63 }
64 #endif
65
66 #endif
67
+0
-588
libcsystem/libcsystem_glob.c less more
0 /*
1 * Globbing functions
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <memory.h>
23 #include <types.h>
24
25 #if defined( HAVE_ERRNO_H ) || defined( WINAPI )
26 #include <errno.h>
27 #endif
28
29 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
30 #include <stdlib.h>
31 #endif
32
33 #if defined( HAVE_IO_H ) || defined( WINAPI )
34 #include <io.h>
35 #endif
36
37 #include "libcsystem_find.h"
38 #include "libcsystem_glob.h"
39 #include "libcsystem_libcerror.h"
40 #include "libcsystem_libcstring.h"
41 #include "libcsystem_types.h"
42
43 /* TODO rename */
44 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
45 #if defined( _MSC_VER )
46 #define libcsystem_path_make( path, path_size, drive, directory, filename, extension ) \
47 _wmakepath_s( path, path_size, drive, directory, filename, extension )
48
49 #define libcsystem_path_split( path, drive, drive_size, directory, directory_size, filename, filename_size, extension, extension_size ) \
50 _wsplitpath_s( path, drive, drive_size, directory, directory_size, filename, filename_size, extension, extension_size )
51
52 #else
53 #define libcsystem_path_make( path, path_size, drive, directory, filename, extension ) \
54 _wmakepath( path, drive, directory, filename, extension )
55
56 #define libcsystem_path_split( path, drive, drive_size, directory, directory_size, filename, filename_size, extension, extension_size ) \
57 _wsplitpath( path, drive, directory, filename, extension )
58
59 #endif
60
61 #else
62 #if defined( _MSC_VER )
63 #define libcsystem_path_make( path, path_size, drive, directory, filename, extension ) \
64 _makepath_s( path, path_size, drive, directory, filename, extension )
65
66 #define libcsystem_path_split( path, drive, drive_size, directory, directory_size, filename, filename_size, extension, extension_size ) \
67 _splitpath_s( path, drive, drive_size, directory, directory_size, filename, filename_size, extension, extension_size )
68
69 #else
70 #define libcsystem_path_make( path, path_size, drive, directory, filename, extension ) \
71 _makepath( path, drive, directory, filename, extension )
72
73 #define libcsystem_path_split( path, drive, drive_size, directory, directory_size, filename, filename_size, extension, extension_size ) \
74 _splitpath( path, drive, directory, filename, extension )
75
76 #endif
77 #endif
78
79 #if !defined( HAVE_GLOB_H )
80
81 /* Creates a glob
82 * Make sure the value glob is referencing, is set to NULL
83 * Returns 1 if successful or -1 on error
84 */
85 int libcsystem_glob_initialize(
86 libcsystem_glob_t **glob,
87 libcerror_error_t **error )
88 {
89 libcsystem_internal_glob_t *internal_glob = NULL;
90 static char *function = "libcsystem_glob_initialize";
91
92 if( glob == NULL )
93 {
94 libcerror_error_set(
95 error,
96 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
97 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
98 "%s: invalid glob.",
99 function );
100
101 return( -1 );
102 }
103 if( *glob != NULL )
104 {
105 libcerror_error_set(
106 error,
107 LIBCERROR_ERROR_DOMAIN_RUNTIME,
108 LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,
109 "%s: invalid glob value already set.",
110 function );
111
112 return( -1 );
113 }
114 internal_glob = memory_allocate_structure(
115 libcsystem_internal_glob_t );
116
117 if( internal_glob == NULL )
118 {
119 libcerror_error_set(
120 error,
121 LIBCERROR_ERROR_DOMAIN_MEMORY,
122 LIBCERROR_MEMORY_ERROR_INSUFFICIENT,
123 "%s: unable to create glob.",
124 function );
125
126 goto on_error;
127 }
128 if( memory_set(
129 internal_glob,
130 0,
131 sizeof( libcsystem_internal_glob_t ) ) == NULL )
132 {
133 libcerror_error_set(
134 error,
135 LIBCERROR_ERROR_DOMAIN_MEMORY,
136 LIBCERROR_MEMORY_ERROR_SET_FAILED,
137 "%s: unable to clear glob.",
138 function );
139
140 goto on_error;
141 }
142 *glob = (libcsystem_glob_t *) internal_glob;
143
144 return( 1 );
145
146 on_error:
147 if( internal_glob != NULL )
148 {
149 memory_free(
150 internal_glob );
151 }
152 return( -1 );
153 }
154
155 /* Frees a glob
156 * Returns 1 if successful or -1 on error
157 */
158 int libcsystem_glob_free(
159 libcsystem_glob_t **glob,
160 libcerror_error_t **error )
161 {
162 libcsystem_internal_glob_t *internal_glob = NULL;
163 static char *function = "libcsystem_glob_free";
164 int result_iterator = 0;
165
166 if( glob == NULL )
167 {
168 libcerror_error_set(
169 error,
170 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
171 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
172 "%s: invalid glob.",
173 function );
174
175 return( -1 );
176 }
177 if( *glob != NULL )
178 {
179 internal_glob = (libcsystem_internal_glob_t *) *glob;
180 *glob = NULL;
181
182 if( internal_glob->results != NULL )
183 {
184 for( result_iterator = 0;
185 result_iterator < internal_glob->number_of_results;
186 result_iterator++ )
187 {
188 if( internal_glob->results[ result_iterator ] != NULL )
189 {
190 memory_free(
191 internal_glob->results[ result_iterator ] );
192 }
193 }
194 memory_free(
195 internal_glob->results );
196 }
197 memory_free(
198 internal_glob );
199 }
200 return( 1 );
201 }
202
203 /* Resizes the glob
204 * Returns 1 if successful or -1 on error
205 */
206 int libcsystem_glob_resize(
207 libcsystem_glob_t *glob,
208 int new_number_of_results,
209 libcerror_error_t **error )
210 {
211 libcsystem_internal_glob_t *internal_glob = NULL;
212 void *reallocation = NULL;
213 static char *function = "libcsystem_glob_resize";
214 size_t previous_size = 0;
215 size_t new_size = 0;
216
217 if( glob == NULL )
218 {
219 libcerror_error_set(
220 error,
221 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
222 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
223 "%s: invalid glob.",
224 function );
225
226 return( -1 );
227 }
228 internal_glob = (libcsystem_internal_glob_t *) glob;
229
230 if( internal_glob->number_of_results >= new_number_of_results )
231 {
232 libcerror_error_set(
233 error,
234 LIBCERROR_ERROR_DOMAIN_RUNTIME,
235 LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,
236 "%s: new number of results less equal than current.",
237 function );
238
239 return( -1 );
240 }
241 previous_size = sizeof( libcstring_system_character_t * ) * internal_glob->number_of_results;
242 new_size = sizeof( libcstring_system_character_t * ) * new_number_of_results;
243
244 if( ( previous_size > (size_t) SSIZE_MAX )
245 || ( new_size > (size_t) SSIZE_MAX ) )
246 {
247 libcerror_error_set(
248 error,
249 LIBCERROR_ERROR_DOMAIN_RUNTIME,
250 LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM,
251 "%s: invalid size value exceeds maximum.",
252 function );
253
254 return( -1 );
255 }
256 reallocation = memory_reallocate(
257 internal_glob->results,
258 new_size );
259
260 if( reallocation == NULL )
261 {
262 libcerror_error_set(
263 error,
264 LIBCERROR_ERROR_DOMAIN_MEMORY,
265 LIBCERROR_MEMORY_ERROR_INSUFFICIENT,
266 "%s: unable to reallocate glob results.",
267 function );
268
269 return( -1 );
270 }
271 internal_glob->results = (libcstring_system_character_t **) reallocation;
272
273 if( memory_set(
274 &( internal_glob->results[ internal_glob->number_of_results ] ),
275 0,
276 new_size - previous_size ) == NULL )
277 {
278 libcerror_error_set(
279 error,
280 LIBCERROR_ERROR_DOMAIN_MEMORY,
281 LIBCERROR_MEMORY_ERROR_SET_FAILED,
282 "%s: unable to clear glob.",
283 function );
284
285 return( -1 );
286 }
287 internal_glob->number_of_results = new_number_of_results;
288
289 return( 1 );
290 }
291
292 /* Resolves filenames with wildcards (globs)
293 * Returns 1 if successful or -1 on error
294 */
295 int libcsystem_glob_resolve(
296 libcsystem_glob_t *glob,
297 libcstring_system_character_t * const patterns[],
298 int number_of_patterns,
299 libcerror_error_t **error )
300 {
301 #if defined( HAVE_IO_H ) || defined( WINAPI )
302 libcsystem_find_data_t find_data;
303
304 libcstring_system_character_t find_path[ _MAX_PATH ];
305 libcstring_system_character_t find_drive[ _MAX_DRIVE ];
306 libcstring_system_character_t find_directory[ _MAX_DIR ];
307 libcstring_system_character_t find_name[ _MAX_FNAME ];
308 libcstring_system_character_t find_extension[ _MAX_EXT ];
309
310 intptr_t find_handle = 0;
311 #endif
312 libcsystem_internal_glob_t *internal_glob = NULL;
313 static char *function = "libcsystem_glob_resolve";
314 size_t find_path_length = 0;
315 int globs_found = 0;
316 int iterator = 0;
317
318 if( glob == NULL )
319 {
320 libcerror_error_set(
321 error,
322 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
323 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
324 "%s: invalid glob.",
325 function );
326
327 return( -1 );
328 }
329 internal_glob = (libcsystem_internal_glob_t *) glob;
330
331 for( iterator = 0;
332 iterator < number_of_patterns;
333 iterator++ )
334 {
335 if( patterns[ iterator ] == NULL )
336 {
337 libcerror_error_set(
338 error,
339 LIBCERROR_ERROR_DOMAIN_RUNTIME,
340 LIBCERROR_RUNTIME_ERROR_VALUE_MISSING,
341 "%s: missing pattern value.",
342 function );
343
344 return( -1 );
345 }
346 #if defined( _MSC_VER )
347 if( libcsystem_path_split(
348 patterns[ iterator ],
349 find_drive,
350 _MAX_DRIVE,
351 find_directory,
352 _MAX_DIR,
353 find_name,
354 _MAX_FNAME,
355 find_extension,
356 _MAX_EXT ) != 0 )
357 {
358 libcerror_error_set(
359 error,
360 LIBCERROR_ERROR_DOMAIN_RUNTIME,
361 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
362 "%s: unable to split path.",
363 function );
364
365 return( -1 );
366 }
367 #else
368 libcsystem_path_split(
369 patterns[ iterator ],
370 find_drive,
371 _MAX_DRIVE,
372 find_directory,
373 _MAX_DIR,
374 find_name,
375 _MAX_FNAME,
376 find_extension,
377 _MAX_EXT );
378 #endif
379 find_handle = libcsystem_find_first(
380 patterns[ iterator ],
381 &find_data );
382
383 if( find_handle != -1 )
384 {
385 do
386 {
387 if( libcsystem_glob_resize(
388 glob,
389 internal_glob->number_of_results + 1,
390 error ) != 1 )
391 {
392 libcerror_error_set(
393 error,
394 LIBCERROR_ERROR_DOMAIN_RUNTIME,
395 LIBCERROR_RUNTIME_ERROR_RESIZE_FAILED,
396 "%s: unable to resize glob.",
397 function );
398
399 return( -1 );
400 }
401 #if defined( _MSC_VER )
402 if( libcsystem_path_make(
403 find_path,
404 _MAX_PATH,
405 find_drive,
406 find_directory,
407 find_data.name,
408 _LIBCSTRING_SYSTEM_STRING( "" ) ) != 0 )
409 {
410 libcerror_error_set(
411 error,
412 LIBCERROR_ERROR_DOMAIN_RUNTIME,
413 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
414 "%s: unable to make path.",
415 function );
416
417 return( -1 );
418 }
419 #elif defined( __BORLANDC__ ) && __BORLANDC__ <= 0x0520
420 libcsystem_path_make(
421 find_path,
422 _MAX_PATH,
423 find_drive,
424 find_directory,
425 find_data.ff_name,
426 _LIBCSTRING_SYSTEM_STRING( "" ) );
427
428 #else
429 libcsystem_path_make(
430 find_path,
431 _MAX_PATH,
432 find_drive,
433 find_directory,
434 find_data.name,
435 _LIBCSTRING_SYSTEM_STRING( "" ) );
436 #endif
437
438 find_path_length = libcstring_system_string_length(
439 find_path );
440
441 internal_glob->results[ internal_glob->number_of_results - 1 ] = libcstring_system_string_allocate(
442 find_path_length + 1 );
443
444 if( internal_glob->results[ internal_glob->number_of_results - 1 ] == NULL )
445 {
446 libcerror_error_set(
447 error,
448 LIBCERROR_ERROR_DOMAIN_MEMORY,
449 LIBCERROR_MEMORY_ERROR_INSUFFICIENT,
450 "%s: unable to create glob result.",
451 function );
452
453 return( -1 );
454 }
455 if( libcstring_system_string_copy(
456 internal_glob->results[ internal_glob->number_of_results - 1 ],
457 find_path,
458 find_path_length ) == NULL )
459 {
460 libcerror_error_set(
461 error,
462 LIBCERROR_ERROR_DOMAIN_RUNTIME,
463 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
464 "%s: unable to set glob result.",
465 function );
466
467 memory_free(
468 internal_glob->results[ internal_glob->number_of_results - 1 ] );
469
470 internal_glob->results[ internal_glob->number_of_results - 1 ] = NULL;
471
472 return( -1 );
473 }
474 ( internal_glob->results[ internal_glob->number_of_results - 1 ] )[ find_path_length ] = 0;
475
476 globs_found++;
477
478 if( globs_found > (int32_t) UINT16_MAX )
479 {
480 libcerror_error_set(
481 error,
482 LIBCERROR_ERROR_DOMAIN_RUNTIME,
483 LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,
484 "%s: too many globs found.",
485 function );
486
487 return( -1 );
488 }
489 }
490 while( libcsystem_find_next(
491 find_handle,
492 &find_data ) == 0 );
493
494 if( errno != ENOENT )
495 {
496 libcerror_error_set(
497 error,
498 LIBCERROR_ERROR_DOMAIN_RUNTIME,
499 LIBCERROR_RUNTIME_ERROR_GET_FAILED,
500 "%s: error finding next file entry.",
501 function );
502
503 return( -1 );
504 }
505 if( libcsystem_find_close(
506 find_handle ) != 0 )
507 {
508 libcerror_error_set(
509 error,
510 LIBCERROR_ERROR_DOMAIN_RUNTIME,
511 LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,
512 "%s: error closing find handle.",
513 function );
514
515 return( -1 );
516 }
517 }
518 else if( errno != ENOENT )
519 {
520 libcerror_error_set(
521 error,
522 LIBCERROR_ERROR_DOMAIN_RUNTIME,
523 LIBCERROR_RUNTIME_ERROR_GET_FAILED,
524 "%s: error finding file entry.",
525 function );
526
527 return( -1 );
528 }
529 }
530 return( 1 );
531 }
532
533 /* Retrieves the glob results
534 * Returns 1 if successful or -1 on error
535 */
536 int libcsystem_glob_get_results(
537 libcsystem_glob_t *glob,
538 int *number_of_results,
539 libcstring_system_character_t ***results,
540 libcerror_error_t **error )
541 {
542 libcsystem_internal_glob_t *internal_glob = NULL;
543 static char *function = "libcsystem_glob_resize";
544
545 if( glob == NULL )
546 {
547 libcerror_error_set(
548 error,
549 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
550 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
551 "%s: invalid glob.",
552 function );
553
554 return( -1 );
555 }
556 internal_glob = (libcsystem_internal_glob_t *) glob;
557
558 if( number_of_results == NULL )
559 {
560 libcerror_error_set(
561 error,
562 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
563 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
564 "%s: invalid number of results.",
565 function );
566
567 return( -1 );
568 }
569 if( results == NULL )
570 {
571 libcerror_error_set(
572 error,
573 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
574 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
575 "%s: invalid results.",
576 function );
577
578 return( -1 );
579 }
580 *number_of_results = internal_glob->number_of_results;
581 *results = internal_glob->results;
582
583 return( 1 );
584 }
585
586 #endif
587
+0
-89
libcsystem/libcsystem_glob.h less more
0 /*
1 * Globbing functions
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSYSTEM_GLOB_H )
22 #define _LIBCSYSTEM_GLOB_H
23
24 #include <common.h>
25 #include <types.h>
26
27 #include "libcsystem_definitions.h"
28 #include "libcsystem_extern.h"
29 #include "libcsystem_libcerror.h"
30 #include "libcsystem_libcstring.h"
31 #include "libcsystem_types.h"
32
33 #if defined( __cplusplus )
34 extern "C" {
35 #endif
36
37 #if !defined( HAVE_GLOB_H )
38
39 typedef struct libcsystem_internal_glob libcsystem_internal_glob_t;
40
41 struct libcsystem_internal_glob
42 {
43 /* The number of globs resolved
44 */
45 int number_of_results;
46
47 /* The resolved globs
48 */
49 libcstring_system_character_t **results;
50 };
51
52 LIBCSYSTEM_EXTERN \
53 int libcsystem_glob_initialize(
54 libcsystem_glob_t **glob,
55 libcerror_error_t **error );
56
57 LIBCSYSTEM_EXTERN \
58 int libcsystem_glob_free(
59 libcsystem_glob_t **glob,
60 libcerror_error_t **error );
61
62 int libcsystem_glob_resize(
63 libcsystem_glob_t *glob,
64 int new_number_of_results,
65 libcerror_error_t **error );
66
67 LIBCSYSTEM_EXTERN \
68 int libcsystem_glob_resolve(
69 libcsystem_glob_t *glob,
70 libcstring_system_character_t * const patterns[],
71 int number_of_patterns,
72 libcerror_error_t **error );
73
74 LIBCSYSTEM_EXTERN \
75 int libcsystem_glob_get_results(
76 libcsystem_glob_t *glob,
77 int *number_of_results,
78 libcstring_system_character_t ***results,
79 libcerror_error_t **error );
80
81 #endif
82
83 #if defined( __cplusplus )
84 }
85 #endif
86
87 #endif
88
+0
-48
libcsystem/libcsystem_i18n.h less more
0 /*
1 * Internationalization (i18n) functions
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSYSTEM_I18N_H )
22 #define _LIBCSYSTEM_I18N_H
23
24 #include <common.h>
25
26 #if defined( HAVE_LIBINTL_H )
27 #include <libintl.h>
28 #endif
29
30 #if defined( __cplusplus )
31 extern "C" {
32 #endif
33
34 /* TODO for now do nothing i18n-like
35 #define _( string ) \
36 gettext( string )
37 */
38
39 #define _( string ) \
40 string
41
42 #if defined( __cplusplus )
43 }
44 #endif
45
46 #endif
47
+0
-50
libcsystem/libcsystem_libcerror.h less more
0 /*
1 * The internal libcerror header
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSYSTEM_LIBCERROR_H )
22 #define _LIBCSYSTEM_LIBCERROR_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCERROR for local use of libcerror
27 */
28 #if defined( HAVE_LOCAL_LIBCERROR )
29
30 #include <libcerror_definitions.h>
31 #include <libcerror_error.h>
32 #include <libcerror_system.h>
33 #include <libcerror_types.h>
34
35 #else
36
37 /* If libtool DLL support is enabled set LIBCERROR_DLL_IMPORT
38 * before including libcerror.h
39 */
40 #if defined( _WIN32 ) && defined( DLL_IMPORT )
41 #define LIBCERROR_DLL_IMPORT
42 #endif
43
44 #include <libcerror.h>
45
46 #endif /* defined( HAVE_LOCAL_LIBCERROR ) */
47
48 #endif /* !defined( _LIBCSYSTEM_LIBCERROR_H ) */
49
+0
-50
libcsystem/libcsystem_libclocale.h less more
0 /*
1 * The internal libclocale header
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSYSTEM_LIBCLOCALE_H )
22 #define _LIBCSYSTEM_LIBCLOCALE_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCLOCALE for local use of libclocale
27 */
28 #if defined( HAVE_LOCAL_LIBCLOCALE )
29
30 #include <libclocale_codepage.h>
31 #include <libclocale_definitions.h>
32 #include <libclocale_locale.h>
33 #include <libclocale_support.h>
34
35 #else
36
37 /* If libtool DLL support is enabled set LIBCLOCALE_DLL_IMPORT
38 * before including libclocale.h
39 */
40 #if defined( _WIN32 ) && defined( DLL_IMPORT )
41 #define LIBCLOCALE_DLL_IMPORT
42 #endif
43
44 #include <libclocale.h>
45
46 #endif /* defined( HAVE_LOCAL_LIBCLOCALE ) */
47
48 #endif /* !defined( _LIBCSYSTEM_LIBCLOCALE_H ) */
49
+0
-50
libcsystem/libcsystem_libcnotify.h less more
0 /*
1 * The internal libcnotify header
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSYSTEM_LIBCNOTIFY_H )
22 #define _LIBCSYSTEM_LIBCNOTIFY_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCNOTIFY for local use of libcnotify
27 */
28 #if defined( HAVE_LOCAL_LIBCNOTIFY )
29
30 #include <libcnotify_definitions.h>
31 #include <libcnotify_print.h>
32 #include <libcnotify_stream.h>
33 #include <libcnotify_verbose.h>
34
35 #else
36
37 /* If libtool DLL support is enabled set LIBCNOTIFY_DLL_IMPORT
38 * before including libcnotify.h
39 */
40 #if defined( _WIN32 ) && defined( DLL_IMPORT )
41 #define LIBCNOTIFY_DLL_IMPORT
42 #endif
43
44 #include <libcnotify.h>
45
46 #endif
47
48 #endif
49
+0
-51
libcsystem/libcsystem_libcstring.h less more
0 /*
1 * The internal libcstring header
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSYSTEM_LIBCSTRING_H )
22 #define _LIBCSYSTEM_LIBCSTRING_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring
27 */
28 #if defined( HAVE_LOCAL_LIBCSTRING )
29
30 #include <libcstring_definitions.h>
31 #include <libcstring_narrow_string.h>
32 #include <libcstring_system_string.h>
33 #include <libcstring_types.h>
34 #include <libcstring_wide_string.h>
35
36 #else
37
38 /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT
39 * before including libcstring.h
40 */
41 #if defined( _WIN32 ) && defined( DLL_IMPORT )
42 #define LIBCSTRING_DLL_IMPORT
43 #endif
44
45 #include <libcstring.h>
46
47 #endif /* defined( HAVE_LOCAL_LIBCSTRING ) */
48
49 #endif /* !defined( _LIBCSYSTEM_LIBCSTRING_H ) */
50
+0
-58
libcsystem/libcsystem_libuna.h less more
0 /*
1 * The libuna header wrapper
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * This software is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This software is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this software. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #if !defined( _LIBCSYSTEM_LIBUNA_H )
20 #define _LIBCSYSTEM_LIBUNA_H
21
22 #include <common.h>
23
24 /* Define HAVE_LOCAL_LIBUNA for local use of libuna
25 */
26 #if defined( HAVE_LOCAL_LIBUNA )
27
28 #include <libuna_base16_stream.h>
29 #include <libuna_base32_stream.h>
30 #include <libuna_base64_stream.h>
31 #include <libuna_byte_stream.h>
32 #include <libuna_unicode_character.h>
33 #include <libuna_url_stream.h>
34 #include <libuna_utf16_stream.h>
35 #include <libuna_utf16_string.h>
36 #include <libuna_utf32_stream.h>
37 #include <libuna_utf32_string.h>
38 #include <libuna_utf7_stream.h>
39 #include <libuna_utf8_stream.h>
40 #include <libuna_utf8_string.h>
41 #include <libuna_types.h>
42
43 #else
44
45 /* If libtool DLL support is enabled set LIBUNA_DLL_IMPORT
46 * before including libuna.h
47 */
48 #if defined( _WIN32 ) && defined( DLL_IMPORT )
49 #define LIBUNA_DLL_IMPORT
50 #endif
51
52 #include <libuna.h>
53
54 #endif /* defined( HAVE_LOCAL_LIBUNA ) */
55
56 #endif /* !defined( _LIBCSYSTEM_LIBUNA_H ) */
57
+0
-262
libcsystem/libcsystem_signal.c less more
0 /*
1 * Signal handling functions
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <types.h>
23
24 #if defined( HAVE_SIGNAL_H )
25 #include <signal.h>
26 #endif
27
28 #if defined( _MSC_VER )
29 #include <crtdbg.h>
30 #endif
31
32 #include "libcsystem_libcerror.h"
33 #include "libcsystem_signal.h"
34 #include "libcsystem_types.h"
35
36 #if defined( WINAPI )
37
38 void (*libcsystem_signal_signal_handler)( libcsystem_signal_t ) = NULL;
39
40 /* Signal handler for Ctrl+C or Ctrl+Break signals
41 */
42 BOOL WINAPI libcsystem_signal_handler(
43 unsigned long signal )
44 {
45 static char *function = "libcsystem_signal_handler";
46
47 switch( signal )
48 {
49 /* use Ctrl+C or Ctrl+Break to simulate SERVICE_CONTROL_STOP in debug mode
50 */
51 case CTRL_BREAK_EVENT:
52 case CTRL_C_EVENT:
53 if( libcsystem_signal_signal_handler != NULL )
54 {
55 libcsystem_signal_signal_handler(
56 signal );
57 }
58 return( TRUE );
59
60 default:
61 break;
62 }
63 return( FALSE );
64 }
65
66 #if defined( _MSC_VER )
67
68 /* Initialize memory usage and leakage debugging
69 */
70 void libcsystem_signal_initialize_memory_debug(
71 void )
72 {
73 int flag = 0;
74
75 /* Get the current state of the flag and store it in a temporary variable
76 */
77 flag = _CrtSetDbgFlag(
78 _CRTDBG_REPORT_FLAG );
79
80 /* Turn on client block identifiers and automatic leak detection
81 */
82 flag |= ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
83
84 /* Set the new state for the flag
85 */
86 _CrtSetDbgFlag(
87 flag );
88 }
89
90 #endif
91
92 /* Attaches a signal handler for Ctrl+C or Ctrl+Break signals
93 * Returns 1 if successful or -1 on error
94 */
95 int libcsystem_signal_attach(
96 void (*signal_handler)( libcsystem_signal_t ),
97 libcerror_error_t **error )
98 {
99 static char *function = "libcsystem_signal_attach";
100
101 if( signal_handler == NULL )
102 {
103 libcerror_error_set(
104 error,
105 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
106 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
107 "%s: invalid signal handler.",
108 function );
109
110 return( -1 );
111 }
112 libcsystem_signal_signal_handler = signal_handler;
113
114 if( SetConsoleCtrlHandler(
115 libcsystem_signal_handler,
116 TRUE ) == 0 )
117 {
118 libcerror_error_set(
119 error,
120 LIBCERROR_ERROR_DOMAIN_RUNTIME,
121 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
122 "%s: unable to attach signal handler.",
123 function );
124
125 return( -1 );
126 }
127 if( SetConsoleCtrlHandler(
128 NULL,
129 FALSE ) == 0 )
130 {
131 libcerror_error_set(
132 error,
133 LIBCERROR_ERROR_DOMAIN_RUNTIME,
134 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
135 "%s: unable to attach break signal.",
136 function );
137
138 return( -1 );
139 }
140 #if defined( _MSC_VER )
141 libcsystem_signal_initialize_memory_debug();
142 #endif
143
144 SetErrorMode(
145 SEM_FAILCRITICALERRORS );
146
147 #if defined( LOCALE_SUPPORT )
148 /* Allow subsequent threads to have their own locale.
149 * The current application is single threaded so this
150 * call has no practical effect here.
151 */
152 _configthreadlocale(
153 _ENABLE_PER_THREAD_LOCALE );
154
155 /* Set the current thread locale to the user default
156 * ANSI code page.
157 */
158 setlocale(
159 LC_ALL,
160 "" );
161
162 /* Set the the code page used by multibyte functions
163 * to use the same code page as the previous call to setlocale.
164 */
165 _setmbcp(
166 _MB_CP_LOCALE );
167 #endif
168
169 return( 1 );
170 }
171
172 /* Detaches a signal handler for Ctrl+C or Ctrl+Break signals
173 * Returns 1 if successful or -1 on error
174 */
175 int libcsystem_signal_detach(
176 libcerror_error_t **error )
177 {
178 static char *function = "libcsystem_signal_detach";
179
180 if( SetConsoleCtrlHandler(
181 libcsystem_signal_handler,
182 FALSE ) == 0 )
183 {
184 libcerror_error_set(
185 error,
186 LIBCERROR_ERROR_DOMAIN_RUNTIME,
187 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
188 "%s: unable to detach signal handler.",
189 function );
190
191 return( -1 );
192 }
193 libcsystem_signal_signal_handler = NULL;
194
195 return( 1 );
196 }
197
198 #elif defined( HAVE_SIGNAL_H )
199
200 /* Attaches a signal handler for SIGINT
201 * Returns 1 if successful or -1 on error
202 */
203 int libcsystem_signal_attach(
204 void (*signal_handler)( libcsystem_signal_t ),
205 libcerror_error_t **error )
206 {
207 static char *function = "libcsystem_signal_attach";
208
209 if( signal_handler == NULL )
210 {
211 libcerror_error_set(
212 error,
213 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
214 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
215 "%s: invalid signal handler.",
216 function );
217
218 return( -1 );
219 }
220 if( signal(
221 SIGINT,
222 signal_handler ) == SIG_ERR )
223 {
224 libcerror_error_set(
225 error,
226 LIBCERROR_ERROR_DOMAIN_RUNTIME,
227 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
228 "%s: unable to attach signal handler.",
229 function );
230
231 return( -1 );
232 }
233 return( 1 );
234 }
235
236 /* Detaches a signal handler for SIGINT
237 * Returns 1 if successful or -1 on error
238 */
239 int libcsystem_signal_detach(
240 libcerror_error_t **error )
241 {
242 static char *function = "libcsystem_signal_detach";
243
244 if( signal(
245 SIGINT,
246 SIG_DFL ) == SIG_ERR )
247 {
248 libcerror_error_set(
249 error,
250 LIBCERROR_ERROR_DOMAIN_RUNTIME,
251 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
252 "%s: unable to detach signal handler.",
253 function );
254
255 return( -1 );
256 }
257 return( 1 );
258 }
259
260 #endif
261
+0
-64
libcsystem/libcsystem_signal.h less more
0 /*
1 * Signal handling functions
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSYSTEM_SIGNAL_H )
22 #define _LIBCSYSTEM_SIGNAL_H
23
24 #include <common.h>
25 #include <types.h>
26
27 #include "libcsystem_extern.h"
28 #include "libcsystem_libcerror.h"
29 #include "libcsystem_types.h"
30
31 #if defined( __cplusplus )
32 extern "C" {
33 #endif
34
35 #if !defined( HAVE_SIGNAL_H ) && !defined( WINAPI )
36 #error missing signal functions
37 #endif
38
39 #if defined( WINAPI )
40 BOOL WINAPI libcsystem_signal_handler(
41 libcsystem_signal_t signal );
42 #endif
43
44 #if defined( _MSC_VER )
45 void libcsystem_signal_initialize_memory_debug(
46 void );
47 #endif
48
49 LIBCSYSTEM_EXTERN \
50 int libcsystem_signal_attach(
51 void (*signal_handler)( libcsystem_signal_t ),
52 libcerror_error_t **error );
53
54 LIBCSYSTEM_EXTERN \
55 int libcsystem_signal_detach(
56 libcerror_error_t **error );
57
58 #if defined( __cplusplus )
59 }
60 #endif
61
62 #endif
63
+0
-688
libcsystem/libcsystem_string.c less more
0 /*
1 * Character string functions
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <memory.h>
23 #include <types.h>
24
25 #include "libcsystem_libcerror.h"
26 #include "libcsystem_libclocale.h"
27 #include "libcsystem_libcstring.h"
28 #include "libcsystem_libuna.h"
29 #include "libcsystem_string.h"
30
31 /* Copies a string of a decimal value from a 64-bit value
32 * Returns 1 if successful or -1 on error
33 */
34 int libcsystem_string_decimal_copy_from_64_bit(
35 libcstring_system_character_t *string,
36 size_t string_size,
37 size_t *string_index,
38 uint64_t value_64bit,
39 libcerror_error_t **error )
40 {
41 static char *function = "libcsystem_string_decimal_copy_from_64_bit";
42 uint64_t divider = 0;
43 uint8_t number_of_characters = 0;
44
45 if( string == NULL )
46 {
47 libcerror_error_set(
48 error,
49 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
50 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
51 "%s: invalid string.",
52 function );
53
54 return( -1 );
55 }
56 if( string_size > (size_t) SSIZE_MAX )
57 {
58 libcerror_error_set(
59 error,
60 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
61 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
62 "%s: invalid string size value exceeds maximum.",
63 function );
64
65 return( -1 );
66 }
67 if( string_index == NULL )
68 {
69 libcerror_error_set(
70 error,
71 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
72 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
73 "%s: invalid string index.",
74 function );
75
76 return( -1 );
77 }
78 if( *string_index >= string_size )
79 {
80 libcerror_error_set(
81 error,
82 LIBCERROR_ERROR_DOMAIN_RUNTIME,
83 LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,
84 "%s: invalid string index value out of bounds.",
85 function );
86
87 return( -1 );
88 }
89 divider = 1;
90 number_of_characters = 1;
91
92 while( ( value_64bit / divider ) >= 10 )
93 {
94 divider *= 10;
95
96 number_of_characters += 1;
97 }
98 if( ( *string_index + number_of_characters ) >= string_size )
99 {
100 libcerror_error_set(
101 error,
102 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
103 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
104 "%s: string size too small.",
105 function );
106
107 return( -1 );
108 }
109 while( divider > 1 )
110 {
111 string[ *string_index ] = (uint8_t) '0' + (uint8_t) ( value_64bit / divider );
112
113 *string_index += 1;
114
115 value_64bit %= divider;
116
117 divider /= 10;
118 }
119 string[ *string_index ] = (uint8_t) '0' + (uint8_t) ( value_64bit / divider );
120
121 *string_index += 1;
122
123 return( 1 );
124 }
125
126 /* Copies a string of a decimal value to a 64-bit value
127 * Returns 1 if successful or -1 on error
128 */
129 int libcsystem_string_decimal_copy_to_64_bit(
130 const libcstring_system_character_t *string,
131 size_t string_size,
132 uint64_t *value_64bit,
133 libcerror_error_t **error )
134 {
135 static char *function = "libcsystem_string_decimal_copy_to_64_bit";
136 size_t string_index = 0;
137 libcstring_system_character_t character_value = 0;
138 uint8_t maximum_string_index = 20;
139 int8_t sign = 1;
140
141 if( string == NULL )
142 {
143 libcerror_error_set(
144 error,
145 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
146 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
147 "%s: invalid string.",
148 function );
149
150 return( -1 );
151 }
152 if( string_size > (size_t) SSIZE_MAX )
153 {
154 libcerror_error_set(
155 error,
156 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
157 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
158 "%s: invalid string size value exceeds maximum.",
159 function );
160
161 return( -1 );
162 }
163 if( value_64bit == NULL )
164 {
165 libcerror_error_set(
166 error,
167 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
168 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
169 "%s: invalid value 64-bit.",
170 function );
171
172 return( -1 );
173 }
174 *value_64bit = 0;
175
176 if( string[ string_index ] == (libcstring_system_character_t) '-' )
177 {
178 string_index++;
179 maximum_string_index++;
180
181 sign = -1;
182 }
183 else if( string[ string_index ] == (libcstring_system_character_t) '+' )
184 {
185 string_index++;
186 maximum_string_index++;
187 }
188 while( string_index < string_size )
189 {
190 if( string[ string_index ] == 0 )
191 {
192 break;
193 }
194 if( string_index > (size_t) maximum_string_index )
195 {
196 libcerror_error_set(
197 error,
198 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
199 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_LARGE,
200 "%s: string too large.",
201 function );
202
203 return( -1 );
204 }
205 *value_64bit *= 10;
206
207 if( ( string[ string_index ] >= (libcstring_system_character_t) '0' )
208 && ( string[ string_index ] <= (libcstring_system_character_t) '9' ) )
209 {
210 character_value = (libcstring_system_character_t) ( string[ string_index ] - (libcstring_system_character_t) '0' );
211 }
212 else
213 {
214 libcerror_error_set(
215 error,
216 LIBCERROR_ERROR_DOMAIN_RUNTIME,
217 LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE,
218 "%s: unsupported character value: %" PRIc_LIBCSTRING_SYSTEM " at index: %d.",
219 function,
220 string[ string_index ],
221 string_index );
222
223 return( -1 );
224 }
225 *value_64bit += character_value;
226
227 string_index++;
228 }
229 if( sign == -1 )
230 {
231 *value_64bit *= (uint64_t) -1;
232 }
233 return( 1 );
234 }
235
236 /* Determines the system string size from the UTF-8 string
237 * Returns 1 if successful or -1 on error
238 */
239 int libcsystem_string_size_from_utf8_string(
240 const uint8_t *utf8_string,
241 size_t utf8_string_size,
242 size_t *string_size,
243 libcerror_error_t **error )
244 {
245 static char *function = "libcsystem_string_size_from_utf8_string";
246
247 if( utf8_string == NULL )
248 {
249 libcerror_error_set(
250 error,
251 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
252 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
253 "%s: invalid UTF-8 string.",
254 function );
255
256 return( -1 );
257 }
258 if( utf8_string_size > (size_t) SSIZE_MAX )
259 {
260 libcerror_error_set(
261 error,
262 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
263 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
264 "%s: invalid UTF-8 string size value exceeds maximum.",
265 function );
266
267 return( -1 );
268 }
269 if( string_size == NULL )
270 {
271 libcerror_error_set(
272 error,
273 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
274 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
275 "%s: invalid string size.",
276 function );
277
278 return( -1 );
279 }
280 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
281 #if SIZEOF_WCHAR_T == 4
282 if( libuna_utf32_string_size_from_utf8(
283 (libuna_utf8_character_t *) utf8_string,
284 utf8_string_size,
285 string_size,
286 error ) != 1 )
287 #elif SIZEOF_WCHAR_T == 2
288 if( libuna_utf16_string_size_from_utf8(
289 (libuna_utf8_character_t *) utf8_string,
290 utf8_string_size,
291 string_size,
292 error ) != 1 )
293 #endif
294 {
295 libcerror_error_set(
296 error,
297 LIBCERROR_ERROR_DOMAIN_CONVERSION,
298 LIBCERROR_CONVERSION_ERROR_GENERIC,
299 "%s: unable to determine string size.",
300 function );
301
302 return( -1 );
303 }
304 #else
305 if( libclocale_codepage == 0 )
306 {
307 *string_size = 1 + libcstring_narrow_string_length(
308 (char *) utf8_string );
309 }
310 else if( libuna_byte_stream_size_from_utf8(
311 (libuna_utf8_character_t *) utf8_string,
312 utf8_string_size,
313 libclocale_codepage,
314 string_size,
315 error ) != 1 )
316 {
317 libcerror_error_set(
318 error,
319 LIBCERROR_ERROR_DOMAIN_CONVERSION,
320 LIBCERROR_CONVERSION_ERROR_GENERIC,
321 "%s: unable to determine string size.",
322 function );
323
324 return( -1 );
325 }
326 #endif
327 return( 1 );
328 }
329
330 /* Copies the system string size from the UTF-8 string
331 * Returns 1 if successful or -1 on error
332 */
333 int libcsystem_string_copy_from_utf8_string(
334 libcstring_system_character_t *string,
335 size_t string_size,
336 const uint8_t *utf8_string,
337 size_t utf8_string_size,
338 libcerror_error_t **error )
339 {
340 static char *function = "libcsystem_string_copy_from_utf8_string";
341
342 if( string == NULL )
343 {
344 libcerror_error_set(
345 error,
346 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
347 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
348 "%s: invalid string.",
349 function );
350
351 return( -1 );
352 }
353 if( string_size > (size_t) SSIZE_MAX )
354 {
355 libcerror_error_set(
356 error,
357 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
358 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
359 "%s: invalid string size value exceeds maximum.",
360 function );
361
362 return( -1 );
363 }
364 if( utf8_string == NULL )
365 {
366 libcerror_error_set(
367 error,
368 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
369 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
370 "%s: invalid UTF-8 string.",
371 function );
372
373 return( -1 );
374 }
375 if( utf8_string_size > (size_t) SSIZE_MAX )
376 {
377 libcerror_error_set(
378 error,
379 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
380 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
381 "%s: invalid UTF-8 string size value exceeds maximum.",
382 function );
383
384 return( -1 );
385 }
386 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
387 #if SIZEOF_WCHAR_T == 4
388 if( libuna_utf32_string_copy_from_utf8(
389 (libuna_utf32_character_t *) string,
390 string_size,
391 (libuna_utf8_character_t *) utf8_string,
392 utf8_string_size,
393 error ) != 1 )
394 #elif SIZEOF_WCHAR_T == 2
395 if( libuna_utf16_string_copy_from_utf8(
396 (libuna_utf16_character_t *) string,
397 string_size,
398 (libuna_utf8_character_t *) utf8_string,
399 utf8_string_size,
400 error ) != 1 )
401 #endif
402 {
403 libcerror_error_set(
404 error,
405 LIBCERROR_ERROR_DOMAIN_CONVERSION,
406 LIBCERROR_CONVERSION_ERROR_GENERIC,
407 "%s: unable to set string.",
408 function );
409
410 return( -1 );
411 }
412 #else
413 if( libclocale_codepage == 0 )
414 {
415 if( string_size < utf8_string_size )
416 {
417 libcerror_error_set(
418 error,
419 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
420 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
421 "%s: string too small.",
422 function );
423
424 return( -1 );
425 }
426 if( memory_copy(
427 string,
428 utf8_string,
429 utf8_string_size ) == NULL )
430 {
431 libcerror_error_set(
432 error,
433 LIBCERROR_ERROR_DOMAIN_MEMORY,
434 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
435 "%s: unable to set string.",
436 function );
437
438 return( -1 );
439 }
440 }
441 else if( libuna_byte_stream_copy_from_utf8(
442 (uint8_t *) string,
443 string_size,
444 libclocale_codepage,
445 (libuna_utf8_character_t *) utf8_string,
446 utf8_string_size,
447 error ) != 1 )
448 {
449 libcerror_error_set(
450 error,
451 LIBCERROR_ERROR_DOMAIN_CONVERSION,
452 LIBCERROR_CONVERSION_ERROR_GENERIC,
453 "%s: unable to set string.",
454 function );
455
456 return( -1 );
457 }
458 #endif
459 return( 1 );
460 }
461
462 /* Determines the UTF-8 string size from the system string
463 * Returns 1 if successful or -1 on error
464 */
465 int libcsystem_string_size_to_utf8_string(
466 const libcstring_system_character_t *string,
467 size_t string_size,
468 size_t *utf8_string_size,
469 libcerror_error_t **error )
470 {
471 static char *function = "libcsystem_string_size_to_utf8_string";
472
473 if( string == NULL )
474 {
475 libcerror_error_set(
476 error,
477 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
478 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
479 "%s: invalid string.",
480 function );
481
482 return( -1 );
483 }
484 if( string_size > (size_t) SSIZE_MAX )
485 {
486 libcerror_error_set(
487 error,
488 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
489 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
490 "%s: invalid string size value exceeds maximum.",
491 function );
492
493 return( -1 );
494 }
495 if( utf8_string_size == NULL )
496 {
497 libcerror_error_set(
498 error,
499 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
500 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
501 "%s: invalid UTF-8 string size.",
502 function );
503
504 return( -1 );
505 }
506 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
507 #if SIZEOF_WCHAR_T == 4
508 if( libuna_utf8_string_size_from_utf32(
509 (libuna_utf32_character_t *) string,
510 string_size,
511 utf8_string_size,
512 error ) != 1 )
513 #elif SIZEOF_WCHAR_T == 2
514 if( libuna_utf8_string_size_from_utf16(
515 (libuna_utf16_character_t *) string,
516 string_size,
517 utf8_string_size,
518 error ) != 1 )
519 #endif
520 {
521 libcerror_error_set(
522 error,
523 LIBCERROR_ERROR_DOMAIN_CONVERSION,
524 LIBCERROR_CONVERSION_ERROR_GENERIC,
525 "%s: unable to determine UTF-8 string size.",
526 function );
527
528 return( -1 );
529 }
530 #else
531 if( libclocale_codepage == 0 )
532 {
533 *utf8_string_size = 1 + libcstring_system_string_length(
534 string );
535 }
536 else if( libuna_utf8_string_size_from_byte_stream(
537 (uint8_t *) string,
538 string_size,
539 libclocale_codepage,
540 utf8_string_size,
541 error ) != 1 )
542 {
543 libcerror_error_set(
544 error,
545 LIBCERROR_ERROR_DOMAIN_CONVERSION,
546 LIBCERROR_CONVERSION_ERROR_GENERIC,
547 "%s: unable to determine UTF-8 string size.",
548 function );
549
550 return( -1 );
551 }
552 #endif
553 return( 1 );
554 }
555
556 /* Copies the UTF-8 string size from the system string
557 * Returns 1 if successful or -1 on error
558 */
559 int libcsystem_string_copy_to_utf8_string(
560 const libcstring_system_character_t *string,
561 size_t string_size,
562 uint8_t *utf8_string,
563 size_t utf8_string_size,
564 libcerror_error_t **error )
565 {
566 static char *function = "libcsystem_string_copy_to_utf8_string";
567
568 if( utf8_string == NULL )
569 {
570 libcerror_error_set(
571 error,
572 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
573 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
574 "%s: invalid UTF-8 string.",
575 function );
576
577 return( -1 );
578 }
579 if( utf8_string_size > (size_t) SSIZE_MAX )
580 {
581 libcerror_error_set(
582 error,
583 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
584 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
585 "%s: invalid UTF-8 string size value exceeds maximum.",
586 function );
587
588 return( -1 );
589 }
590 if( string == NULL )
591 {
592 libcerror_error_set(
593 error,
594 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
595 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
596 "%s: invalid string.",
597 function );
598
599 return( -1 );
600 }
601 if( string_size > (size_t) SSIZE_MAX )
602 {
603 libcerror_error_set(
604 error,
605 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
606 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
607 "%s: invalid string size value exceeds maximum.",
608 function );
609
610 return( -1 );
611 }
612 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
613 #if SIZEOF_WCHAR_T == 4
614 if( libuna_utf8_string_copy_from_utf32(
615 (libuna_utf8_character_t *) utf8_string,
616 utf8_string_size,
617 (libuna_utf32_character_t *) string,
618 string_size,
619 error ) != 1 )
620 #elif SIZEOF_WCHAR_T == 2
621 if( libuna_utf8_string_copy_from_utf16(
622 (libuna_utf8_character_t *) utf8_string,
623 utf8_string_size,
624 (libuna_utf16_character_t *) string,
625 string_size,
626 error ) != 1 )
627 #endif
628 {
629 libcerror_error_set(
630 error,
631 LIBCERROR_ERROR_DOMAIN_CONVERSION,
632 LIBCERROR_CONVERSION_ERROR_GENERIC,
633 "%s: unable to set UTF-8 string.",
634 function );
635
636 return( -1 );
637 }
638 #else
639 if( libclocale_codepage == 0 )
640 {
641 if( utf8_string_size < string_size )
642 {
643 libcerror_error_set(
644 error,
645 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
646 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
647 "%s: UTF-8 string too small.",
648 function );
649
650 return( -1 );
651 }
652 if( memory_copy(
653 utf8_string,
654 string,
655 string_size ) == NULL )
656 {
657 libcerror_error_set(
658 error,
659 LIBCERROR_ERROR_DOMAIN_MEMORY,
660 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
661 "%s: unable to set string.",
662 function );
663
664 return( -1 );
665 }
666 }
667 else if( libuna_utf8_string_copy_from_byte_stream(
668 (libuna_utf8_character_t *) utf8_string,
669 utf8_string_size,
670 (uint8_t *) string,
671 string_size,
672 libclocale_codepage,
673 error ) != 1 )
674 {
675 libcerror_error_set(
676 error,
677 LIBCERROR_ERROR_DOMAIN_CONVERSION,
678 LIBCERROR_CONVERSION_ERROR_GENERIC,
679 "%s: unable to set UTF-8 string.",
680 function );
681
682 return( -1 );
683 }
684 #endif
685 return( 1 );
686 }
687
+0
-79
libcsystem/libcsystem_string.h less more
0 /*
1 * System character string functions
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSYSTEM_STRING_H )
22 #define _LIBCSYSTEM_STRING_H
23
24 #include <common.h>
25 #include <types.h>
26
27 #include "libcsystem_libcerror.h"
28 #include "libcsystem_libcstring.h"
29
30 #if defined( __cplusplus )
31 extern "C" {
32 #endif
33
34 int libcsystem_string_decimal_copy_from_64_bit(
35 libcstring_system_character_t *string,
36 size_t string_size,
37 size_t *string_index,
38 uint64_t value_64bit,
39 libcerror_error_t **error );
40
41 int libcsystem_string_decimal_copy_to_64_bit(
42 const libcstring_system_character_t *string,
43 size_t string_size,
44 uint64_t *value_64bit,
45 libcerror_error_t **error );
46
47 int libcsystem_string_size_from_utf8_string(
48 const uint8_t *utf8_string,
49 size_t utf8_string_size,
50 size_t *string_size,
51 libcerror_error_t **error );
52
53 int libcsystem_string_copy_from_utf8_string(
54 libcstring_system_character_t *string,
55 size_t string_size,
56 const uint8_t *utf8_string,
57 size_t utf8_string_size,
58 libcerror_error_t **error );
59
60 int libcsystem_string_size_to_utf8_string(
61 const libcstring_system_character_t *string,
62 size_t string_size,
63 size_t *utf8_string_size,
64 libcerror_error_t **error );
65
66 int libcsystem_string_copy_to_utf8_string(
67 const libcstring_system_character_t *string,
68 size_t string_size,
69 uint8_t *utf8_string,
70 size_t utf8_string_size,
71 libcerror_error_t **error );
72
73 #if defined( __cplusplus )
74 }
75 #endif
76
77 #endif
78
+0
-101
libcsystem/libcsystem_support.c less more
0 /*
1 * Support functions
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <types.h>
23
24 #include <stdio.h>
25
26 #include "libcsystem_definitions.h"
27 #include "libcsystem_libcerror.h"
28 #include "libcsystem_libcstring.h"
29 #include "libcsystem_support.h"
30
31 #if !defined( HAVE_LOCAL_LIBCSYSTEM )
32
33 /* Returns the library version as a string
34 */
35 const char *libcsystem_get_version(
36 void )
37 {
38 return( (const char *) LIBCSYSTEM_VERSION_STRING );
39 }
40
41 #endif /* !defined( HAVE_LOCAL_LIBCSYSTEM ) */
42
43 /* Initializes the system values
44 * Returns 1 if successful or -1 on error
45 */
46 int libcsystem_initialize(
47 int stdio_mode,
48 libcerror_error_t **error )
49 {
50 static char *function = "libcsystem_initialize";
51
52 if( ( stdio_mode != _IOFBF )
53 && ( stdio_mode != _IOLBF )
54 && ( stdio_mode != _IONBF ) )
55 {
56 libcerror_error_set(
57 error,
58 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
59 LIBCERROR_ARGUMENT_ERROR_UNSUPPORTED_VALUE,
60 "%s: unsupported standard IO mode.",
61 function );
62
63 return( -1 );
64 }
65 #if !defined( __BORLANDC__ )
66 if( setvbuf(
67 stdout,
68 NULL,
69 stdio_mode,
70 0 ) != 0 )
71 {
72 libcerror_error_set(
73 error,
74 LIBCERROR_ERROR_DOMAIN_RUNTIME,
75 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
76 "%s: unable to set IO mode of stdout.",
77 function );
78
79 return( -1 );
80 }
81 if( setvbuf(
82 stderr,
83 NULL,
84 stdio_mode,
85 0 ) != 0 )
86 {
87 libcerror_error_set(
88 error,
89 LIBCERROR_ERROR_DOMAIN_RUNTIME,
90 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
91 "%s: unable to set IO mode of stderr.",
92 function );
93
94 return( -1 );
95 }
96 #endif /* !defined( __BORLANDC__ ) */
97
98 return( 1 );
99 }
100
+0
-53
libcsystem/libcsystem_support.h less more
0 /*
1 * Support functions
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSYSTEM_SUPPORT_H )
22 #define _LIBCSYSTEM_SUPPORT_H
23
24 #include <common.h>
25 #include <types.h>
26
27 #include "libcsystem_extern.h"
28 #include "libcsystem_libcerror.h"
29
30 #if defined( __cplusplus )
31 extern "C" {
32 #endif
33
34 #if !defined( HAVE_LOCAL_LIBCSYSTEM )
35
36 LIBCSYSTEM_EXTERN \
37 const char *libcsystem_get_version(
38 void );
39
40 #endif /* !defined( HAVE_LOCAL_LIBCSYSTEM ) */
41
42 LIBCSYSTEM_EXTERN \
43 int libcsystem_initialize(
44 int stdio_mode,
45 libcerror_error_t **error );
46
47 #if defined( __cplusplus )
48 }
49 #endif
50
51 #endif /* !defined( _LIBCSYSTEM_SUPPORT_H ) */
52
+0
-59
libcsystem/libcsystem_types.h less more
0 /*
1 * The internal type definitions
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSYSTEM_INTERNAL_TYPES_H )
22 #define _LIBCSYSTEM_INTERNAL_TYPES_H
23
24 #include <common.h>
25 #include <types.h>
26
27 /* Define HAVE_LOCAL_LIBCSYSTEM for local use of libcsystem
28 * The definitions in <libcsystem/types.h> are copied here
29 * for local use of libcsystem
30 */
31 #if defined( HAVE_LOCAL_LIBCSYSTEM )
32
33 /* The following type definitions hide internal data structures
34 */
35 #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI )
36 typedef struct libcsystem_file {} libcsystem_file_t;
37 typedef struct libcsystem_glob {} libcsystem_glob_t;
38 typedef struct libcsystem_stream {} libcsystem_stream_t;
39
40 #else
41 typedef intptr_t libcsystem_file_t;
42 typedef intptr_t libcsystem_glob_t;
43 typedef intptr_t libcsystem_stream_t;
44
45 #endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */
46
47 #if defined( WINAPI )
48 typedef unsigned long libcsystem_signal_t;
49
50 #elif defined( HAVE_SIGNAL_H )
51 typedef int libcsystem_signal_t;
52
53 #endif
54
55 #endif /* defined( HAVE_LOCAL_LIBCSYSTEM ) */
56
57 #endif /* !defined( _LIBCSYSTEM_INTERNAL_TYPES_H ) */
58
+0
-44
libcsystem/libcsystem_unused.h less more
0 /*
1 * The internal unused definition
2 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCSYSTEM_INTERNAL_UNUSED_H )
22 #define _LIBCSYSTEM_INTERNAL_UNUSED_H
23
24 #include <common.h>
25
26 #if !defined( LIBCSYSTEM_ATTRIBUTE_UNUSED )
27 #if defined( __GNUC__ ) && __GNUC__ >= 3
28 #define LIBCSYSTEM_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
29 #else
30 #define LIBCSYSTEM_ATTRIBUTE_UNUSED
31 #endif
32 #endif
33
34 #if defined( _MSC_VER )
35 #define LIBCSYSTEM_UNREFERENCED_PARAMETER( parameter ) \
36 UNREFERENCED_PARAMETER( parameter );
37 #else
38 #define LIBCSYSTEM_UNREFERENCED_PARAMETER( parameter ) \
39 /* parameter */
40 #endif
41
42 #endif /* !defined( _LIBCSYSTEM_INTERNAL_UNUSED_H ) */
43
11 AM_CPPFLAGS = \
22 -I$(top_srcdir)/include \
33 -I$(top_srcdir)/common \
4 @LIBCSTRING_CPPFLAGS@ \
54 @LIBCERROR_CPPFLAGS@ \
65 @PTHREAD_CPPFLAGS@
76
1312 libcthreads_error.c libcthreads_error.h \
1413 libcthreads_extern.h \
1514 libcthreads_libcerror.h \
16 libcthreads_libcstring.h \
1715 libcthreads_lock.c libcthreads_lock.h \
1816 libcthreads_mutex.c libcthreads_mutex.h \
1917 libcthreads_queue.c libcthreads_queue.h \
2725 libcthreads_unused.h
2826 endif
2927
30
3128 MAINTAINERCLEANFILES = \
3229 Makefile.in
3330
9797 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9898 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9999 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101100 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102101 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103102 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
108107 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109108 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110109 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
110 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
111 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
113112 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114113 $(ACLOCAL_M4)
115114 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
122121 am__libcthreads_la_SOURCES_DIST = libcthreads_condition.c \
123122 libcthreads_condition.h libcthreads_definitions.h \
124123 libcthreads_error.c libcthreads_error.h libcthreads_extern.h \
125 libcthreads_libcerror.h libcthreads_libcstring.h \
126 libcthreads_lock.c libcthreads_lock.h libcthreads_mutex.c \
127 libcthreads_mutex.h libcthreads_queue.c libcthreads_queue.h \
128 libcthreads_read_write_lock.c libcthreads_read_write_lock.h \
129 libcthreads_repeating_thread.c libcthreads_repeating_thread.h \
130 libcthreads_support.c libcthreads_support.h \
131 libcthreads_thread.c libcthreads_thread.h \
132 libcthreads_thread_attributes.c \
124 libcthreads_libcerror.h libcthreads_lock.c libcthreads_lock.h \
125 libcthreads_mutex.c libcthreads_mutex.h libcthreads_queue.c \
126 libcthreads_queue.h libcthreads_read_write_lock.c \
127 libcthreads_read_write_lock.h libcthreads_repeating_thread.c \
128 libcthreads_repeating_thread.h libcthreads_support.c \
129 libcthreads_support.h libcthreads_thread.c \
130 libcthreads_thread.h libcthreads_thread_attributes.c \
133131 libcthreads_thread_attributes.h libcthreads_thread_pool.c \
134132 libcthreads_thread_pool.h libcthreads_types.h \
135133 libcthreads_unused.h
254252 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
255253 HAVE_LIBCPATH = @HAVE_LIBCPATH@
256254 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
257 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
258 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
259255 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
260256 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
261257 HAVE_LIBFDATA = @HAVE_LIBFDATA@
274270 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
275271 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
276272 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
277 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
278 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
279273 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
280274 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
281275 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
322316 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
323317 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
324318 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
325 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
326 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
327 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
328 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
329319 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
330320 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
331321 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
358348 LTLIBICONV = @LTLIBICONV@
359349 LTLIBINTL = @LTLIBINTL@
360350 LTLIBOBJS = @LTLIBOBJS@
351 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
361352 MAKEINFO = @MAKEINFO@
362353 MANIFEST_TOOL = @MANIFEST_TOOL@
363354 MKDIR_P = @MKDIR_P@
464455 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
465456 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
466457 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
467 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
468 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
469 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
470 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
471 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
472 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
473458 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
474459 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
475460 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
538523 libcpath_LIBS = @libcpath_LIBS@
539524 libcsplit_CFLAGS = @libcsplit_CFLAGS@
540525 libcsplit_LIBS = @libcsplit_LIBS@
541 libcstring_CFLAGS = @libcstring_CFLAGS@
542 libcstring_LIBS = @libcstring_LIBS@
543 libcsystem_CFLAGS = @libcsystem_CFLAGS@
544 libcsystem_LIBS = @libcsystem_LIBS@
545526 libcthreads_CFLAGS = @libcthreads_CFLAGS@
546527 libcthreads_LIBS = @libcthreads_LIBS@
547528 libdir = @libdir@
593574 @HAVE_LOCAL_LIBCTHREADS_TRUE@AM_CPPFLAGS = \
594575 @HAVE_LOCAL_LIBCTHREADS_TRUE@ -I$(top_srcdir)/include \
595576 @HAVE_LOCAL_LIBCTHREADS_TRUE@ -I$(top_srcdir)/common \
596 @HAVE_LOCAL_LIBCTHREADS_TRUE@ @LIBCSTRING_CPPFLAGS@ \
597577 @HAVE_LOCAL_LIBCTHREADS_TRUE@ @LIBCERROR_CPPFLAGS@ \
598578 @HAVE_LOCAL_LIBCTHREADS_TRUE@ @PTHREAD_CPPFLAGS@
599579
604584 @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_error.c libcthreads_error.h \
605585 @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_extern.h \
606586 @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_libcerror.h \
607 @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_libcstring.h \
608587 @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_lock.c libcthreads_lock.h \
609588 @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_mutex.c libcthreads_mutex.h \
610589 @HAVE_LOCAL_LIBCTHREADS_TRUE@ libcthreads_queue.c libcthreads_queue.h \
00 /*
11 * Condition functions
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
105105 "%s: unable to clear condition.",
106106 function );
107107
108 goto on_error;
108 memory_free(
109 internal_condition );
110
111 return( -1 );
109112 }
110113 #if defined( WINAPI ) && ( WINVER >= 0x0600 )
111114 InitializeConditionVariable(
00 /*
11 * Condition functions
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
115115 }
116116 #endif
117117
118 #endif
118 #endif /* !defined( _LIBCTHREADS_INTERNAL_CONDITION_H ) */
119119
00 /*
11 * The internal definitions
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3434 */
3535 #else
3636
37 #define LIBCTHREADS_VERSION 20160426
37 #define LIBCTHREADS_VERSION 20170115
3838
3939 /* The libcthreads version string
4040 */
41 #define LIBCTHREADS_VERSION_STRING "20160426"
41 #define LIBCTHREADS_VERSION_STRING "20170115"
4242
4343 /* The comparison function definitions
4444 */
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4343 libcthreads_error_t *error,
4444 FILE *stream )
4545 {
46 return( libcerror_error_fprint(
47 (libcerror_error_t *) error,
48 stream ) );
46 int print_count = 0;
47
48 print_count = libcerror_error_fprint(
49 (libcerror_error_t *) error,
50 stream );
51
52 return( print_count );
4953 }
5054
5155 /* Prints a descriptive string of the error to the string
5761 char *string,
5862 size_t size )
5963 {
60 return( libcerror_error_sprint(
61 (libcerror_error_t *) error,
62 string,
63 size ) );
64 int print_count = 0;
65
66 print_count = libcerror_error_sprint(
67 (libcerror_error_t *) error,
68 string,
69 size );
70
71 return( print_count );
6472 }
6573
6674 /* Prints a backtrace of the error to the stream
7078 libcthreads_error_t *error,
7179 FILE *stream )
7280 {
73 return( libcerror_error_backtrace_fprint(
74 (libcerror_error_t *) error,
75 stream ) );
81 int print_count = 0;
82
83 print_count = libcerror_error_backtrace_fprint(
84 (libcerror_error_t *) error,
85 stream );
86
87 return( print_count );
7688 }
7789
7890 /* Prints a backtrace of the error to the string
8496 char *string,
8597 size_t size )
8698 {
87 return( libcerror_error_backtrace_sprint(
88 (libcerror_error_t *) error,
89 string,
90 size ) );
99 int print_count = 0;
100
101 print_count = libcerror_error_backtrace_sprint(
102 (libcerror_error_t *) error,
103 string,
104 size );
105
106 return( print_count );
91107 }
92108
93109 #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) */
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal extern definition
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 #include <libcthreads/extern.h>
3838
3939 #else
40 #define LIBCTHREADS_EXTERN /* extern */
4041
41 #define LIBCTHREADS_EXTERN extern
42 #endif /* !defined( HAVE_LOCAL_LIBCTHREADS ) */
4243
43 #endif
44 #endif /* !defined( _LIBCTHREADS_INTERNAL_EXTERN_H ) */
4445
45 #endif
46
00 /*
11 * The internal libcerror header
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
+0
-51
libcthreads/libcthreads_libcstring.h less more
0 /*
1 * The internal libcstring header
2 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBCTHREADS_LIBCSTRING_H )
22 #define _LIBCTHREADS_LIBCSTRING_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring
27 */
28 #if defined( HAVE_LOCAL_LIBCSTRING )
29
30 #include <libcstring_definitions.h>
31 #include <libcstring_narrow_string.h>
32 #include <libcstring_system_string.h>
33 #include <libcstring_types.h>
34 #include <libcstring_wide_string.h>
35
36 #else
37
38 /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT
39 * before including libcstring.h
40 */
41 #if defined( _WIN32 ) && defined( DLL_IMPORT )
42 #define LIBCSTRING_DLL_IMPORT
43 #endif
44
45 #include <libcstring.h>
46
47 #endif /* defined( HAVE_LOCAL_LIBCSTRING ) */
48
49 #endif /* !defined( _LIBCTHREADS_LIBCSTRING_H ) */
50
00 /*
11 * Lock functions
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
9797 "%s: unable to clear lock.",
9898 function );
9999
100 goto on_error;
100 memory_free(
101 internal_lock );
102
103 return( -1 );
101104 }
102105 #if defined( WINAPI )
103106 InitializeCriticalSection(
00 /*
11 * Lock functions
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
8383 }
8484 #endif
8585
86 #endif
86 #endif /* !defined( _LIBCTHREADS_INTERNAL_LOCK_H ) */
8787
00 /*
11 * Mutex functions
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
104104 "%s: unable to clear mutex.",
105105 function );
106106
107 goto on_error;
107 memory_free(
108 internal_mutex );
109
110 return( -1 );
108111 }
109112 #if defined( WINAPI ) && ( WINVER >= 0x0600 )
110113 InitializeCriticalSection(
00 /*
11 * Mutex functions
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
9393 }
9494 #endif
9595
96 #endif
96 #endif /* !defined( _LIBCTHREADS_INTERNAL_MUTEX_H ) */
9797
00 /*
11 * Queue functions
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Queue functions
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Read/Write lock functions
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Read/Write lock functions
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
119119 }
120120 #endif
121121
122 #endif
122 #endif /* !defined( _LIBCTHREADS_INTERNAL_READ_WRITE_LOCK_H ) */
123123
00 /*
11 * Repeating thread functions
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2222 #include <memory.h>
2323 #include <types.h>
2424
25 #if defined( WINAPI ) && ( WINVER >= 0x0602 ) && !defined( USE_CRT_FUNCTIONS )
25 #if defined( WINAPI ) && ( WINVER >= 0x0602 )
2626 #include <Processthreadsapi.h>
2727 #include <Synchapi.h>
2828 #endif
249249 "%s: unable to clear repeating thread.",
250250 function );
251251
252 goto on_error;
252 memory_free(
253 internal_repeating_thread );
254
255 return( -1 );
253256 }
254257 if( libcthreads_mutex_initialize(
255258 &( internal_repeating_thread->condition_mutex ),
00 /*
11 * Repeating thread functions
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
110110 }
111111 #endif
112112
113 #endif
113 #endif /* !defined( _LIBCTHREADS_INTERNAL_REPEATING_THREAD_H ) */
114114
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2222 #include <types.h>
2323
2424 #include "libcthreads_definitions.h"
25 #include "libcthreads_libcerror.h"
26 #include "libcthreads_libcstring.h"
2725 #include "libcthreads_support.h"
2826
2927 #if !defined( HAVE_LOCAL_LIBCTHREADS )
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2525 #include <types.h>
2626
2727 #include "libcthreads_extern.h"
28 #include "libcthreads_libcerror.h"
2928
3029 #if defined( __cplusplus )
3130 extern "C" {
4342 }
4443 #endif
4544
46 #endif
45 #endif /* !defined( _LIBCTHREADS_SUPPORT_H ) */
4746
00 /*
11 * Thread functions
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2222 #include <memory.h>
2323 #include <types.h>
2424
25 #if defined( WINAPI ) && ( WINVER >= 0x0602 ) && !defined( USE_CRT_FUNCTIONS )
25 #if defined( WINAPI ) && ( WINVER >= 0x0602 )
2626 #include <Processthreadsapi.h>
2727 #include <Synchapi.h>
2828 #endif
3939 #if !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT )
4040
4141 #if defined( WINAPI )
42
4243 /* Start function helper function for WINAPI
4344 * Returns 0 if successful or 1 on error
4445 */
6667 }
6768
6869 #elif defined( HAVE_PTHREAD_H )
70
6971 /* Start function helper function for pthread
7072 * Returns a pointer to a newly allocated int containing 1 if successful or -1 on error
7173 * NULL is return if the helper function was unable to run the callback
185187 "%s: unable to clear thread.",
186188 function );
187189
188 goto on_error;
190 memory_free(
191 internal_thread );
192
193 return( -1 );
189194 }
190195 internal_thread->callback_function = callback_function;
191196 internal_thread->callback_function_arguments = callback_function_arguments;
00 /*
11 * Thread functions
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
9090 }
9191 #endif
9292
93 #endif
93 #endif /* !defined( _LIBCTHREADS_INTERNAL_THREAD_H ) */
9494
00 /*
11 * Thread attributes functions
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
9191 "%s: unable to clear thread attributes.",
9292 function );
9393
94 goto on_error;
94 memory_free(
95 internal_thread_attributes );
96
97 return( -1 );
9598 }
9699 /* TODO */
97100 *thread_attributes = (libcthreads_thread_attributes_t *) internal_thread_attributes;
00 /*
11 * Thread attributes functions
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
7373 }
7474 #endif
7575
76 #endif
76 #endif /* !defined( _LIBCTHREADS_THREAD_ATTRIBUTES_H ) */
7777
00 /*
11 * Thread pool functions
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3535 #include "libcthreads_thread_attributes.h"
3636 #include "libcthreads_thread_pool.h"
3737 #include "libcthreads_types.h"
38 #include "libcthreads_unused.h"
3839
3940 #if !defined( HAVE_LOCAL_LIBCTHREADS ) || defined( HAVE_MULTI_THREAD_SUPPORT )
4041
4142 #if defined( WINAPI ) && ( WINVER >= 0x0602 )
42 /* TODO */
43 #error TP_POOL support not implemented yet
43
44 void CALLBACK libcthreads_thread_pool_callback_function_helper(
45 TP_CALLBACK_INSTANCE *callback_instance,
46 void *arguments,
47 TP_WORK *thread_pool_work )
48 {
49 libcerror_error_t *error = NULL;
50 libcthreads_internal_thread_pool_t *internal_thread_pool = NULL;
51 intptr_t *value = NULL;
52 int callback_function_result = 0;
53 int pop_result = 0;
54
55 LIBCTHREADS_UNREFERENCED_PARAMETER( callback_instance )
56 LIBCTHREADS_UNREFERENCED_PARAMETER( thread_pool_work )
57
58 if( arguments == NULL )
59 {
60 return;
61 }
62 internal_thread_pool = (libcthreads_internal_thread_pool_t *) arguments;
63
64 if( ( internal_thread_pool == NULL )
65 || ( internal_thread_pool->callback_function == NULL ) )
66 {
67 return;
68 }
69 pop_result = libcthreads_internal_thread_pool_pop(
70 internal_thread_pool,
71 &value,
72 &error );
73
74 if( pop_result == -1 )
75 {
76 #if defined( HAVE_VERBOSE_OUTPUT )
77 libcerror_error_backtrace_fprint(
78 error,
79 stdout );
80 #endif
81 libcerror_error_free(
82 &error );
83
84 return;
85 }
86 if( pop_result == 0 )
87 {
88 return;
89 }
90 callback_function_result = internal_thread_pool->callback_function(
91 value,
92 internal_thread_pool->callback_function_arguments );
93
94 if( callback_function_result != 1 )
95 {
96 #if defined( HAVE_VERBOSE_OUTPUT )
97 libcerror_error_backtrace_fprint(
98 error,
99 stdout );
100 #endif
101 libcerror_error_free(
102 &error );
103 }
104 }
44105
45106 #elif defined( WINAPI )
46107
218279 {
219280 libcthreads_internal_thread_pool_t *internal_thread_pool = NULL;
220281 static char *function = "libcthreads_thread_pool_create";
282 size_t array_size = 0;
283
284 #if !defined( WINAPI ) || ( WINVER < 0x0602 )
285 int thread_index = 0;
286 #endif
221287
222288 #if defined( WINAPI )
223289 DWORD error_code = 0;
224290 #endif
225 #if !( defined( WINAPI ) && ( WINVER >= 0x0602 ) )
226 size_t array_size = 0;
227 int thread_index = 0;
228
229 #if defined( WINAPI )
291
292 #if defined( WINAPI ) && ( WINVER >= 0x0602 )
293 BOOL result = FALSE;
294
295 #elif defined( WINAPI )
230296 SECURITY_ATTRIBUTES *security_attributes = NULL;
231297 HANDLE thread_handle = NULL;
232298
235301 int *thread_return_value = NULL;
236302 int pthread_result = 0;
237303 #endif
238 #endif /* !( defined( WINAPI ) && ( WINVER >= 0x0602 ) ) */
304
305 #if defined( WINAPI ) && ( WINVER >= 0x0602 )
306 LIBCTHREADS_UNREFERENCED_PARAMETER( thread_attributes )
307 #endif
239308
240309 if( thread_pool == NULL )
241310 {
284353 return( -1 );
285354 }
286355 #endif /* SIZEOF_INT > 4 */
356
287357 #else
288358 #if SIZEOF_INT <= SIZEOF_SIZE_T
289359 if( (size_t) number_of_threads > (size_t) ( SSIZE_MAX / sizeof( libcthreads_thread_t * ) ) )
301371 return( -1 );
302372 }
303373 #endif /* defined( WINAPI ) && ( WINVER >= 0x0602 ) */
374
304375 if( maximum_number_of_values <= 0 )
305376 {
306377 libcerror_error_set(
364435 "%s: unable to clear thread pool.",
365436 function );
366437
367 goto on_error;
368 }
369 #if defined( WINAPI ) && ( WINVER >= 0x0602 )
370 /* TODO */
371 internal_thread_pool->thread_pool = CreateThreadpool(
372 NULL );
373
374 if( internal_thread_pool->thread_pool == NULL )
375 {
376 error_code = GetLastError();
377
378 libcerror_system_set_error(
379 error,
380 error_code,
381 LIBCERROR_ERROR_DOMAIN_RUNTIME,
382 LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,
383 "%s: unable to create thread pool.",
384 function );
385
386 goto on_error;
387 }
388 SetThreadpoolThreadMaximum(
389 internal_thread_pool->thread_pool,
390 (DWORD) number_of_threads );
391
392 #else
438 memory_free(
439 internal_thread_pool );
440
441 return( -1 );
442 }
393443 array_size = sizeof( intptr_t * ) * maximum_number_of_values;
394444
395445 if( array_size > (size_t) SSIZE_MAX )
476526
477527 goto on_error;
478528 }
479 #if defined( WINAPI )
529 #if defined( WINAPI ) && ( WINVER >= 0x0602 )
530 InitializeThreadpoolEnvironment(
531 &( internal_thread_pool->callback_environment ) );
532
533 internal_thread_pool->thread_pool = CreateThreadpool(
534 NULL );
535
536 if( internal_thread_pool->thread_pool == NULL )
537 {
538 error_code = GetLastError();
539
540 libcerror_system_set_error(
541 error,
542 error_code,
543 LIBCERROR_ERROR_DOMAIN_RUNTIME,
544 LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,
545 "%s: unable to create thread pool.",
546 function );
547
548 goto on_error;
549 }
550 internal_thread_pool->cleanup_group = CreateThreadpoolCleanupGroup();
551
552 result = SetThreadpoolThreadMinimum(
553 internal_thread_pool->thread_pool,
554 (DWORD) number_of_threads );
555
556 if( result != TRUE )
557 {
558 error_code = GetLastError();
559
560 libcerror_system_set_error(
561 error,
562 error_code,
563 LIBCERROR_ERROR_DOMAIN_RUNTIME,
564 LIBCERROR_RUNTIME_ERROR_SET_FAILED,
565 "%s: unable to set minimum number of threads.",
566 function );
567
568 goto on_error;
569 }
570 SetThreadpoolThreadMaximum(
571 internal_thread_pool->thread_pool,
572 (DWORD) number_of_threads );
573
574 if( internal_thread_pool->cleanup_group == NULL )
575 {
576 error_code = GetLastError();
577
578 libcerror_system_set_error(
579 error,
580 error_code,
581 LIBCERROR_ERROR_DOMAIN_RUNTIME,
582 LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,
583 "%s: unable to create thread pool cleanup group.",
584 function );
585
586 goto on_error;
587 }
588 SetThreadpoolCallbackPool(
589 &( internal_thread_pool->callback_environment ),
590 internal_thread_pool->thread_pool );
591
592 SetThreadpoolCallbackCleanupGroup(
593 &( internal_thread_pool->callback_environment ),
594 internal_thread_pool->cleanup_group,
595 NULL );
596
597 #elif defined( WINAPI )
480598 array_size = sizeof( HANDLE ) * number_of_threads;
481599
482600 if( array_size > (size_t) SSIZE_MAX )
667785 goto on_error;
668786 }
669787 }
670 #endif /* defined( WINAPI ) */
671788 #endif /* defined( WINAPI ) && ( WINVER >= 0x0602 ) */
789
672790 *thread_pool = (libcthreads_thread_pool_t *) internal_thread_pool;
673791
674792 return( 1 );
676794 on_error:
677795 if( internal_thread_pool != NULL )
678796 {
679 #if !( defined( WINAPI ) && ( WINVER >= 0x0602 ) )
680 #if defined( WINAPI )
797 #if defined( WINAPI ) && ( WINVER >= 0x0602 )
798 if( internal_thread_pool->cleanup_group != NULL )
799 {
800 CloseThreadpoolCleanupGroup(
801 internal_thread_pool->cleanup_group );
802
803 internal_thread_pool->cleanup_group = NULL;
804 }
805 if( internal_thread_pool->thread_pool != NULL )
806 {
807 CloseThreadpool(
808 internal_thread_pool->thread_pool );
809
810 internal_thread_pool->thread_pool = NULL;
811 }
812
813 #elif defined( WINAPI )
681814 if( internal_thread_pool->thread_identifiers_array != NULL )
682815 {
683816 memory_free(
684817 internal_thread_pool->thread_identifiers_array );
685818 }
686 #endif
687 #if defined( WINAPI )
688819 if( internal_thread_pool->thread_handles_array != NULL )
689820 {
690821 while( thread_index >= 0 )
719850 memory_free(
720851 internal_thread_pool->threads_array );
721852 }
722 #endif
853 #endif /* defined( WINAPI ) && ( WINVER >= 0x0602 ) */
854
723855 if( internal_thread_pool->full_condition != NULL )
724856 {
725857 libcthreads_condition_free(
743875 memory_free(
744876 internal_thread_pool->values_array );
745877 }
746 #endif
747878 memory_free(
748879 internal_thread_pool );
749880 }
750881 return( -1 );
751882 }
752
753 #if !( defined( WINAPI ) && ( WINVER >= 0x0602 ) )
754883
755884 /* Pops a value off the queue of the thread pool
756885 * Returns 1 if successful, 0 if no value available or -1 on error
870999 return( -1 );
8711000 }
8721001
873 #endif /* !( defined( WINAPI ) && ( WINVER >= 0x0602 ) ) */
874
8751002 /* Pushes a value onto the queue of the thread pool
8761003 * Returns 1 if successful or -1 on error
8771004 */
8831010 libcthreads_internal_thread_pool_t *internal_thread_pool = NULL;
8841011 static char *function = "libcthreads_thread_pool_push";
8851012
1013 #if defined( WINAPI ) && ( WINVER >= 0x0602 )
1014 TP_WORK *thread_pool_work = NULL;
1015 DWORD error_code = 0;
1016 #endif
1017
8861018 if( thread_pool == NULL )
8871019 {
8881020 libcerror_error_set(
9861118
9871119 return( -1 );
9881120 }
1121 #if defined( WINAPI ) && ( WINVER >= 0x0602 )
1122 thread_pool_work = CreateThreadpoolWork(
1123 &libcthreads_thread_pool_callback_function_helper,
1124 (void *) internal_thread_pool,
1125 &( internal_thread_pool->callback_environment ) );
1126
1127 if( thread_pool_work == NULL )
1128 {
1129 error_code = GetLastError();
1130
1131 libcerror_system_set_error(
1132 error,
1133 error_code,
1134 LIBCERROR_ERROR_DOMAIN_RUNTIME,
1135 LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,
1136 "%s: unable to create thread pool work.",
1137 function );
1138
1139 return( -1 );
1140 }
1141 SubmitThreadpoolWork(
1142 thread_pool_work );
1143
1144 #endif /* defined( WINAPI ) && ( WINVER >= 0x0602 ) */
1145
9891146 return( 1 );
9901147
9911148 on_error:
10231180 int result = 1;
10241181 int value_index = 0;
10251182
1183 #if defined( WINAPI ) && ( WINVER >= 0x0602 )
1184 TP_WORK *thread_pool_work = NULL;
1185 DWORD error_code = 0;
1186 #endif
1187
10261188 if( thread_pool == NULL )
10271189 {
10281190 libcerror_error_set(
12281390
12291391 return( -1 );
12301392 }
1393 #if defined( WINAPI ) && ( WINVER >= 0x0602 )
1394 thread_pool_work = CreateThreadpoolWork(
1395 &libcthreads_thread_pool_callback_function_helper,
1396 (void *) internal_thread_pool,
1397 &( internal_thread_pool->callback_environment ) );
1398
1399 if( thread_pool_work == NULL )
1400 {
1401 error_code = GetLastError();
1402
1403 libcerror_system_set_error(
1404 error,
1405 error_code,
1406 LIBCERROR_ERROR_DOMAIN_RUNTIME,
1407 LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,
1408 "%s: unable to create thread pool work.",
1409 function );
1410
1411 return( -1 );
1412 }
1413 SubmitThreadpoolWork(
1414 thread_pool_work );
1415
1416 #endif /* defined( WINAPI ) && ( WINVER >= 0x0602 ) */
1417
12311418 return( result );
12321419
12331420 on_error:
12501437 static char *function = "libcthreads_thread_pool_join";
12511438 int result = 1;
12521439
1253 #if defined( WINAPI ) && ( WINVER >= 0x0602 )
1254 /* TODO */
1255
1256 #else
1440 #if !defined( WINAPI ) || ( WINVER < 0x0602 )
12571441 int thread_index = 0;
12581442
12591443 #if defined( WINAPI )
12641448 int *thread_return_value = NULL;
12651449 int pthread_result = 0;
12661450 #endif
1267 #endif
1451 #endif /* !defined( WINAPI ) || ( WINVER < 0x0602 ) */
12681452
12691453 if( thread_pool == NULL )
12701454 {
12911475 internal_thread_pool = (libcthreads_internal_thread_pool_t *) *thread_pool;
12921476 *thread_pool = NULL;
12931477
1294 #if defined( WINAPI ) && ( WINVER >= 0x0602 )
1295 /* TODO */
1296
1297 #else
12981478 if( libcthreads_mutex_grab(
12991479 internal_thread_pool->condition_mutex,
13001480 error ) != 1 )
13591539
13601540 return( -1 );
13611541 }
1362 #if defined( WINAPI )
1542 #if defined( WINAPI ) && ( WINVER >= 0x0602 )
1543 CloseThreadpoolCleanupGroupMembers(
1544 internal_thread_pool->cleanup_group,
1545 FALSE,
1546 NULL );
1547
1548 CloseThreadpoolCleanupGroup(
1549 internal_thread_pool->cleanup_group );
1550
1551 internal_thread_pool->cleanup_group = NULL;
1552
1553 CloseThreadpool(
1554 internal_thread_pool->thread_pool );
1555
1556 internal_thread_pool->thread_pool = NULL;
1557
1558 #elif defined( WINAPI )
13631559 for( thread_index = 0;
13641560 thread_index < internal_thread_pool->number_of_threads;
13651561 thread_index++ )
14311627 thread_return_value = NULL;
14321628 }
14331629 }
1434 #endif
1630 #endif /* defined( WINAPI ) && ( WINVER >= 0x0602 ) */
14351631 if( libcthreads_condition_free(
14361632 &( internal_thread_pool->full_condition ),
14371633 error ) != 1 )
14711667
14721668 result = -1;
14731669 }
1474 #if defined( WINAPI )
1670 #if defined( WINAPI ) && ( WINVER < 0x0602 )
14751671 memory_free(
14761672 internal_thread_pool->thread_identifiers_array );
14771673
14831679 internal_thread_pool->threads_array );
14841680 #endif
14851681
1486 #endif /* defined( WINAPI ) && ( WINVER >= 0x0602 ) */
1487
14881682 memory_free(
14891683 internal_thread_pool->values_array );
14901684 memory_free(
00 /*
11 * Thread pool functions
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4747 */
4848 TP_POOL *thread_pool;
4949
50 /* The cleanup group.
51 */
52 TP_CLEANUP_GROUP *cleanup_group;
53
54 /* The callback environment
55 */
56 TP_CALLBACK_ENVIRON callback_environment;
57
5058 #else
5159 /* The number of threads in the pool
5260 */
6977 #else
7078 #error Missing thread type
7179 #endif
80
81 #endif /* defined( WINAPI ) && ( WINVER >= 0x0602 ) */
7282
7383 /* The callback function
7484 */
115125 /* The status
116126 */
117127 uint8_t status;
118
119 #endif /* !( defined( WINAPI ) && ( WINVER >= 0x0602 ) ) */
120128 };
121129
122130 LIBCTHREADS_EXTERN \
131139 void *callback_function_arguments,
132140 libcerror_error_t **error );
133141
134 #if !( defined( WINAPI ) && ( WINVER >= 0x0602 ) )
135
136142 int libcthreads_internal_thread_pool_pop(
137143 libcthreads_internal_thread_pool_t *internal_thread_pool,
138144 intptr_t **value,
139145 libcerror_error_t **error );
140
141 #endif /* !( defined( WINAPI ) && ( WINVER >= 0x0602 ) ) */
142146
143147 LIBCTHREADS_EXTERN \
144148 int libcthreads_thread_pool_push(
00 /*
11 * The internal type definitions
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal unused definition
22 *
3 * Copyright (C) 2012-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2012-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
11 -DLOCALEDIR=\"$(datadir)/locale\" \
22 -I$(top_srcdir)/include \
33 -I$(top_srcdir)/common \
4 @LIBCSTRING_CPPFLAGS@ \
54 @LIBCERROR_CPPFLAGS@ \
65 @LIBCDATA_CPPFLAGS@ \
76 @LIBCLOCALE_CPPFLAGS@ \
1615 @LIBFDATETIME_CPPFLAGS@ \
1716 @LIBFGUID_CPPFLAGS@ \
1817 @LIBFVALUE_CPPFLAGS@ \
19 @LIBFWNT_CPPFLAGS@
18 @LIBFWNT_CPPFLAGS@ \
19 @PTHREAD_CPPFLAGS@
2020
2121 lib_LTLIBRARIES = libesedb.la
2222
5050 libesedb_libcerror.h \
5151 libesedb_libclocale.h \
5252 libesedb_libcnotify.h \
53 libesedb_libcstring.h \
5453 libesedb_libfcache.h \
5554 libesedb_libfdata.h \
5655 libesedb_libfvalue.h \
6059 libesedb_notify.c libesedb_notify.h \
6160 libesedb_page.c libesedb_page.h \
6261 libesedb_page_tree.c libesedb_page_tree.h \
62 libesedb_page_value.c libesedb_page_value.h \
6363 libesedb_record.c libesedb_record.h \
6464 libesedb_record_value.c libesedb_record_value.h \
6565 libesedb_support.c libesedb_support.h \
7070 libesedb_value_data_handle.c libesedb_value_data_handle.h
7171
7272 libesedb_la_LIBADD = \
73 @LIBCSTRING_LIBADD@ \
7473 @LIBCERROR_LIBADD@ \
7574 @LIBCDATA_LIBADD@ \
7675 @LIBCLOCALE_LIBADD@ \
8584 @LIBFDATETIME_LIBADD@ \
8685 @LIBFGUID_LIBADD@ \
8786 @LIBFVALUE_LIBADD@ \
88 @LIBFWNT_LIBADD@
87 @LIBFWNT_LIBADD@ \
88 @PTHREAD_LIBADD@
8989
9090 libesedb_la_LDFLAGS = -no-undefined -version-info 1:0:0
9191
9797 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9898 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9999 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101100 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102101 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103102 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
108107 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109108 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110109 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
110 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
111 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
113112 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114113 $(ACLOCAL_M4)
115114 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
157156 libesedb_io_handle.lo libesedb_key.lo libesedb_lcid.lo \
158157 libesedb_long_value.lo libesedb_multi_value.lo \
159158 libesedb_notify.lo libesedb_page.lo libesedb_page_tree.lo \
160 libesedb_record.lo libesedb_record_value.lo \
161 libesedb_support.lo libesedb_table.lo \
159 libesedb_page_value.lo libesedb_record.lo \
160 libesedb_record_value.lo libesedb_support.lo libesedb_table.lo \
162161 libesedb_table_definition.lo libesedb_value_data_handle.lo
163162 libesedb_la_OBJECTS = $(am_libesedb_la_OBJECTS)
164163 AM_V_lt = $(am__v_lt_@AM_V@)
272271 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
273272 HAVE_LIBCPATH = @HAVE_LIBCPATH@
274273 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
275 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
276 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
277274 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
278275 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
279276 HAVE_LIBFDATA = @HAVE_LIBFDATA@
292289 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
293290 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
294291 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
295 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
296 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
297292 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
298293 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
299294 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
340335 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
341336 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
342337 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
343 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
344 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
345 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
346 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
347338 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
348339 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
349340 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
376367 LTLIBICONV = @LTLIBICONV@
377368 LTLIBINTL = @LTLIBINTL@
378369 LTLIBOBJS = @LTLIBOBJS@
370 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
379371 MAKEINFO = @MAKEINFO@
380372 MANIFEST_TOOL = @MANIFEST_TOOL@
381373 MKDIR_P = @MKDIR_P@
482474 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
483475 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
484476 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
485 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
486 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
487 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
488 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
489 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
490 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
491477 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
492478 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
493479 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
556542 libcpath_LIBS = @libcpath_LIBS@
557543 libcsplit_CFLAGS = @libcsplit_CFLAGS@
558544 libcsplit_LIBS = @libcsplit_LIBS@
559 libcstring_CFLAGS = @libcstring_CFLAGS@
560 libcstring_LIBS = @libcstring_LIBS@
561 libcsystem_CFLAGS = @libcsystem_CFLAGS@
562 libcsystem_LIBS = @libcsystem_LIBS@
563545 libcthreads_CFLAGS = @libcthreads_CFLAGS@
564546 libcthreads_LIBS = @libcthreads_LIBS@
565547 libdir = @libdir@
612594 -DLOCALEDIR=\"$(datadir)/locale\" \
613595 -I$(top_srcdir)/include \
614596 -I$(top_srcdir)/common \
615 @LIBCSTRING_CPPFLAGS@ \
616597 @LIBCERROR_CPPFLAGS@ \
617598 @LIBCDATA_CPPFLAGS@ \
618599 @LIBCLOCALE_CPPFLAGS@ \
627608 @LIBFDATETIME_CPPFLAGS@ \
628609 @LIBFGUID_CPPFLAGS@ \
629610 @LIBFVALUE_CPPFLAGS@ \
630 @LIBFWNT_CPPFLAGS@
611 @LIBFWNT_CPPFLAGS@ \
612 @PTHREAD_CPPFLAGS@
631613
632614 lib_LTLIBRARIES = libesedb.la
633615 libesedb_la_SOURCES = \
660642 libesedb_libcerror.h \
661643 libesedb_libclocale.h \
662644 libesedb_libcnotify.h \
663 libesedb_libcstring.h \
664645 libesedb_libfcache.h \
665646 libesedb_libfdata.h \
666647 libesedb_libfvalue.h \
670651 libesedb_notify.c libesedb_notify.h \
671652 libesedb_page.c libesedb_page.h \
672653 libesedb_page_tree.c libesedb_page_tree.h \
654 libesedb_page_value.c libesedb_page_value.h \
673655 libesedb_record.c libesedb_record.h \
674656 libesedb_record_value.c libesedb_record_value.h \
675657 libesedb_support.c libesedb_support.h \
680662 libesedb_value_data_handle.c libesedb_value_data_handle.h
681663
682664 libesedb_la_LIBADD = \
683 @LIBCSTRING_LIBADD@ \
684665 @LIBCERROR_LIBADD@ \
685666 @LIBCDATA_LIBADD@ \
686667 @LIBCLOCALE_LIBADD@ \
695676 @LIBFDATETIME_LIBADD@ \
696677 @LIBFGUID_LIBADD@ \
697678 @LIBFVALUE_LIBADD@ \
698 @LIBFWNT_LIBADD@
679 @LIBFWNT_LIBADD@ \
680 @PTHREAD_LIBADD@
699681
700682 libesedb_la_LDFLAGS = -no-undefined -version-info 1:0:0
701683 EXTRA_DIST = \
812794 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_notify.Plo@am__quote@
813795 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_page.Plo@am__quote@
814796 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_page_tree.Plo@am__quote@
797 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_page_value.Plo@am__quote@
815798 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_record.Plo@am__quote@
816799 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_record_value.Plo@am__quote@
817800 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libesedb_support.Plo@am__quote@
00 /*
11 * The file header definition of an Extensible Storage Engine (ESE) Database File (EDB)
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
347347 }
348348 #endif
349349
350 #endif
351
350 #endif /* !defined( _ESEDB_FILE_HEADER_H ) */
351
00 /*
11 * The page definition of an Extensible Storage Engine (ESE) Database File (EDB)
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
141141 }
142142 #endif
143143
144 #endif
144 #endif /* !defined( _ESEDB_PAGE_H ) */
145145
00 /*
11 * The page values definition of an Extensible Storage Engine (ESE) Database File (EDB)
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
228228 }
229229 #endif
230230
231 #endif
232
231 #endif /* !defined( _ESEDB_PAGE_VALUES_H ) */
232
00 /*
11 * Library to access the Extensible Storage Engine (ESE) Database File (EDB) format
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
5050 case DLL_PROCESS_ATTACH:
5151 DisableThreadLibraryCalls(
5252 hinstDLL );
53 break;
53 break;
5454
5555 case DLL_THREAD_ATTACH:
5656 break;
2020 BEGIN
2121 BLOCK "040904E4"
2222 BEGIN
23 VALUE "FileDescription", "Library to access the Extensible Storage Engine (ESE) Database File (EDB) fomat\0"
24 VALUE "FileVersion", "20160622" "\0"
23 VALUE "FileDescription", "Library to access the Extensible Storage Engine (ESE) Database File (EDB) format\0"
24 VALUE "FileVersion", "20170121" "\0"
2525 VALUE "InternalName", "libesedb.dll\0"
26 VALUE "LegalCopyright", "(c) 2009-2013 Joachim Metz <joachim.metz@gmail.com>\0"
26 VALUE "LegalCopyright", "(C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>\0"
2727 VALUE "OriginalFilename", "libesedb.dll\0"
2828 VALUE "ProductName", "libesedb\0"
29 VALUE "ProductVersion", "20160622" "\0"
29 VALUE "ProductVersion", "20170121" "\0"
3030 VALUE "Comments", "For more information visit https://github.com/libyal/libesedb/\0"
3131 END
3232 END
2020 BEGIN
2121 BLOCK "040904E4"
2222 BEGIN
23 VALUE "FileDescription", "Library to access the Extensible Storage Engine (ESE) Database File (EDB) fomat\0"
23 VALUE "FileDescription", "Library to access the Extensible Storage Engine (ESE) Database File (EDB) format\0"
2424 VALUE "FileVersion", "@VERSION@" "\0"
2525 VALUE "InternalName", "libesedb.dll\0"
26 VALUE "LegalCopyright", "(c) 2009-2013 Joachim Metz <joachim.metz@gmail.com>\0"
26 VALUE "LegalCopyright", "(C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>\0"
2727 VALUE "OriginalFilename", "libesedb.dll\0"
2828 VALUE "ProductName", "libesedb\0"
2929 VALUE "ProductVersion", "@VERSION@" "\0"
00 /*
11 * Catalog functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Catalog functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
9898 }
9999 #endif
100100
101 #endif
101 #endif /* !defined( _LIBESEDB_CATALOG_H ) */
102102
00 /*
11 * Catalog definition functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2121 #include <common.h>
2222 #include <byte_stream.h>
2323 #include <memory.h>
24 #include <narrow_string.h>
25 #include <system_string.h>
2426 #include <types.h>
27 #include <wide_string.h>
2528
2629 #include "libesedb_catalog_definition.h"
2730 #include "libesedb_codepage.h"
3134 #include "libesedb_lcid.h"
3235 #include "libesedb_libcerror.h"
3336 #include "libesedb_libcnotify.h"
34 #include "libesedb_libcstring.h"
3537 #include "libesedb_libuna.h"
3638 #include "libesedb_unused.h"
3739
187189 uint8_t variable_size_data_type_iterator = 0;
188190
189191 #if defined( HAVE_DEBUG_OUTPUT )
190 libcstring_system_character_t *value_string = 0;
192 system_character_t *value_string = 0;
191193 size_t value_string_size = 0;
192194 uint32_t value_32bit = 0;
193195 uint16_t record_offset = 0;
666668 #if defined( HAVE_DEBUG_OUTPUT )
667669 if( libcnotify_verbose != 0 )
668670 {
669 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
671 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
670672 result = libuna_utf16_string_size_from_byte_stream(
671673 catalog_definition->name,
672674 catalog_definition->name_size,
693695
694696 return( -1 );
695697 }
696 catalog_definition->name_string = libcstring_system_string_allocate(
698 catalog_definition->name_string = system_string_allocate(
697699 value_string_size );
698700
699701 if( catalog_definition->name_string == NULL )
707709
708710 return( -1 );
709711 }
710 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
712 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
711713 result = libuna_utf16_string_copy_from_byte_stream(
712714 (libuna_utf16_character_t *) catalog_definition->name_string,
713715 value_string_size,
742744 return( -1 );
743745 }
744746 libcnotify_printf(
745 "%s: (%03" PRIu8 ") name\t\t\t\t\t\t: %" PRIs_LIBCSTRING_SYSTEM "\n",
747 "%s: (%03" PRIu8 ") name\t\t\t\t\t\t: %" PRIs_SYSTEM "\n",
746748 function,
747749 data_type_number,
748750 catalog_definition->name_string );
834836 #if defined( HAVE_DEBUG_OUTPUT )
835837 if( libcnotify_verbose != 0 )
836838 {
837 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
839 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
838840 result = libuna_utf16_string_size_from_byte_stream(
839841 catalog_definition->template_name,
840842 catalog_definition->template_name_size,
861863
862864 return( -1 );
863865 }
864 value_string = libcstring_system_string_allocate(
866 value_string = system_string_allocate(
865867 value_string_size );
866868
867869 if( value_string == NULL )
875877
876878 return( -1 );
877879 }
878 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
880 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
879881 result = libuna_utf16_string_copy_from_byte_stream(
880882 (libuna_utf16_character_t *) value_string,
881883 value_string_size,
908910 return( -1 );
909911 }
910912 libcnotify_printf(
911 "%s: (%03" PRIu8 ") template name\t\t\t\t\t: %" PRIs_LIBCSTRING_SYSTEM "\n",
913 "%s: (%03" PRIu8 ") template name\t\t\t\t\t: %" PRIs_SYSTEM "\n",
912914 function,
913915 data_type_number,
914916 value_string );
00 /*
11 * Catalog definition functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2525 #include <types.h>
2626
2727 #include "libesedb_libcerror.h"
28 #include "libesedb_libcstring.h"
2928
3029 #if defined( __cplusplus )
3130 extern "C" {
8180 #if defined( HAVE_DEBUG_OUTPUT )
8281 /* The name string
8382 */
84 libcstring_system_character_t *name_string;
83 system_character_t *name_string;
8584 #endif
8685
8786 /* The template name
182181 }
183182 #endif
184183
185 #endif
184 #endif /* !defined( _LIBESEDB_CATALOG_DEFINITION_H ) */
186185
00 /*
11 * Checksum functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Checksum functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
5050 }
5151 #endif
5252
53 #endif
53 #endif /* !defined( _LIBESEDB_CHECKSUM_H ) */
5454
00 /*
11 * Codepage functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Codepage functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4242 */
4343 enum LIBESEDB_CODEPAGES
4444 {
45 LIBESEDB_CODEPAGE_ASCII = 20127,
45 LIBESEDB_CODEPAGE_ASCII = 20127,
4646
47 LIBESEDB_CODEPAGE_ISO_8859_1 = 28591,
48 LIBESEDB_CODEPAGE_ISO_8859_2 = 28592,
49 LIBESEDB_CODEPAGE_ISO_8859_3 = 28593,
50 LIBESEDB_CODEPAGE_ISO_8859_4 = 28594,
51 LIBESEDB_CODEPAGE_ISO_8859_5 = 28595,
52 LIBESEDB_CODEPAGE_ISO_8859_6 = 28596,
53 LIBESEDB_CODEPAGE_ISO_8859_7 = 28597,
54 LIBESEDB_CODEPAGE_ISO_8859_8 = 28598,
55 LIBESEDB_CODEPAGE_ISO_8859_9 = 28599,
56 LIBESEDB_CODEPAGE_ISO_8859_10 = 28600,
57 LIBESEDB_CODEPAGE_ISO_8859_11 = 28601,
58 LIBESEDB_CODEPAGE_ISO_8859_13 = 28603,
59 LIBESEDB_CODEPAGE_ISO_8859_14 = 28604,
60 LIBESEDB_CODEPAGE_ISO_8859_15 = 28605,
61 LIBESEDB_CODEPAGE_ISO_8859_16 = 28606,
47 LIBESEDB_CODEPAGE_ISO_8859_1 = 28591,
48 LIBESEDB_CODEPAGE_ISO_8859_10 = 28600,
49 LIBESEDB_CODEPAGE_ISO_8859_11 = 28601,
50 LIBESEDB_CODEPAGE_ISO_8859_13 = 28603,
51 LIBESEDB_CODEPAGE_ISO_8859_14 = 28604,
52 LIBESEDB_CODEPAGE_ISO_8859_15 = 28605,
53 LIBESEDB_CODEPAGE_ISO_8859_16 = 28606,
54 LIBESEDB_CODEPAGE_ISO_8859_2 = 28592,
55 LIBESEDB_CODEPAGE_ISO_8859_3 = 28593,
56 LIBESEDB_CODEPAGE_ISO_8859_4 = 28594,
57 LIBESEDB_CODEPAGE_ISO_8859_5 = 28595,
58 LIBESEDB_CODEPAGE_ISO_8859_6 = 28596,
59 LIBESEDB_CODEPAGE_ISO_8859_7 = 28597,
60 LIBESEDB_CODEPAGE_ISO_8859_8 = 28598,
61 LIBESEDB_CODEPAGE_ISO_8859_9 = 28599,
6262
63 LIBESEDB_CODEPAGE_KOI8_R = 20866,
64 LIBESEDB_CODEPAGE_KOI8_U = 21866,
63 LIBESEDB_CODEPAGE_KOI8_R = 20866,
64 LIBESEDB_CODEPAGE_KOI8_U = 21866,
6565
66 LIBESEDB_CODEPAGE_WINDOWS_874 = 874,
67 LIBESEDB_CODEPAGE_WINDOWS_932 = 932,
68 LIBESEDB_CODEPAGE_WINDOWS_936 = 936,
69 LIBESEDB_CODEPAGE_WINDOWS_949 = 949,
70 LIBESEDB_CODEPAGE_WINDOWS_950 = 950,
71 LIBESEDB_CODEPAGE_WINDOWS_1250 = 1250,
72 LIBESEDB_CODEPAGE_WINDOWS_1251 = 1251,
73 LIBESEDB_CODEPAGE_WINDOWS_1252 = 1252,
74 LIBESEDB_CODEPAGE_WINDOWS_1253 = 1253,
75 LIBESEDB_CODEPAGE_WINDOWS_1254 = 1254,
76 LIBESEDB_CODEPAGE_WINDOWS_1255 = 1255,
77 LIBESEDB_CODEPAGE_WINDOWS_1256 = 1256,
78 LIBESEDB_CODEPAGE_WINDOWS_1257 = 1257,
79 LIBESEDB_CODEPAGE_WINDOWS_1258 = 1258
66 LIBESEDB_CODEPAGE_WINDOWS_1250 = 1250,
67 LIBESEDB_CODEPAGE_WINDOWS_1251 = 1251,
68 LIBESEDB_CODEPAGE_WINDOWS_1252 = 1252,
69 LIBESEDB_CODEPAGE_WINDOWS_1253 = 1253,
70 LIBESEDB_CODEPAGE_WINDOWS_1254 = 1254,
71 LIBESEDB_CODEPAGE_WINDOWS_1255 = 1255,
72 LIBESEDB_CODEPAGE_WINDOWS_1256 = 1256,
73 LIBESEDB_CODEPAGE_WINDOWS_1257 = 1257,
74 LIBESEDB_CODEPAGE_WINDOWS_1258 = 1258
75 LIBESEDB_CODEPAGE_WINDOWS_874 = 874,
76 LIBESEDB_CODEPAGE_WINDOWS_932 = 932,
77 LIBESEDB_CODEPAGE_WINDOWS_936 = 936,
78 LIBESEDB_CODEPAGE_WINDOWS_949 = 949,
79 LIBESEDB_CODEPAGE_WINDOWS_950 = 950,
8080 };
8181
8282 #endif /* !defined( HAVE_LOCAL_LIBESEDB ) */
00 /*
11 * Column functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Column functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
100100 }
101101 #endif
102102
103 #endif
103 #endif /* !defined( _LIBESEDB_COLUMN_H ) */
104104
00 /*
11 * Column type functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Column type functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
5959 }
6060 #endif
6161
62 #endif
62 #endif /* !defined( _LIBESEDB_COLUMN_TYPE_H ) */
6363
00 /*
11 * Compression functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Compression functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
9999 }
100100 #endif
101101
102 #endif
102 #endif /* !defined( _LIBESEDB_COMPRESSION_H ) */
103103
00 /*
11 * Data definition functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2020
2121 #include <common.h>
2222 #include <memory.h>
23 #include <system_string.h>
2324 #include <types.h>
2425
2526 #include "libesedb_catalog_definition.h"
3233 #include "libesedb_libcdata.h"
3334 #include "libesedb_libcerror.h"
3435 #include "libesedb_libcnotify.h"
35 #include "libesedb_libcstring.h"
3636 #include "libesedb_libfcache.h"
3737 #include "libesedb_libfdata.h"
3838 #include "libesedb_libfvalue.h"
739739 function,
740740 column_catalog_definition->identifier );
741741 libcnotify_printf(
742 "%s: column definition name\t\t\t: %" PRIs_LIBCSTRING_SYSTEM "\n",
742 "%s: column definition name\t\t\t: %" PRIs_SYSTEM "\n",
743743 function,
744744 column_catalog_definition->name_string );
745745 libcnotify_printf(
00 /*
11 * Data definition functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
112112 }
113113 #endif
114114
115 #endif
115 #endif /* !defined( _LIBESEDB_DATA_DEFINITION_H ) */
116116
00 /*
11 * Data segment functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Data segment functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
8282 }
8383 #endif
8484
85 #endif
85 #endif /* !defined( _LIBESEDB_DATA_SEGMENT_H ) */
8686
00 /*
11 * Database functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Database functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
6262 }
6363 #endif
6464
65 #endif
65 #endif /* !defined( _LIBESEDB_DATABASE_H ) */
6666
00 /*
11 * Debug functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Debug functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
8080 }
8181 #endif
8282
83 #endif
83 #endif /* !defined( _LIBESEDB_DEBUG_H ) */
8484
00 /*
11 * The internal definitions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3939 * for local use of libesedb
4040 */
4141 #else
42 #define LIBESEDB_VERSION 20160622
42 #define LIBESEDB_VERSION 20170121
4343
4444 /* The version string
4545 */
46 #define LIBESEDB_VERSION_STRING "20160622"
46 #define LIBESEDB_VERSION_STRING "20170121"
4747
4848 /* The access flags definitions
4949 * bit 1 set to 1 for read access
00 /*
11 * The internal definitions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4343 libesedb_error_t *error,
4444 FILE *stream )
4545 {
46 return( libcerror_error_fprint(
47 (libcerror_error_t *) error,
48 stream ) );
46 int print_count = 0;
47
48 print_count = libcerror_error_fprint(
49 (libcerror_error_t *) error,
50 stream );
51
52 return( print_count );
4953 }
5054
5155 /* Prints a descriptive string of the error to the string
5761 char *string,
5862 size_t size )
5963 {
60 return( libcerror_error_sprint(
61 (libcerror_error_t *) error,
62 string,
63 size ) );
64 int print_count = 0;
65
66 print_count = libcerror_error_sprint(
67 (libcerror_error_t *) error,
68 string,
69 size );
70
71 return( print_count );
6472 }
6573
6674 /* Prints a backtrace of the error to the stream
7078 libesedb_error_t *error,
7179 FILE *stream )
7280 {
73 return( libcerror_error_backtrace_fprint(
74 (libcerror_error_t *) error,
75 stream ) );
81 int print_count = 0;
82
83 print_count = libcerror_error_backtrace_fprint(
84 (libcerror_error_t *) error,
85 stream );
86
87 return( print_count );
7688 }
7789
7890 /* Prints a backtrace of the error to the string
8496 char *string,
8597 size_t size )
8698 {
87 return( libcerror_error_backtrace_sprint(
88 (libcerror_error_t *) error,
89 string,
90 size ) );
99 int print_count = 0;
100
101 print_count = libcerror_error_backtrace_sprint(
102 (libcerror_error_t *) error,
103 string,
104 size );
105
106 return( print_count );
91107 }
92108
93109 #endif /* !defined( HAVE_LOCAL_LIBESEDB ) */
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal extern definition
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2323
2424 #include <common.h>
2525
26 /* Define HAVE_LOCAL_LIBESEDB for local use of libesedb
27 */
28 #if !defined( HAVE_LOCAL_LIBESEDB )
29
2630 /* If libtool DLL support is enabled set LIBESEDB_DLL_EXPORT
2731 * before including libesedb/extern.h
2832 */
3236
3337 #include <libesedb/extern.h>
3438
35 #endif
39 #else
40 #define LIBESEDB_EXTERN /* extern */
3641
42 #endif /* !defined( HAVE_LOCAL_LIBESEDB ) */
43
44 #endif /* !defined( _LIBESEDB_INTERNAL_EXTERN_H ) */
45
00 /*
11 * File functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2020
2121 #include <common.h>
2222 #include <memory.h>
23 #include <narrow_string.h>
2324 #include <types.h>
25 #include <wide_string.h>
2426
2527 #include "libesedb_catalog.h"
2628 #include "libesedb_database.h"
3234 #include "libesedb_libbfio.h"
3335 #include "libesedb_libcerror.h"
3436 #include "libesedb_libcnotify.h"
35 #include "libesedb_libcstring.h"
3637 #include "libesedb_libfcache.h"
3738 #include "libesedb_libfdata.h"
3839 #include "libesedb_page.h"
231232
232233 return( -1 );
233234 }
235 internal_file = (libesedb_internal_file_t *) file;
236
234237 if( internal_file->io_handle == NULL )
235238 {
236239 libcerror_error_set(
259262 libbfio_handle_t *file_io_handle = NULL;
260263 libesedb_internal_file_t *internal_file = NULL;
261264 static char *function = "libesedb_file_open";
265 size_t filename_length = 0;
262266
263267 if( file == NULL )
264268 {
336340 goto on_error;
337341 }
338342 #endif
343 filename_length = narrow_string_length(
344 filename );
345
339346 if( libbfio_file_set_name(
340347 file_io_handle,
341348 filename,
342 libcstring_narrow_string_length(
343 filename ) + 1,
349 filename_length + 1,
344350 error ) != 1 )
345351 {
346352 libcerror_error_set(
396402 libbfio_handle_t *file_io_handle = NULL;
397403 libesedb_internal_file_t *internal_file = NULL;
398404 static char *function = "libesedb_file_open_wide";
405 size_t filename_length = 0;
399406
400407 if( file == NULL )
401408 {
473480 goto on_error;
474481 }
475482 #endif
483 filename_length = wide_string_length(
484 filename );
485
476486 if( libbfio_file_set_name_wide(
477487 file_io_handle,
478488 filename,
479 libcstring_wide_string_length(
480 filename ) + 1,
489 filename_length + 1,
481490 error ) != 1 )
482491 {
483492 libcerror_error_set(
647656
648657 internal_file->file_io_handle_opened_in_library = 0;
649658 }
650 internal_file->file_io_handle = NULL;
651
652659 return( -1 );
653660 }
654661
00 /*
11 * File functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
187187 }
188188 #endif
189189
190 #endif
190 #endif /* !defined( _LIBESEDB_INTERNAL_FILE_H ) */
191191
00 /*
11 * Internationalization (i18n) functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Internationalization (i18n) functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
5050 }
5151 #endif
5252
53 #endif
53 #endif /* !defined( _LIBESEDB_I18N_H ) */
5454
00 /*
11 * Index functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Index functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
174174 }
175175 #endif
176176
177 #endif
177 #endif /* !defined( _LIBESEDB_INDEX_H ) */
178178
00 /*
11 * Input/Output (IO) handle functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Input/Output (IO) handle functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
124124 }
125125 #endif
126126
127 #endif
127 #endif /* !defined( _LIBESEDB_IO_HANDLE_H ) */
128128
00 /*
11 * Key functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Key functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
7676 }
7777 #endif
7878
79 #endif
79 #endif /* !defined( _LIBESEDB_KEY_H ) */
8080
00 /*
11 * LCID functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * LCID functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
5959 }
6060 #endif
6161
62 #endif
62 #endif /* !defined( _LIBESEDB_LCID_H ) */
6363
00 /*
11 * The libbfio header wrapper
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal libcdata header
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal libcerror header
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal libclocale header
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal libcnotify header
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
+0
-51
libesedb/libesedb_libcstring.h less more
0 /*
1 * The internal libcstring header
2 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBESEDB_LIBCSTRING_H )
22 #define _LIBESEDB_LIBCSTRING_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring
27 */
28 #if defined( HAVE_LOCAL_LIBCSTRING )
29
30 #include <libcstring_definitions.h>
31 #include <libcstring_narrow_string.h>
32 #include <libcstring_system_string.h>
33 #include <libcstring_types.h>
34 #include <libcstring_wide_string.h>
35
36 #else
37
38 /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT
39 * before including libcstring.h
40 */
41 #if defined( _WIN32 ) && defined( DLL_IMPORT )
42 #define LIBCSTRING_DLL_IMPORT
43 #endif
44
45 #include <libcstring.h>
46
47 #endif /* defined( HAVE_LOCAL_LIBCSTRING ) */
48
49 #endif /* !defined( _LIBESEDB_LIBCSTRING_H ) */
50
00 /*
11 * The internal libfcache header
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The libfdata header wrapper
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The libfvalue header wrapper
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The libuna header wrapper
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * This software is free software: you can redistribute it and/or modify
66 * it under the terms of the GNU Lesser General Public License as published by
00 /*
11 * Long value functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Long value functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
173173 }
174174 #endif
175175
176 #endif
176 #endif /* !defined( _LIBESEDB_INTERNAL_LONG_VALUE_H ) */
177177
00 /*
11 * Multi value functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Multi value functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
208208 }
209209 #endif
210210
211 #endif
212
211 #endif /* !defined( _LIBESEDB_INTERNAL_MULTI_VALUE_H ) */
212
00 /*
11 * Notification functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
1 * Notification function
1 * Notification functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Page functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3131 #include "libesedb_libcerror.h"
3232 #include "libesedb_libcnotify.h"
3333 #include "libesedb_page.h"
34 #include "libesedb_page_value.h"
3435
3536 #include "esedb_page.h"
36
37 /* Creates a page value
38 * Make sure the value page_value is referencing, is set to NULL
39 * Returns 1 if successful or -1 on error
40 */
41 int libesedb_page_value_initialize(
42 libesedb_page_value_t **page_value,
43 libcerror_error_t **error )
44 {
45 static char *function = "libesedb_page_value_initialize";
46
47 if( page_value == NULL )
48 {
49 libcerror_error_set(
50 error,
51 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
52 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
53 "%s: invalid page value.",
54 function );
55
56 return( -1 );
57 }
58 if( *page_value != NULL )
59 {
60 libcerror_error_set(
61 error,
62 LIBCERROR_ERROR_DOMAIN_RUNTIME,
63 LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,
64 "%s: invalid page value value already set.",
65 function );
66
67 return( -1 );
68 }
69 *page_value = memory_allocate_structure(
70 libesedb_page_value_t );
71
72 if( *page_value == NULL )
73 {
74 libcerror_error_set(
75 error,
76 LIBCERROR_ERROR_DOMAIN_MEMORY,
77 LIBCERROR_MEMORY_ERROR_INSUFFICIENT,
78 "%s: unable to create page value.",
79 function );
80
81 goto on_error;
82 }
83 if( memory_set(
84 *page_value,
85 0,
86 sizeof( libesedb_page_value_t ) ) == NULL )
87 {
88 libcerror_error_set(
89 error,
90 LIBCERROR_ERROR_DOMAIN_MEMORY,
91 LIBCERROR_MEMORY_ERROR_SET_FAILED,
92 "%s: unable to clear page value.",
93 function );
94
95 goto on_error;
96 }
97 return( 1 );
98
99 on_error:
100 if( *page_value != NULL )
101 {
102 memory_free(
103 *page_value );
104
105 *page_value = NULL;
106 }
107 return( -1 );
108 }
109
110 /* Frees a page value
111 * Returns 1 if successful or -1 on error
112 */
113 int libesedb_page_value_free(
114 libesedb_page_value_t **page_value,
115 libcerror_error_t **error )
116 {
117 static char *function = "libesedb_page_value_free";
118
119 if( page_value == NULL )
120 {
121 libcerror_error_set(
122 error,
123 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
124 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
125 "%s: invalid page value.",
126 function );
127
128 return( -1 );
129 }
130 if( *page_value != NULL )
131 {
132 /* The data is referenced and freed elsewhere
133 */
134 memory_free(
135 *page_value );
136
137 *page_value = NULL;
138 }
139 return( 1 );
140 }
14137
14238 /* Creates a page tags value
14339 * Make sure the value page_tags_value is referencing, is set to NULL
00 /*
11 * Page functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2828 #include "libesedb_libbfio.h"
2929 #include "libesedb_libcdata.h"
3030 #include "libesedb_libcerror.h"
31 #include "libesedb_page_value.h"
3132
3233 #if defined( __cplusplus )
3334 extern "C" {
4445 /* The size of the value
4546 */
4647 uint16_t size;
47
48 /* The flags of the value
49 */
50 uint8_t flags;
51 };
52
53 typedef struct libesedb_page_value libesedb_page_value_t;
54
55 struct libesedb_page_value
56 {
57 /* The reference to the page value data
58 */
59 uint8_t *data;
60
61 /* The page value size
62 */
63 uint16_t size;
64
65 /* The offset of the page value
66 */
67 uint16_t offset;
6848
6949 /* The flags of the value
7050 */
11191 */
11292 libcdata_array_t *values_array;
11393 };
114
115 int libesedb_page_value_initialize(
116 libesedb_page_value_t **page_value,
117 libcerror_error_t **error );
118
119 int libesedb_page_value_free(
120 libesedb_page_value_t **page_value,
121 libcerror_error_t **error );
12294
12395 int libesedb_page_tags_value_initialize(
12496 libesedb_page_tags_value_t **page_tags_value,
175147 }
176148 #endif
177149
178 #endif
150 #endif /* !defined( _LIBESEDB_PAGE_H ) */
179151
00 /*
11 * Page tree functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Page tree functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
129129 }
130130 #endif
131131
132 #endif
132 #endif /* !defined( _LIBESEDB_PAGE_TREE_H ) */
133133
0 /*
1 * Page value functions
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <memory.h>
23 #include <types.h>
24
25 #include "libesedb_libcerror.h"
26 #include "libesedb_page_value.h"
27
28 /* Creates a page value
29 * Make sure the value page_value is referencing, is set to NULL
30 * Returns 1 if successful or -1 on error
31 */
32 int libesedb_page_value_initialize(
33 libesedb_page_value_t **page_value,
34 libcerror_error_t **error )
35 {
36 static char *function = "libesedb_page_value_initialize";
37
38 if( page_value == NULL )
39 {
40 libcerror_error_set(
41 error,
42 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
43 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
44 "%s: invalid page value.",
45 function );
46
47 return( -1 );
48 }
49 if( *page_value != NULL )
50 {
51 libcerror_error_set(
52 error,
53 LIBCERROR_ERROR_DOMAIN_RUNTIME,
54 LIBCERROR_RUNTIME_ERROR_VALUE_ALREADY_SET,
55 "%s: invalid page value value already set.",
56 function );
57
58 return( -1 );
59 }
60 *page_value = memory_allocate_structure(
61 libesedb_page_value_t );
62
63 if( *page_value == NULL )
64 {
65 libcerror_error_set(
66 error,
67 LIBCERROR_ERROR_DOMAIN_MEMORY,
68 LIBCERROR_MEMORY_ERROR_INSUFFICIENT,
69 "%s: unable to create page value.",
70 function );
71
72 goto on_error;
73 }
74 if( memory_set(
75 *page_value,
76 0,
77 sizeof( libesedb_page_value_t ) ) == NULL )
78 {
79 libcerror_error_set(
80 error,
81 LIBCERROR_ERROR_DOMAIN_MEMORY,
82 LIBCERROR_MEMORY_ERROR_SET_FAILED,
83 "%s: unable to clear page value.",
84 function );
85
86 goto on_error;
87 }
88 return( 1 );
89
90 on_error:
91 if( *page_value != NULL )
92 {
93 memory_free(
94 *page_value );
95
96 *page_value = NULL;
97 }
98 return( -1 );
99 }
100
101 /* Frees a page value
102 * Returns 1 if successful or -1 on error
103 */
104 int libesedb_page_value_free(
105 libesedb_page_value_t **page_value,
106 libcerror_error_t **error )
107 {
108 static char *function = "libesedb_page_value_free";
109
110 if( page_value == NULL )
111 {
112 libcerror_error_set(
113 error,
114 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
115 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
116 "%s: invalid page value.",
117 function );
118
119 return( -1 );
120 }
121 if( *page_value != NULL )
122 {
123 /* The data is referenced and freed elsewhere
124 */
125 memory_free(
126 *page_value );
127
128 *page_value = NULL;
129 }
130 return( 1 );
131 }
132
0 /*
1 * Page value functions
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBESEDB_PAGE_VALUE_H )
22 #define _LIBESEDB_PAGE_VALUE_H
23
24 #include <common.h>
25 #include <types.h>
26
27 #include "libesedb_libcerror.h"
28
29 #if defined( __cplusplus )
30 extern "C" {
31 #endif
32
33 typedef struct libesedb_page_value libesedb_page_value_t;
34
35 struct libesedb_page_value
36 {
37 /* The reference to the page value data
38 */
39 uint8_t *data;
40
41 /* The page value size
42 */
43 uint16_t size;
44
45 /* The offset of the page value
46 */
47 uint16_t offset;
48
49 /* The flags of the value
50 */
51 uint8_t flags;
52 };
53
54 int libesedb_page_value_initialize(
55 libesedb_page_value_t **page_value,
56 libcerror_error_t **error );
57
58 int libesedb_page_value_free(
59 libesedb_page_value_t **page_value,
60 libcerror_error_t **error );
61
62 #if defined( __cplusplus )
63 }
64 #endif
65
66 #endif /* !defined( _LIBESEDB_PAGE_VALUE_H ) */
67
00 /*
11 * Record (row) functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Record (row) functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
338338 }
339339 #endif
340340
341 #endif
342
341 #endif /* !defined( _LIBESEDB_INTERNAL_RECORD_H ) */
342
00 /*
11 * Record value functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Record value functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
5656 }
5757 #endif
5858
59 #endif
59 #endif /* !defined( _LIBESEDB_RECORD_VALUE_H ) */
6060
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2020
2121 #include <common.h>
2222 #include <memory.h>
23 #include <narrow_string.h>
2324 #include <types.h>
25 #include <wide_string.h>
2426
2527 #include "libesedb_codepage.h"
2628 #include "libesedb_definitions.h"
2830 #include "libesedb_libbfio.h"
2931 #include "libesedb_libcerror.h"
3032 #include "libesedb_libclocale.h"
31 #include "libesedb_libcstring.h"
3233 #include "libesedb_support.h"
3334
3435 #if !defined( HAVE_LOCAL_LIBESEDB )
126127
127128 return( -1 );
128129 }
129 filename_length = libcstring_narrow_string_length(
130 filename_length = narrow_string_length(
130131 filename );
131132
132133 if( filename_length == 0 )
233234
234235 return( -1 );
235236 }
236 filename_length = libcstring_wide_string_length(
237 filename_length = wide_string_length(
237238 filename );
238239
239240 if( filename_length == 0 )
422423 }
423424 }
424425 if( memory_compare(
425 &( esedb_file_signature[ 4 ] ),
426 signature,
426 esedb_file_signature,
427 &( signature[ 4 ] ),
427428 4 ) == 0 )
428429 {
429430 return( 1 );
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
7777 }
7878 #endif
7979
80 #endif
80 #endif /* !defined( _LIBESEDB_SUPPORT_H ) */
8181
00 /*
11 * Table functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Table functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
206206 }
207207 #endif
208208
209 #endif
210
209 #endif /* !defined( _LIBESEDB_TABLE_H ) */
210
00 /*
11 * Table definition functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Table definition functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
9090 }
9191 #endif
9292
93 #endif
93 #endif /* !defined( _LIBESEDB_TABLE_DEFINITION_H ) */
9494
00 /*
11 * The internal type definitions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3333 /* The following type definitions hide internal data structures
3434 */
3535 #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI )
36 typedef struct libesedb_file {} libesedb_file_t;
37 typedef struct libesedb_table {} libesedb_table_t;
3836 typedef struct libesedb_column {} libesedb_column_t;
37 typedef struct libesedb_file {} libesedb_file_t;
3938 typedef struct libesedb_index {} libesedb_index_t;
40 typedef struct libesedb_record {} libesedb_record_t;
4139 typedef struct libesedb_long_value {} libesedb_long_value_t;
4240 typedef struct libesedb_multi_value {} libesedb_multi_value_t;
41 typedef struct libesedb_record {} libesedb_record_t;
42 typedef struct libesedb_table {} libesedb_table_t;
4343
4444 #else
45 typedef intptr_t libesedb_column_t;
4546 typedef intptr_t libesedb_file_t;
46 typedef intptr_t libesedb_table_t;
47 typedef intptr_t libesedb_column_t;
4847 typedef intptr_t libesedb_index_t;
49 typedef intptr_t libesedb_record_t;
5048 typedef intptr_t libesedb_long_value_t;
5149 typedef intptr_t libesedb_multi_value_t;
50 typedef intptr_t libesedb_record_t;
51 typedef intptr_t libesedb_table_t;
5252
5353 #endif /* defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI ) */
5454
00 /*
11 * The internal unused definition
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Value data handle functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Value data handle functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4444 }
4545 #endif
4646
47 #endif
47 #endif /* !defined( _LIBESEDB_VALUE_DATA_HANDLE_H ) */
4848
66 Description: Library to access the Extensible Storage Engine (ESE) Database File (EDB) format
77 Version: @VERSION@
88 Libs: -L${libdir} -lesedb
9 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_libcstring_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_libfvalue_pc_libs_private@ @ax_libfwnt_pc_libs_private@ @ax_libuna_pc_libs_private@ @ax_pthread_pc_libs_private@
9 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_libfcache_pc_libs_private@ @ax_libfdata_pc_libs_private@ @ax_libfdatetime_pc_libs_private@ @ax_libfguid_pc_libs_private@ @ax_libfvalue_pc_libs_private@ @ax_libfwnt_pc_libs_private@ @ax_libuna_pc_libs_private@ @ax_pthread_pc_libs_private@
1010 Cflags: -I${includedir}
1111
00 Name: libesedb
1 Version: 20160622
1 Version: 20170121
22 Release: 1
33 Summary: Library to access the Extensible Storage Engine (ESE) Database File (EDB) format
44 Group: System Environment/Libraries
66 Source: %{name}-%{version}.tar.gz
77 URL: https://github.com/libyal/libesedb/
88 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
9
10
9
10
1111
1212 %description
1313 libesedb is a library to access the Extensible Storage Engine (ESE) Database File (EDB) format
2323 %package tools
2424 Summary: Several tools for reading Extensible Storage Engine (ESE) Database Files (EDB)
2525 Group: Applications/System
26 Requires: libesedb = %{version}-%{release}
27
26 Requires: libesedb = %{version}-%{release}
27
2828
2929 %description tools
3030 Several tools for reading Extensible Storage Engine (ESE) Database Files (EDB)
100100 %{_libdir}/python3*/site-packages/*.so
101101
102102 %changelog
103 * Mon Aug 1 2016 Joachim Metz <joachim.metz@gmail.com> 20160622-1
103 * Sat Jan 21 2017 Joachim Metz <joachim.metz@gmail.com> 20170121-1
104104 - Auto-generated
105105
66 Source: %{name}-%{version}.tar.gz
77 URL: https://github.com/libyal/libesedb/
88 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
9 @libesedb_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_libcstring_spec_requires@ @ax_libcthreads_spec_requires@ @ax_libfcache_spec_requires@ @ax_libfdata_spec_requires@ @ax_libfdatetime_spec_requires@ @ax_libfguid_spec_requires@ @ax_libfvalue_spec_requires@ @ax_libfwnt_spec_requires@ @ax_libuna_spec_requires@
10 @libesedb_spec_build_requires@ @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_libcstring_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_libfvalue_spec_build_requires@ @ax_libfwnt_spec_build_requires@ @ax_libuna_spec_build_requires@
9 @libesedb_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_libfvalue_spec_requires@ @ax_libfwnt_spec_requires@ @ax_libuna_spec_requires@
10 @libesedb_spec_build_requires@ @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_libfvalue_spec_build_requires@ @ax_libfwnt_spec_build_requires@ @ax_libuna_spec_build_requires@
1111
1212 %description
1313 libesedb is a library to access the Extensible Storage Engine (ESE) Database File (EDB) format
2323 %package tools
2424 Summary: Several tools for reading Extensible Storage Engine (ESE) Database Files (EDB)
2525 Group: Applications/System
26 Requires: libesedb = %{version}-%{release} @ax_libcsystem_spec_requires@ @ax_libfmapi_spec_requires@ @ax_libfwnt_spec_requires@ @ax_libmapidb_spec_requires@
27 @libesedb_spec_tools_build_requires@ @ax_libcsystem_spec_build_requires@ @ax_libfmapi_spec_build_requires@ @ax_libfwnt_spec_build_requires@ @ax_libmapidb_spec_build_requires@
26 Requires: libesedb = %{version}-%{release} @ax_libfmapi_spec_requires@ @ax_libfwnt_spec_requires@ @ax_libmapidb_spec_requires@
27 @libesedb_spec_tools_build_requires@ @ax_libfmapi_spec_build_requires@ @ax_libfwnt_spec_build_requires@ @ax_libmapidb_spec_build_requires@
2828
2929 %description tools
3030 Several tools for reading Extensible Storage Engine (ESE) Database Files (EDB)
11 AM_CPPFLAGS = \
22 -I$(top_srcdir)/include \
33 -I$(top_srcdir)/common \
4 @LIBCSTRING_CPPFLAGS@ \
54 @LIBCERROR_CPPFLAGS@ \
65 @LIBCTHREADS_CPPFLAGS@ \
76 @LIBCDATA_CPPFLAGS@ \
2322 libfcache_unused.h
2423 endif
2524
26
2725 MAINTAINERCLEANFILES = \
2826 Makefile.in
2927
9797 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9898 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9999 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101100 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102101 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103102 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
108107 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109108 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110109 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
110 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
111 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
113112 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114113 $(ACLOCAL_M4)
115114 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
241240 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
242241 HAVE_LIBCPATH = @HAVE_LIBCPATH@
243242 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
244 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
245 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
246243 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
247244 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
248245 HAVE_LIBFDATA = @HAVE_LIBFDATA@
261258 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
262259 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
263260 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
264 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
265 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
266261 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
267262 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
268263 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
309304 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
310305 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
311306 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
312 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
313 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
314 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
315 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
316307 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
317308 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
318309 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
345336 LTLIBICONV = @LTLIBICONV@
346337 LTLIBINTL = @LTLIBINTL@
347338 LTLIBOBJS = @LTLIBOBJS@
339 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
348340 MAKEINFO = @MAKEINFO@
349341 MANIFEST_TOOL = @MANIFEST_TOOL@
350342 MKDIR_P = @MKDIR_P@
451443 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
452444 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
453445 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
454 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
455 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
456 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
457 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
458 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
459 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
460446 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
461447 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
462448 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
525511 libcpath_LIBS = @libcpath_LIBS@
526512 libcsplit_CFLAGS = @libcsplit_CFLAGS@
527513 libcsplit_LIBS = @libcsplit_LIBS@
528 libcstring_CFLAGS = @libcstring_CFLAGS@
529 libcstring_LIBS = @libcstring_LIBS@
530 libcsystem_CFLAGS = @libcsystem_CFLAGS@
531 libcsystem_LIBS = @libcsystem_LIBS@
532514 libcthreads_CFLAGS = @libcthreads_CFLAGS@
533515 libcthreads_LIBS = @libcthreads_LIBS@
534516 libdir = @libdir@
580562 @HAVE_LOCAL_LIBFCACHE_TRUE@AM_CPPFLAGS = \
581563 @HAVE_LOCAL_LIBFCACHE_TRUE@ -I$(top_srcdir)/include \
582564 @HAVE_LOCAL_LIBFCACHE_TRUE@ -I$(top_srcdir)/common \
583 @HAVE_LOCAL_LIBFCACHE_TRUE@ @LIBCSTRING_CPPFLAGS@ \
584565 @HAVE_LOCAL_LIBFCACHE_TRUE@ @LIBCERROR_CPPFLAGS@ \
585566 @HAVE_LOCAL_LIBFCACHE_TRUE@ @LIBCTHREADS_CPPFLAGS@ \
586567 @HAVE_LOCAL_LIBFCACHE_TRUE@ @LIBCDATA_CPPFLAGS@ \
00 /*
11 * The cache functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The cache functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
7070 libfcache_cache_t *source_cache,
7171 libcerror_error_t **error );
7272
73 LIBCDATA_EXTERN \
73 LIBFCACHE_EXTERN \
7474 int libfcache_cache_resize(
7575 libfcache_cache_t *cache,
7676 int maximum_cache_entries,
115115 }
116116 #endif
117117
118 #endif
118 #endif /* !defined( _LIBFCACHE_INTERNAL_CACHE_H ) */
119119
00 /*
11 * Cache value functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Cache value functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
6868 libfcache_cache_value_t **cache_value,
6969 libcerror_error_t **error );
7070
71 LIBFCACHE_EXTERN \
7172 int libfcache_cache_value_free(
7273 libfcache_cache_value_t **cache_value,
7374 libcerror_error_t **error );
113114 }
114115 #endif
115116
116 #endif
117 #endif /* !defined( _LIBFCACHE_INTERNAL_CACHE_VALUE_H ) */
117118
00 /*
11 * Date and time functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Date and time functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4949 }
5050 #endif
5151
52 #endif
52 #endif /* !defined( _LIBFCACHE_DATE_TIME_H ) */
5353
00 /*
11 * The internal definitions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3232 * for local use of libfcache
3333 */
3434 #else
35 #define LIBFCACHE_VERSION 20160426
35 #define LIBFCACHE_VERSION 20170111
3636
3737 /* The libfcache version string
3838 */
39 #define LIBFCACHE_VERSION_STRING "20160426"
39 #define LIBFCACHE_VERSION_STRING "20170111"
4040
4141 /* The cache value flags definitions
4242 */
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4343 libfcache_error_t *error,
4444 FILE *stream )
4545 {
46 return( libcerror_error_fprint(
47 (libcerror_error_t *) error,
48 stream ) );
46 int print_count = 0;
47
48 print_count = libcerror_error_fprint(
49 (libcerror_error_t *) error,
50 stream );
51
52 return( print_count );
4953 }
5054
5155 /* Prints a descriptive string of the error to the string
5761 char *string,
5862 size_t size )
5963 {
60 return( libcerror_error_sprint(
61 (libcerror_error_t *) error,
62 string,
63 size ) );
64 int print_count = 0;
65
66 print_count = libcerror_error_sprint(
67 (libcerror_error_t *) error,
68 string,
69 size );
70
71 return( print_count );
6472 }
6573
6674 /* Prints a backtrace of the error to the stream
7078 libfcache_error_t *error,
7179 FILE *stream )
7280 {
73 return( libcerror_error_backtrace_fprint(
74 (libcerror_error_t *) error,
75 stream ) );
81 int print_count = 0;
82
83 print_count = libcerror_error_backtrace_fprint(
84 (libcerror_error_t *) error,
85 stream );
86
87 return( print_count );
7688 }
7789
7890 /* Prints a backtrace of the error to the string
8496 char *string,
8597 size_t size )
8698 {
87 return( libcerror_error_backtrace_sprint(
88 (libcerror_error_t *) error,
89 string,
90 size ) );
99 int print_count = 0;
100
101 print_count = libcerror_error_backtrace_sprint(
102 (libcerror_error_t *) error,
103 string,
104 size );
105
106 return( print_count );
91107 }
92108
93109 #endif /* !defined( HAVE_LOCAL_LIBFCACHE ) */
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal extern definition
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 #include <libfcache/extern.h>
3838
3939 #else
40 #define LIBFCACHE_EXTERN /* extern */
4041
41 #define LIBFCACHE_EXTERN extern
42 #endif /* !defined( HAVE_LOCAL_LIBFCACHE ) */
4243
43 #endif
44 #endif /* !defined( _LIBFCACHE_INTERNAL_EXTERN_H ) */
4445
45 #endif
46
00 /*
11 * The internal libcdata header
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal libcerror header
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4242 }
4343 #endif
4444
45 #endif
45 #endif /* !defined( _LIBFCACHE_SUPPORT_H ) */
4646
00 /*
11 * The internal type definitions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal unused definition
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
11 AM_CPPFLAGS = \
22 -I$(top_srcdir)/include \
33 -I$(top_srcdir)/common \
4 @LIBCSTRING_CPPFLAGS@ \
54 @LIBCERROR_CPPFLAGS@ \
65 @LIBCTHREADS_CPPFLAGS@ \
76 @LIBCDATA_CPPFLAGS@ \
4140 libfdata_vector.c libfdata_vector.h
4241 endif
4342
44
4543 MAINTAINERCLEANFILES = \
4644 Makefile.in
4745
9797 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9898 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9999 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101100 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102101 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103102 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
108107 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109108 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110109 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
110 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
111 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
113112 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114113 $(ACLOCAL_M4)
115114 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
260259 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
261260 HAVE_LIBCPATH = @HAVE_LIBCPATH@
262261 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
263 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
264 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
265262 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
266263 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
267264 HAVE_LIBFDATA = @HAVE_LIBFDATA@
280277 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
281278 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
282279 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
283 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
284 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
285280 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
286281 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
287282 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
328323 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
329324 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
330325 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
331 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
332 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
333 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
334 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
335326 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
336327 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
337328 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
364355 LTLIBICONV = @LTLIBICONV@
365356 LTLIBINTL = @LTLIBINTL@
366357 LTLIBOBJS = @LTLIBOBJS@
358 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
367359 MAKEINFO = @MAKEINFO@
368360 MANIFEST_TOOL = @MANIFEST_TOOL@
369361 MKDIR_P = @MKDIR_P@
470462 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
471463 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
472464 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
473 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
474 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
475 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
476 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
477 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
478 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
479465 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
480466 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
481467 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
544530 libcpath_LIBS = @libcpath_LIBS@
545531 libcsplit_CFLAGS = @libcsplit_CFLAGS@
546532 libcsplit_LIBS = @libcsplit_LIBS@
547 libcstring_CFLAGS = @libcstring_CFLAGS@
548 libcstring_LIBS = @libcstring_LIBS@
549 libcsystem_CFLAGS = @libcsystem_CFLAGS@
550 libcsystem_LIBS = @libcsystem_LIBS@
551533 libcthreads_CFLAGS = @libcthreads_CFLAGS@
552534 libcthreads_LIBS = @libcthreads_LIBS@
553535 libdir = @libdir@
599581 @HAVE_LOCAL_LIBFDATA_TRUE@AM_CPPFLAGS = \
600582 @HAVE_LOCAL_LIBFDATA_TRUE@ -I$(top_srcdir)/include \
601583 @HAVE_LOCAL_LIBFDATA_TRUE@ -I$(top_srcdir)/common \
602 @HAVE_LOCAL_LIBFDATA_TRUE@ @LIBCSTRING_CPPFLAGS@ \
603584 @HAVE_LOCAL_LIBFDATA_TRUE@ @LIBCERROR_CPPFLAGS@ \
604585 @HAVE_LOCAL_LIBFDATA_TRUE@ @LIBCTHREADS_CPPFLAGS@ \
605586 @HAVE_LOCAL_LIBFDATA_TRUE@ @LIBCDATA_CPPFLAGS@ \
00 /*
11 * The area functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The area functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
273273 }
274274 #endif
275275
276 #endif
277
276 #endif /* !defined( _LIBFDATA_INTERNAL_AREA_H ) */
277
00 /*
11 * The balanced tree functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The balanced tree functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
363363 }
364364 #endif
365365
366 #endif
367
366 #endif /* !defined( _LIBFDATA_INTERNAL_BTREE_H ) */
367
00 /*
11 * The balanced tree node functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The balanced tree node functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
263263 }
264264 #endif
265265
266 #endif
267
266 #endif /* !defined( _LIBFDATA_INTERNAL_BTREE_NODE_H ) */
267
00 /*
11 * The balanced tree range functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The balanced tree range functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
118118 }
119119 #endif
120120
121 #endif
121 #endif /* !defined( _LIBFDATA_BTREE_RANGE_H ) */
122122
00 /*
11 * Cache functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Cache functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
5151 }
5252 #endif
5353
54 #endif
54 #endif /* !defined( _LIBFDATA_INTERNAL_CACHE_H ) */
5555
00 /*
11 * The internal definitions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3232 * for local use of libfdata
3333 */
3434 #else
35 #define LIBFDATA_VERSION 20160427
35 #define LIBFDATA_VERSION 20170112
3636
3737 /* The libfdata version string
3838 */
39 #define LIBFDATA_VERSION_STRING "20160427"
39 #define LIBFDATA_VERSION_STRING "20170112"
4040
4141 /* The library flag definitions
4242 */
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4343 libfdata_error_t *error,
4444 FILE *stream )
4545 {
46 return( libcerror_error_fprint(
47 (libcerror_error_t *) error,
48 stream ) );
46 int print_count = 0;
47
48 print_count = libcerror_error_fprint(
49 (libcerror_error_t *) error,
50 stream );
51
52 return( print_count );
4953 }
5054
5155 /* Prints a descriptive string of the error to the string
5761 char *string,
5862 size_t size )
5963 {
60 return( libcerror_error_sprint(
61 (libcerror_error_t *) error,
62 string,
63 size ) );
64 int print_count = 0;
65
66 print_count = libcerror_error_sprint(
67 (libcerror_error_t *) error,
68 string,
69 size );
70
71 return( print_count );
6472 }
6573
6674 /* Prints a backtrace of the error to the stream
7078 libfdata_error_t *error,
7179 FILE *stream )
7280 {
73 return( libcerror_error_backtrace_fprint(
74 (libcerror_error_t *) error,
75 stream ) );
81 int print_count = 0;
82
83 print_count = libcerror_error_backtrace_fprint(
84 (libcerror_error_t *) error,
85 stream );
86
87 return( print_count );
7688 }
7789
7890 /* Prints a backtrace of the error to the string
8496 char *string,
8597 size_t size )
8698 {
87 return( libcerror_error_backtrace_sprint(
88 (libcerror_error_t *) error,
89 string,
90 size ) );
99 int print_count = 0;
100
101 print_count = libcerror_error_backtrace_sprint(
102 (libcerror_error_t *) error,
103 string,
104 size );
105
106 return( print_count );
91107 }
92108
93109 #endif /* !defined( HAVE_LOCAL_LIBFDATA ) */
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal extern definition
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 #include <libfdata/extern.h>
3838
3939 #else
40 #define LIBFDATA_EXTERN /* extern */
4041
41 #define LIBFDATA_EXTERN extern
42 #endif /* !defined( HAVE_LOCAL_LIBFDATA ) */
4243
43 #endif
44 #endif /* !defined( _LIBFDATA_INTERNAL_EXTERN_H ) */
4445
45 #endif
46
00 /*
11 * The internal inline definition
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal libcdata header
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal libcerror header
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal libcnotify header
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal libfcache header
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The list functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The list functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
449449 }
450450 #endif
451451
452 #endif
453
452 #endif /* !defined( _LIBFDATA_INTERNAL_LIST_H ) */
453
00 /*
11 * The list element functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The list element functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
154154 }
155155 #endif
156156
157 #endif
157 #endif /* !defined( _LIBFDATA_INTERNAL_LIST_ELEMENT_H ) */
158158
00 /*
11 * The (data) mapped range functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The (data) mapped range functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
7272 }
7373 #endif
7474
75 #endif
75 #endif /* !defined( _LIBFDATA_MAPPED_RANGE_H ) */
7676
00 /*
11 * Notification functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
1 * Notification function
1 * Notification functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The range functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The range functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
8989 }
9090 #endif
9191
92 #endif
92 #endif /* !defined( _LIBFDATA_RANGE_H ) */
9393
00 /*
11 * The range list functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The range list functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
209209 }
210210 #endif
211211
212 #endif
213
212 #endif /* !defined( _LIBFDATA_INTERNAL_RANGE_LIST_H ) */
213
00 /*
11 * The segments array functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The segments array functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
8888 }
8989 #endif
9090
91 #endif
91 #endif /* !defined( _LIBFDATA_SEGMENTS_ARRAY_H ) */
9292
00 /*
11 * The stream functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The stream functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
350350 }
351351 #endif
352352
353 #endif
354
353 #endif /* !defined( _LIBFDATA_INTERNAL_STREAM_H ) */
354
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4242 }
4343 #endif
4444
45 #endif
45 #endif /* !defined( _LIBFDATA_SUPPORT_H ) */
4646
00 /*
11 * The tree functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The tree functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
241241 }
242242 #endif
243243
244 #endif
245
244 #endif /* !defined( _LIBFDATA_INTERNAL_TREE_H ) */
245
00 /*
11 * The tree node functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The tree node functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
354354 }
355355 #endif
356356
357 #endif
358
357 #endif /* !defined( _LIBFDATA_INTERNAL_TREE_NODE_H ) */
358
00 /*
11 * The internal type definitions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal unused definition
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The vector functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The vector functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
300300 }
301301 #endif
302302
303 #endif
304
303 #endif /* !defined( _LIBFDATA_INTERNAL_VECTOR_H ) */
304
11 AM_CPPFLAGS = \
22 -I$(top_srcdir)/include \
33 -I$(top_srcdir)/common \
4 @LIBCSTRING_CPPFLAGS@ \
54 @LIBCERROR_CPPFLAGS@
65
76 noinst_LTLIBRARIES = libfdatetime.la
1615 libfdatetime_floatingtime.c libfdatetime_floatingtime.h \
1716 libfdatetime_hfs_time.c libfdatetime_hfs_time.h \
1817 libfdatetime_libcerror.h \
19 libfdatetime_libcstring.h \
2018 libfdatetime_nsf_timedate.c libfdatetime_nsf_timedate.h \
2119 libfdatetime_posix_time.c libfdatetime_posix_time.h \
2220 libfdatetime_support.c libfdatetime_support.h \
2422 libfdatetime_types.h \
2523 libfdatetime_unused.h
2624 endif
27
2825
2926 MAINTAINERCLEANFILES = \
3027 Makefile.in
9797 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9898 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9999 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101100 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102101 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103102 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
108107 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109108 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110109 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
110 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
111 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
113112 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114113 $(ACLOCAL_M4)
115114 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
127126 libfdatetime_filetime.h libfdatetime_floatingtime.c \
128127 libfdatetime_floatingtime.h libfdatetime_hfs_time.c \
129128 libfdatetime_hfs_time.h libfdatetime_libcerror.h \
130 libfdatetime_libcstring.h libfdatetime_nsf_timedate.c \
131 libfdatetime_nsf_timedate.h libfdatetime_posix_time.c \
132 libfdatetime_posix_time.h libfdatetime_support.c \
133 libfdatetime_support.h libfdatetime_systemtime.c \
134 libfdatetime_systemtime.h libfdatetime_types.h \
135 libfdatetime_unused.h
129 libfdatetime_nsf_timedate.c libfdatetime_nsf_timedate.h \
130 libfdatetime_posix_time.c libfdatetime_posix_time.h \
131 libfdatetime_support.c libfdatetime_support.h \
132 libfdatetime_systemtime.c libfdatetime_systemtime.h \
133 libfdatetime_types.h libfdatetime_unused.h
136134 @HAVE_LOCAL_LIBFDATETIME_TRUE@am_libfdatetime_la_OBJECTS = libfdatetime_date_time_values.lo \
137135 @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_error.lo \
138136 @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_fat_date_time.lo \
252250 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
253251 HAVE_LIBCPATH = @HAVE_LIBCPATH@
254252 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
255 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
256 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
257253 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
258254 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
259255 HAVE_LIBFDATA = @HAVE_LIBFDATA@
272268 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
273269 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
274270 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
275 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
276 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
277271 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
278272 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
279273 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
320314 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
321315 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
322316 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
323 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
324 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
325 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
326 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
327317 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
328318 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
329319 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
356346 LTLIBICONV = @LTLIBICONV@
357347 LTLIBINTL = @LTLIBINTL@
358348 LTLIBOBJS = @LTLIBOBJS@
349 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
359350 MAKEINFO = @MAKEINFO@
360351 MANIFEST_TOOL = @MANIFEST_TOOL@
361352 MKDIR_P = @MKDIR_P@
462453 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
463454 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
464455 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
465 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
466 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
467 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
468 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
469 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
470 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
471456 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
472457 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
473458 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
536521 libcpath_LIBS = @libcpath_LIBS@
537522 libcsplit_CFLAGS = @libcsplit_CFLAGS@
538523 libcsplit_LIBS = @libcsplit_LIBS@
539 libcstring_CFLAGS = @libcstring_CFLAGS@
540 libcstring_LIBS = @libcstring_LIBS@
541 libcsystem_CFLAGS = @libcsystem_CFLAGS@
542 libcsystem_LIBS = @libcsystem_LIBS@
543524 libcthreads_CFLAGS = @libcthreads_CFLAGS@
544525 libcthreads_LIBS = @libcthreads_LIBS@
545526 libdir = @libdir@
591572 @HAVE_LOCAL_LIBFDATETIME_TRUE@AM_CPPFLAGS = \
592573 @HAVE_LOCAL_LIBFDATETIME_TRUE@ -I$(top_srcdir)/include \
593574 @HAVE_LOCAL_LIBFDATETIME_TRUE@ -I$(top_srcdir)/common \
594 @HAVE_LOCAL_LIBFDATETIME_TRUE@ @LIBCSTRING_CPPFLAGS@ \
595575 @HAVE_LOCAL_LIBFDATETIME_TRUE@ @LIBCERROR_CPPFLAGS@
596576
597577 @HAVE_LOCAL_LIBFDATETIME_TRUE@noinst_LTLIBRARIES = libfdatetime.la
605585 @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_floatingtime.c libfdatetime_floatingtime.h \
606586 @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_hfs_time.c libfdatetime_hfs_time.h \
607587 @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_libcerror.h \
608 @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_libcstring.h \
609588 @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_nsf_timedate.c libfdatetime_nsf_timedate.h \
610589 @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_posix_time.c libfdatetime_posix_time.h \
611590 @HAVE_LOCAL_LIBFDATETIME_TRUE@ libfdatetime_support.c libfdatetime_support.h \
00 /*
11 * Date and time values functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
15431543 {
15441544 return( 0 );
15451545 }
1546 {
1547 return( 0 );
1548 }
15491546 }
15501547 if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME ) != 0 )
15511548 {
16671664 utf32_string[ string_index++ ] = (uint32_t) ' ';
16681665
16691666 year_value = date_time_values->year;
1670 utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( year_value / 1000 );
1667 utf32_string[ string_index++ ] = (uint32_t) '0' + ( year_value / 1000 );
16711668 year_value %= 1000;
1672 utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( year_value / 100 );
1669 utf32_string[ string_index++ ] = (uint32_t) '0' + ( year_value / 100 );
16731670 year_value %= 100;
1674 utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( year_value / 10 );
1671 utf32_string[ string_index++ ] = (uint32_t) '0' + ( year_value / 10 );
16751672 year_value %= 10;
1676 utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) year_value;
1673 utf32_string[ string_index++ ] = (uint32_t) '0' + year_value;
16771674
16781675 if( ( string_format_flags & LIBFDATETIME_STRING_FORMAT_FLAG_TIME ) != 0 )
16791676 {
17061703 }
17071704 /* Format: yyyy-mm-dd */
17081705 year_value = date_time_values->year;
1709 utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( year_value / 1000 );
1706 utf32_string[ string_index++ ] = (uint32_t) '0' + ( year_value / 1000 );
17101707 year_value %= 1000;
1711 utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( year_value / 100 );
1708 utf32_string[ string_index++ ] = (uint32_t) '0' + ( year_value / 100 );
17121709 year_value %= 100;
1713 utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) ( year_value / 10 );
1710 utf32_string[ string_index++ ] = (uint32_t) '0' + ( year_value / 10 );
17141711 year_value %= 10;
1715 utf32_string[ string_index++ ] = (uint32_t) '0' + (uint32_t) year_value;
1712 utf32_string[ string_index++ ] = (uint32_t) '0' + year_value;
17161713
17171714 utf32_string[ string_index++ ] = (uint32_t) '-';
17181715
00 /*
11 * Date and time values functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
116116 }
117117 #endif
118118
119 #endif
119 #endif /* !defined( _LIBFDATETIME_DATE_TIME_VALUES_H ) */
120120
00 /*
11 * The internal definitions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3535 #else
3636 #include <byte_stream.h>
3737
38 #define LIBFDATETIME_VERSION 20160426
38 #define LIBFDATETIME_VERSION 20170112
3939
4040 /* The version string
4141 */
42 #define LIBFDATETIME_VERSION_STRING "20160426"
42 #define LIBFDATETIME_VERSION_STRING "20170112"
4343
4444 /* The byte order definitions
4545 */
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4343 libfdatetime_error_t *error,
4444 FILE *stream )
4545 {
46 return( libcerror_error_fprint(
47 (libcerror_error_t *) error,
48 stream ) );
46 int print_count = 0;
47
48 print_count = libcerror_error_fprint(
49 (libcerror_error_t *) error,
50 stream );
51
52 return( print_count );
4953 }
5054
5155 /* Prints a descriptive string of the error to the string
5761 char *string,
5862 size_t size )
5963 {
60 return( libcerror_error_sprint(
61 (libcerror_error_t *) error,
62 string,
63 size ) );
64 int print_count = 0;
65
66 print_count = libcerror_error_sprint(
67 (libcerror_error_t *) error,
68 string,
69 size );
70
71 return( print_count );
6472 }
6573
6674 /* Prints a backtrace of the error to the stream
7078 libfdatetime_error_t *error,
7179 FILE *stream )
7280 {
73 return( libcerror_error_backtrace_fprint(
74 (libcerror_error_t *) error,
75 stream ) );
81 int print_count = 0;
82
83 print_count = libcerror_error_backtrace_fprint(
84 (libcerror_error_t *) error,
85 stream );
86
87 return( print_count );
7688 }
7789
7890 /* Prints a backtrace of the error to the string
8496 char *string,
8597 size_t size )
8698 {
87 return( libcerror_error_backtrace_sprint(
88 (libcerror_error_t *) error,
89 string,
90 size ) );
99 int print_count = 0;
100
101 print_count = libcerror_error_backtrace_sprint(
102 (libcerror_error_t *) error,
103 string,
104 size );
105
106 return( print_count );
91107 }
92108
93109 #endif /* !defined( HAVE_LOCAL_LIBFDATETIME ) */
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal extern definition
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 #include <libfdatetime/extern.h>
3838
3939 #else
40 #define LIBFDATETIME_EXTERN /* extern */
4041
41 #define LIBFDATETIME_EXTERN extern
42 #endif /* !defined( HAVE_LOCAL_LIBFDATETIME ) */
4243
43 #endif
44 #endif /* !defined( _LIBFDATETIME_INTERNAL_EXTERN_H ) */
4445
45 #endif
46
00 /*
11 * FAT date and time functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
443443 {
444444 /* Make sure the string can hold the hexadecimal representation of the FAT date time
445445 */
446 *string_size = 18;
446 *string_size = 16;
447447 }
448448 return( 1 );
449449 }
994994
995995 return( -1 );
996996 }
997 if( ( *utf32_string_index + 32 ) > utf32_string_size )
997 if( ( *utf32_string_index + 16 ) > utf32_string_size )
998998 {
999999 libcerror_error_set(
10001000 error,
00 /*
11 * FAT date and time functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
146146 }
147147 #endif
148148
149 #endif
149 #endif /* !defined( _LIBFDATETIME_INTERNAL_FAT_DATE_TIME_H ) */
150150
00 /*
1 * Filetime functions
1 * FILETIME functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
1 * Filetime functions
1 * FILETIME functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
151151 }
152152 #endif
153153
154 #endif
154 #endif /* !defined( _LIBFDATETIME_INTERNAL_FILETIME_H ) */
155155
00 /*
11 * Floatingtime functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
453453 */
454454 floatingtimestamp *= 24;
455455 date_time_values->hours = (uint8_t) floatingtimestamp;
456 floatingtimestamp -= date_time_values->hours;
456 floatingtimestamp -= date_time_values->hours;
457457
458458 /* There are 60 minutes in an hour correct the value to minutes
459459 */
669669 }
670670 else if( result == 0 )
671671 {
672 if( utf8_string == NULL )
673 {
674 libcerror_error_set(
675 error,
676 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
677 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
678 "%s: invalid UTF-8 string.",
679 function );
680
681 return( -1 );
682 }
683 if( utf8_string_size > (size_t) SSIZE_MAX )
684 {
685 libcerror_error_set(
686 error,
687 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
688 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
689 "%s: invalid UTF-8 string size value exceeds maximum.",
690 function );
691
692 return( -1 );
693 }
694 if( utf8_string_index == NULL )
695 {
696 libcerror_error_set(
697 error,
698 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
699 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
700 "%s: invalid UTF-8 string index.",
701 function );
702
703 return( -1 );
704 }
705672 if( ( *utf8_string_index + 24 ) > utf8_string_size )
706673 {
707674 libcerror_error_set(
851818 }
852819 else if( result == 0 )
853820 {
854 if( utf16_string == NULL )
855 {
856 libcerror_error_set(
857 error,
858 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
859 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
860 "%s: invalid UTF-16 string.",
861 function );
862
863 return( -1 );
864 }
865 if( utf16_string_size > (size_t) SSIZE_MAX )
866 {
867 libcerror_error_set(
868 error,
869 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
870 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
871 "%s: invalid UTF-16 string size value exceeds maximum.",
872 function );
873
874 return( -1 );
875 }
876 if( utf16_string_index == NULL )
877 {
878 libcerror_error_set(
879 error,
880 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
881 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
882 "%s: invalid UTF-16 string index.",
883 function );
884
885 return( -1 );
886 }
887821 if( ( *utf16_string_index + 24 ) > utf16_string_size )
888822 {
889823 libcerror_error_set(
1033967 }
1034968 else if( result == 0 )
1035969 {
1036 if( utf32_string == NULL )
1037 {
1038 libcerror_error_set(
1039 error,
1040 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
1041 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
1042 "%s: invalid UTF-32 string.",
1043 function );
1044
1045 return( -1 );
1046 }
1047 if( utf32_string_size > (size_t) SSIZE_MAX )
1048 {
1049 libcerror_error_set(
1050 error,
1051 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
1052 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
1053 "%s: invalid UTF-32 string size value exceeds maximum.",
1054 function );
1055
1056 return( -1 );
1057 }
1058 if( utf32_string_index == NULL )
1059 {
1060 libcerror_error_set(
1061 error,
1062 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
1063 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
1064 "%s: invalid UTF-32 string index.",
1065 function );
1066
1067 return( -1 );
1068 }
1069970 if( ( *utf32_string_index + 24 ) > utf32_string_size )
1070971 {
1071972 libcerror_error_set(
00 /*
11 * Floatingtime functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
142142 }
143143 #endif
144144
145 #endif
145 #endif /* !defined( _LIBFDATETIME_INTERNAL_FLOATINGTIME_H ) */
146146
00 /*
11 * HFS time functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * HFS time functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
140140 }
141141 #endif
142142
143 #endif
143 #endif /* !defined( _LIBFDATETIME_INTERNAL_HFS_TIME_H ) */
144144
00 /*
11 * The internal libcerror header
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
+0
-51
libfdatetime/libfdatetime_libcstring.h less more
0 /*
1 * The internal libcstring header
2 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBFDATETIME_LIBCSTRING_H )
22 #define _LIBFDATETIME_LIBCSTRING_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring
27 */
28 #if defined( HAVE_LOCAL_LIBCSTRING )
29
30 #include <libcstring_definitions.h>
31 #include <libcstring_narrow_string.h>
32 #include <libcstring_system_string.h>
33 #include <libcstring_types.h>
34 #include <libcstring_wide_string.h>
35
36 #else
37
38 /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT
39 * before including libcstring.h
40 */
41 #if defined( _WIN32 ) && defined( DLL_IMPORT )
42 #define LIBCSTRING_DLL_IMPORT
43 #endif
44
45 #include <libcstring.h>
46
47 #endif /* defined( HAVE_LOCAL_LIBCSTRING ) */
48
49 #endif /* !defined( _LIBFDATETIME_LIBCSTRING_H ) */
50
00 /*
11 * Notes Storage Facility (NSF) timedate functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Notes Storage Facility (NSF) timedate functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
151151 }
152152 #endif
153153
154 #endif
154 #endif /* !defined( _LIBFDATETIME_INTERNAL_NSF_TIMEDATE_H ) */
155155
00 /*
11 * POSIX time functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
12931293 *utf16_string_index = string_index;
12941294 }
12951295 return( 1 );
1296 return( 1 );
12961297 }
12971298
12981299 /* Converts the POSIX time into an UTF-32 string
00 /*
11 * POSIX time functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
163163 }
164164 #endif
165165
166 #endif
166 #endif /* !defined( _LIBFDATETIME_INTERNAL_POSIX_TIME_H ) */
167167
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4242 }
4343 #endif
4444
45 #endif
45 #endif /* !defined( _LIBFDATETIME_SUPPORT_H ) */
4646
00 /*
1 * Systemtime functions
1 * SYSTEMTIME functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
1 * Systemtime functions
1 * SYSTEMTIME functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
154154 }
155155 #endif
156156
157 #endif
157 #endif /* !defined( _LIBFDATETIME_INTERNAL_SYSTEMTIME_H ) */
158158
00 /*
11 * The internal type definitions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3333 /* The following type definitions hide internal data structures
3434 */
3535 #if defined( HAVE_DEBUG_OUTPUT ) && !defined( WINAPI )
36 typedef struct libfdatetime_fat_date {} libfdatetime_fat_date_t;
3637 typedef struct libfdatetime_fat_date_time {} libfdatetime_fat_date_time_t;
37 typedef struct libfdatetime_fat_date {} libfdatetime_fat_date_t;
3838 typedef struct libfdatetime_fat_time {} libfdatetime_fat_time_t;
3939 typedef struct libfdatetime_filetime {} libfdatetime_filetime_t;
4040 typedef struct libfdatetime_floatingtime {} libfdatetime_floatingtime_t;
4444 typedef struct libfdatetime_systemtime {} libfdatetime_systemtime_t;
4545
4646 #else
47 typedef intptr_t libfdatetime_fat_date_t;
4748 typedef intptr_t libfdatetime_fat_date_time_t;
48 typedef intptr_t libfdatetime_fat_date_t;
4949 typedef intptr_t libfdatetime_fat_time_t;
5050 typedef intptr_t libfdatetime_filetime_t;
5151 typedef intptr_t libfdatetime_floatingtime_t;
00 /*
11 * The internal unused definition
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
11 AM_CPPFLAGS = \
22 -I$(top_srcdir)/include \
33 -I$(top_srcdir)/common \
4 @LIBCSTRING_CPPFLAGS@ \
54 @LIBCERROR_CPPFLAGS@
65
76 noinst_LTLIBRARIES = libfguid.la
1110 libfguid_extern.h \
1211 libfguid_error.c libfguid_error.h \
1312 libfguid_libcerror.h \
14 libfguid_libcstring.h \
1513 libfguid_identifier.c libfguid_identifier.h \
1614 libfguid_support.c libfguid_support.h \
1715 libfguid_types.h \
1816 libfguid_unused.h
1917 endif
20
2118
2219 MAINTAINERCLEANFILES = \
2320 Makefile.in
9797 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9898 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9999 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101100 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102101 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103102 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
108107 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109108 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110109 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
110 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
111 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
113112 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114113 $(ACLOCAL_M4)
115114 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
121120 libfguid_la_LIBADD =
122121 am__libfguid_la_SOURCES_DIST = libfguid_definitions.h \
123122 libfguid_extern.h libfguid_error.c libfguid_error.h \
124 libfguid_libcerror.h libfguid_libcstring.h \
125 libfguid_identifier.c libfguid_identifier.h libfguid_support.c \
126 libfguid_support.h libfguid_types.h libfguid_unused.h
123 libfguid_libcerror.h libfguid_identifier.c \
124 libfguid_identifier.h libfguid_support.c libfguid_support.h \
125 libfguid_types.h libfguid_unused.h
127126 @HAVE_LOCAL_LIBFGUID_TRUE@am_libfguid_la_OBJECTS = libfguid_error.lo \
128127 @HAVE_LOCAL_LIBFGUID_TRUE@ libfguid_identifier.lo \
129128 @HAVE_LOCAL_LIBFGUID_TRUE@ libfguid_support.lo
236235 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
237236 HAVE_LIBCPATH = @HAVE_LIBCPATH@
238237 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
239 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
240 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
241238 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
242239 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
243240 HAVE_LIBFDATA = @HAVE_LIBFDATA@
256253 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
257254 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
258255 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
259 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
260 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
261256 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
262257 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
263258 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
304299 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
305300 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
306301 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
307 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
308 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
309 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
310 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
311302 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
312303 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
313304 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
340331 LTLIBICONV = @LTLIBICONV@
341332 LTLIBINTL = @LTLIBINTL@
342333 LTLIBOBJS = @LTLIBOBJS@
334 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
343335 MAKEINFO = @MAKEINFO@
344336 MANIFEST_TOOL = @MANIFEST_TOOL@
345337 MKDIR_P = @MKDIR_P@
446438 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
447439 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
448440 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
449 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
450 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
451 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
452 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
453 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
454 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
455441 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
456442 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
457443 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
520506 libcpath_LIBS = @libcpath_LIBS@
521507 libcsplit_CFLAGS = @libcsplit_CFLAGS@
522508 libcsplit_LIBS = @libcsplit_LIBS@
523 libcstring_CFLAGS = @libcstring_CFLAGS@
524 libcstring_LIBS = @libcstring_LIBS@
525 libcsystem_CFLAGS = @libcsystem_CFLAGS@
526 libcsystem_LIBS = @libcsystem_LIBS@
527509 libcthreads_CFLAGS = @libcthreads_CFLAGS@
528510 libcthreads_LIBS = @libcthreads_LIBS@
529511 libdir = @libdir@
575557 @HAVE_LOCAL_LIBFGUID_TRUE@AM_CPPFLAGS = \
576558 @HAVE_LOCAL_LIBFGUID_TRUE@ -I$(top_srcdir)/include \
577559 @HAVE_LOCAL_LIBFGUID_TRUE@ -I$(top_srcdir)/common \
578 @HAVE_LOCAL_LIBFGUID_TRUE@ @LIBCSTRING_CPPFLAGS@ \
579560 @HAVE_LOCAL_LIBFGUID_TRUE@ @LIBCERROR_CPPFLAGS@
580561
581562 @HAVE_LOCAL_LIBFGUID_TRUE@noinst_LTLIBRARIES = libfguid.la
584565 @HAVE_LOCAL_LIBFGUID_TRUE@ libfguid_extern.h \
585566 @HAVE_LOCAL_LIBFGUID_TRUE@ libfguid_error.c libfguid_error.h \
586567 @HAVE_LOCAL_LIBFGUID_TRUE@ libfguid_libcerror.h \
587 @HAVE_LOCAL_LIBFGUID_TRUE@ libfguid_libcstring.h \
588568 @HAVE_LOCAL_LIBFGUID_TRUE@ libfguid_identifier.c libfguid_identifier.h \
589569 @HAVE_LOCAL_LIBFGUID_TRUE@ libfguid_support.c libfguid_support.h \
590570 @HAVE_LOCAL_LIBFGUID_TRUE@ libfguid_types.h \
00 /*
11 * The internal definitions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3535 #else
3636 #include <byte_stream.h>
3737
38 #define LIBFGUID_VERSION 20160426
38 #define LIBFGUID_VERSION 20170112
3939
4040 /* The version string
4141 */
42 #define LIBFGUID_VERSION_STRING "20160426"
42 #define LIBFGUID_VERSION_STRING "20170112"
4343
4444 /* The byte order definitions
4545 */
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4343 libfguid_error_t *error,
4444 FILE *stream )
4545 {
46 return( libcerror_error_fprint(
47 (libcerror_error_t *) error,
48 stream ) );
46 int print_count = 0;
47
48 print_count = libcerror_error_fprint(
49 (libcerror_error_t *) error,
50 stream );
51
52 return( print_count );
4953 }
5054
5155 /* Prints a descriptive string of the error to the string
5761 char *string,
5862 size_t size )
5963 {
60 return( libcerror_error_sprint(
61 (libcerror_error_t *) error,
62 string,
63 size ) );
64 int print_count = 0;
65
66 print_count = libcerror_error_sprint(
67 (libcerror_error_t *) error,
68 string,
69 size );
70
71 return( print_count );
6472 }
6573
6674 /* Prints a backtrace of the error to the stream
7078 libfguid_error_t *error,
7179 FILE *stream )
7280 {
73 return( libcerror_error_backtrace_fprint(
74 (libcerror_error_t *) error,
75 stream ) );
81 int print_count = 0;
82
83 print_count = libcerror_error_backtrace_fprint(
84 (libcerror_error_t *) error,
85 stream );
86
87 return( print_count );
7688 }
7789
7890 /* Prints a backtrace of the error to the string
8496 char *string,
8597 size_t size )
8698 {
87 return( libcerror_error_backtrace_sprint(
88 (libcerror_error_t *) error,
89 string,
90 size ) );
99 int print_count = 0;
100
101 print_count = libcerror_error_backtrace_sprint(
102 (libcerror_error_t *) error,
103 string,
104 size );
105
106 return( print_count );
91107 }
92108
93109 #endif /* !defined( HAVE_LOCAL_LIBFGUID ) */
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal extern definition
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 #include <libfguid/extern.h>
3838
3939 #else
40 #define LIBFGUID_EXTERN /* extern */
4041
41 #define LIBFGUID_EXTERN extern
42 #endif /* !defined( HAVE_LOCAL_LIBFGUID ) */
4243
43 #endif
44 #endif /* !defined( _LIBFGUID_INTERNAL_EXTERN_H ) */
4445
45 #endif
46
00 /*
11 * GUID functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Global (or Universal) Unique Identifier (GUID/UUID) functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
199199 }
200200 #endif
201201
202 #endif
203
202 #endif /* !defined( _LIBFGUID_INTERNAL_IDENTIFIER_H ) */
203
00 /*
11 * The internal libcerror header
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
+0
-51
libfguid/libfguid_libcstring.h less more
0 /*
1 * The internal libcstring header
2 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBFGUID_LIBCSTRING_H )
22 #define _LIBFGUID_LIBCSTRING_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring
27 */
28 #if defined( HAVE_LOCAL_LIBCSTRING )
29
30 #include <libcstring_definitions.h>
31 #include <libcstring_narrow_string.h>
32 #include <libcstring_system_string.h>
33 #include <libcstring_types.h>
34 #include <libcstring_wide_string.h>
35
36 #else
37
38 /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT
39 * before including libcstring.h
40 */
41 #if defined( _WIN32 ) && defined( DLL_IMPORT )
42 #define LIBCSTRING_DLL_IMPORT
43 #endif
44
45 #include <libcstring.h>
46
47 #endif /* defined( HAVE_LOCAL_LIBCSTRING ) */
48
49 #endif /* !defined( _LIBFGUID_LIBCSTRING_H ) */
50
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4242 }
4343 #endif
4444
45 #endif
45 #endif /* !defined( _LIBFGUID_SUPPORT_H ) */
4646
00 /*
11 * The internal type definitions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal unused definition
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
11 AM_CPPFLAGS = \
22 -I$(top_srcdir)/include \
33 -I$(top_srcdir)/common \
4 @LIBCSTRING_CPPFLAGS@ \
54 @LIBCERROR_CPPFLAGS@ \
65 @LIBCDATA_CPPFLAGS@ \
76 @LIBCTHREADS_CPPFLAGS@ \
2524 libfmapi_guid.c libfmapi_guid.h \
2625 libfmapi_libcerror.h \
2726 libfmapi_libcnotify.h \
28 libfmapi_libcstring.h \
2927 libfmapi_libfdatetime.h \
3028 libfmapi_libfguid.h \
3129 libfmapi_libfwnt.h \
3432 libfmapi_one_off_entry_identifier.c libfmapi_one_off_entry_identifier.h \
3533 libfmapi_property_type.c libfmapi_property_type.h \
3634 libfmapi_service_provider_identifier.c libfmapi_service_provider_identifier.h \
35 libfmapi_support.c libfmapi_support.h \
3736 libfmapi_types.h \
3837 libfmapi_unused.h \
3938 libfmapi_value_type.c libfmapi_value_type.h \
4039 libfmapi_x400_object_identifier.h
4140 endif
42
4341
4442 MAINTAINERCLEANFILES = \
4543 Makefile.in
9797 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9898 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9999 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101100 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102101 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103102 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
108107 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109108 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110109 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
110 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
111 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
113112 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114113 $(ACLOCAL_M4)
115114 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
126125 libfmapi_entry_identifier.c libfmapi_entry_identifier.h \
127126 libfmapi_extern.h libfmapi_guid.c libfmapi_guid.h \
128127 libfmapi_libcerror.h libfmapi_libcnotify.h \
129 libfmapi_libcstring.h libfmapi_libfdatetime.h \
130 libfmapi_libfguid.h libfmapi_libfwnt.h libfmapi_libuna.h \
131 libfmapi_lzfu.c libfmapi_lzfu.h \
128 libfmapi_libfdatetime.h libfmapi_libfguid.h libfmapi_libfwnt.h \
129 libfmapi_libuna.h libfmapi_lzfu.c libfmapi_lzfu.h \
132130 libfmapi_one_off_entry_identifier.c \
133131 libfmapi_one_off_entry_identifier.h libfmapi_property_type.c \
134132 libfmapi_property_type.h \
135133 libfmapi_service_provider_identifier.c \
136 libfmapi_service_provider_identifier.h libfmapi_types.h \
137 libfmapi_unused.h libfmapi_value_type.c libfmapi_value_type.h \
134 libfmapi_service_provider_identifier.h libfmapi_support.c \
135 libfmapi_support.h libfmapi_types.h libfmapi_unused.h \
136 libfmapi_value_type.c libfmapi_value_type.h \
138137 libfmapi_x400_object_identifier.h
139138 @HAVE_LOCAL_LIBFMAPI_TRUE@am_libfmapi_la_OBJECTS = \
140139 @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_class_identifier.lo \
146145 @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_one_off_entry_identifier.lo \
147146 @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_property_type.lo \
148147 @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_service_provider_identifier.lo \
148 @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_support.lo \
149149 @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_value_type.lo
150150 libfmapi_la_OBJECTS = $(am_libfmapi_la_OBJECTS)
151151 AM_V_lt = $(am__v_lt_@AM_V@)
256256 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
257257 HAVE_LIBCPATH = @HAVE_LIBCPATH@
258258 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
259 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
260 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
261259 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
262260 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
263261 HAVE_LIBFDATA = @HAVE_LIBFDATA@
276274 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
277275 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
278276 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
279 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
280 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
281277 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
282278 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
283279 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
324320 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
325321 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
326322 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
327 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
328 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
329 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
330 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
331323 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
332324 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
333325 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
360352 LTLIBICONV = @LTLIBICONV@
361353 LTLIBINTL = @LTLIBINTL@
362354 LTLIBOBJS = @LTLIBOBJS@
355 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
363356 MAKEINFO = @MAKEINFO@
364357 MANIFEST_TOOL = @MANIFEST_TOOL@
365358 MKDIR_P = @MKDIR_P@
466459 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
467460 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
468461 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
469 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
470 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
471 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
472 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
473 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
474 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
475462 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
476463 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
477464 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
540527 libcpath_LIBS = @libcpath_LIBS@
541528 libcsplit_CFLAGS = @libcsplit_CFLAGS@
542529 libcsplit_LIBS = @libcsplit_LIBS@
543 libcstring_CFLAGS = @libcstring_CFLAGS@
544 libcstring_LIBS = @libcstring_LIBS@
545 libcsystem_CFLAGS = @libcsystem_CFLAGS@
546 libcsystem_LIBS = @libcsystem_LIBS@
547530 libcthreads_CFLAGS = @libcthreads_CFLAGS@
548531 libcthreads_LIBS = @libcthreads_LIBS@
549532 libdir = @libdir@
595578 @HAVE_LOCAL_LIBFMAPI_TRUE@AM_CPPFLAGS = \
596579 @HAVE_LOCAL_LIBFMAPI_TRUE@ -I$(top_srcdir)/include \
597580 @HAVE_LOCAL_LIBFMAPI_TRUE@ -I$(top_srcdir)/common \
598 @HAVE_LOCAL_LIBFMAPI_TRUE@ @LIBCSTRING_CPPFLAGS@ \
599581 @HAVE_LOCAL_LIBFMAPI_TRUE@ @LIBCERROR_CPPFLAGS@ \
600582 @HAVE_LOCAL_LIBFMAPI_TRUE@ @LIBCDATA_CPPFLAGS@ \
601583 @HAVE_LOCAL_LIBFMAPI_TRUE@ @LIBCTHREADS_CPPFLAGS@ \
618600 @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_guid.c libfmapi_guid.h \
619601 @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_libcerror.h \
620602 @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_libcnotify.h \
621 @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_libcstring.h \
622603 @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_libfdatetime.h \
623604 @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_libfguid.h \
624605 @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_libfwnt.h \
627608 @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_one_off_entry_identifier.c libfmapi_one_off_entry_identifier.h \
628609 @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_property_type.c libfmapi_property_type.h \
629610 @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_service_provider_identifier.c libfmapi_service_provider_identifier.h \
611 @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_support.c libfmapi_support.h \
630612 @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_types.h \
631613 @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_unused.h \
632614 @HAVE_LOCAL_LIBFMAPI_TRUE@ libfmapi_value_type.c libfmapi_value_type.h \
699681 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_one_off_entry_identifier.Plo@am__quote@
700682 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_property_type.Plo@am__quote@
701683 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_service_provider_identifier.Plo@am__quote@
684 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_support.Plo@am__quote@
702685 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfmapi_value_type.Plo@am__quote@
703686
704687 .c.o:
00 /*
11 * Checksum functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Checksum functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
5151 }
5252 #endif
5353
54 #endif
54 #endif /* !defined( _LIBFMAPI_CHECKSUM_H ) */
5555
00 /*
11 * Class identifier (CLSID) functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Class identifier (CLSID) functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
7777 }
7878 #endif
7979
80 #endif
80 #endif /* !defined( _LIBFMAPI_CLASS_IDENTIFIER_H ) */
8181
00 /*
11 * Codepage functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Codepage functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Debug functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2121 #include <common.h>
2222 #include <byte_stream.h>
2323 #include <memory.h>
24 #include <narrow_string.h>
25 #include <system_string.h>
2426 #include <types.h>
27 #include <wide_string.h>
2528
2629 #include "libfmapi_class_identifier.h"
2730 #include "libfmapi_codepage.h"
3033 #include "libfmapi_entry_identifier.h"
3134 #include "libfmapi_libcerror.h"
3235 #include "libfmapi_libcnotify.h"
33 #include "libfmapi_libcstring.h"
3436 #include "libfmapi_libfdatetime.h"
3537 #include "libfmapi_libfguid.h"
3638 #include "libfmapi_libfwnt.h"
238240 libcerror_error_t **error )
239241 {
240242 libfmapi_one_off_entry_identifier_t *one_off_entry_identifier = NULL;
241 libcstring_system_character_t *value_string = NULL;
243 system_character_t *value_string = NULL;
242244 static char *function = "libfmapi_debug_print_one_off_entry_identifier";
243245 size_t value_string_size = 0;
244246 int result = 0;
275277 libcnotify_printf(
276278 "One-off entry identifier:\n" );
277279
278 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
280 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
279281 result = libfmapi_one_off_entry_identifier_get_utf16_display_name_size(
280282 (libfmapi_one_off_entry_identifier_t *) one_off_entry_identifier,
281283 &value_string_size,
297299
298300 goto on_error;
299301 }
300 value_string = libcstring_system_string_allocate(
302 value_string = system_string_allocate(
301303 value_string_size );
302304
303305 if( value_string == NULL )
311313
312314 goto on_error;
313315 }
314 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
316 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
315317 result = libfmapi_one_off_entry_identifier_get_utf16_display_name(
316318 (libfmapi_one_off_entry_identifier_t *) one_off_entry_identifier,
317319 (uint16_t *) value_string,
336338 goto on_error;
337339 }
338340 libcnotify_printf(
339 "Display name\t\t\t: %" PRIs_LIBCSTRING_SYSTEM "\n",
341 "Display name\t\t\t: %" PRIs_SYSTEM "\n",
340342 value_string );
341343
342344 memory_free(
344346
345347 value_string = NULL;
346348
347 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
349 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
348350 result = libfmapi_one_off_entry_identifier_get_utf16_address_type_size(
349351 (libfmapi_one_off_entry_identifier_t *) one_off_entry_identifier,
350352 &value_string_size,
366368
367369 goto on_error;
368370 }
369 value_string = libcstring_system_string_allocate(
371 value_string = system_string_allocate(
370372 value_string_size );
371373
372374 if( value_string == NULL )
380382
381383 goto on_error;
382384 }
383 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
385 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
384386 result = libfmapi_one_off_entry_identifier_get_utf16_address_type(
385387 (libfmapi_one_off_entry_identifier_t *) one_off_entry_identifier,
386388 (uint16_t *) value_string,
405407 goto on_error;
406408 }
407409 libcnotify_printf(
408 "Address type\t\t\t: %" PRIs_LIBCSTRING_SYSTEM "\n",
410 "Address type\t\t\t: %" PRIs_SYSTEM "\n",
409411 value_string );
410412
411413 memory_free(
413415
414416 value_string = NULL;
415417
416 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
418 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
417419 result = libfmapi_one_off_entry_identifier_get_utf16_email_address_size(
418420 (libfmapi_one_off_entry_identifier_t *) one_off_entry_identifier,
419421 &value_string_size,
435437
436438 goto on_error;
437439 }
438 value_string = libcstring_system_string_allocate(
440 value_string = system_string_allocate(
439441 value_string_size );
440442
441443 if( value_string == NULL )
449451
450452 goto on_error;
451453 }
452 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
454 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
453455 result = libfmapi_one_off_entry_identifier_get_utf16_email_address(
454456 (libfmapi_one_off_entry_identifier_t *) one_off_entry_identifier,
455457 (uint16_t *) value_string,
474476 goto on_error;
475477 }
476478 libcnotify_printf(
477 "Email address\t\t\t: %" PRIs_LIBCSTRING_SYSTEM "\n",
479 "Email address\t\t\t: %" PRIs_SYSTEM "\n",
478480 value_string );
479481
480482 memory_free(
602604 int ascii_codepage,
603605 libcerror_error_t **error )
604606 {
605 libcstring_system_character_t filetime_string[ 32 ];
606 libcstring_system_character_t guid_string[ 48 ];
607
608 libfdatetime_filetime_t *filetime = NULL;
609 libfguid_identifier_t *guid = NULL;
610 libcstring_system_character_t *value_string = NULL;
611 static char *function = "libfmapi_debug_print_value";
612 size_t value_string_size = 0;
613 double value_double = 0.0;
614 float value_float = 0.0;
615 uint64_t value_64bit = 0;
616 uint32_t value_32bit = 0;
617 uint8_t is_ascii_string = 0;
618 int result = 0;
607 system_character_t filetime_string[ 32 ];
608 system_character_t guid_string[ 48 ];
609
610 libfdatetime_filetime_t *filetime = NULL;
611 libfguid_identifier_t *guid = NULL;
612 system_character_t *value_string = NULL;
613 static char *function = "libfmapi_debug_print_value";
614 size_t value_string_size = 0;
615 double value_double = 0.0;
616 float value_float = 0.0;
617 uint64_t value_64bit = 0;
618 uint32_t value_32bit = 0;
619 uint8_t is_ascii_string = 0;
620 int result = 0;
619621
620622 switch( value_type )
621623 {
867869
868870 return( -1 );
869871 }
870 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
872 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
871873 result = libfdatetime_filetime_copy_to_utf16_string(
872874 filetime,
873875 (uint16_t *) filetime_string,
911913 return( -1 );
912914 }
913915 libcnotify_printf(
914 "Filetime\t: %" PRIs_LIBCSTRING_SYSTEM " UTC\n\n",
916 "Filetime\t: %" PRIs_SYSTEM " UTC\n\n",
915917 filetime_string );
916918
917919 break;
960962 value_data += 16;
961963 value_data_size -= 16;
962964
963 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
965 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
964966 result = libfguid_identifier_copy_to_utf16_string(
965967 guid,
966968 (uint16_t *) guid_string,
10041006 return( -1 );
10051007 }
10061008 libcnotify_printf(
1007 "GUID\t: %" PRIs_LIBCSTRING_SYSTEM "\n\n",
1009 "GUID\t: %" PRIs_SYSTEM "\n\n",
10081010 guid_string );
10091011 }
10101012 else
10561058 */
10571059 if( is_ascii_string == 0 )
10581060 {
1059 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1061 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
10601062 result = libuna_utf16_string_size_from_utf16_stream(
10611063 value_data,
10621064 value_data_size,
10761078 */
10771079 else if( ascii_codepage == 65000 )
10781080 {
1079 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1081 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
10801082 result = libuna_utf16_string_size_from_utf7_stream(
10811083 value_data,
10821084 value_data_size,
10951097 else if( ( ascii_codepage == 1200 )
10961098 || ( ascii_codepage == 65001 ) )
10971099 {
1098 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1100 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
10991101 result = libuna_utf16_string_size_from_utf8_stream(
11001102 value_data,
11011103 value_data_size,
11141116 /* TODO currently libuna uses the same numeric values for the codepages as libfmapi
11151117 * add a mapping function if this implementation changes
11161118 */
1117 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1119 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
11181120 result = libuna_utf16_string_size_from_byte_stream(
11191121 value_data,
11201122 value_data_size,
11421144
11431145 return( -1 );
11441146 }
1145 value_string = libcstring_system_string_allocate(
1147 value_string = system_string_allocate(
11461148 value_string_size );
11471149
11481150 if( value_string == NULL )
11601162 */
11611163 if( is_ascii_string == 0 )
11621164 {
1163 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1165 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
11641166 result = libuna_utf16_string_copy_from_utf16_stream(
11651167 (libuna_utf16_character_t *) value_string,
11661168 value_string_size,
11821184 */
11831185 else if( ascii_codepage == 65000 )
11841186 {
1185 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1187 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
11861188 result = libuna_utf16_string_copy_from_utf7_stream(
11871189 (libuna_utf16_character_t *) value_string,
11881190 value_string_size,
12031205 else if( ( ascii_codepage == 1200 )
12041206 || ( ascii_codepage == 65001 ) )
12051207 {
1206 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1208 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
12071209 result = libuna_utf16_string_copy_from_utf8_stream(
12081210 (libuna_utf16_character_t *) value_string,
12091211 value_string_size,
12241226 /* TODO currently libuna uses the same numeric values for the codepages as libfmapi
12251227 * add a mapping function if this implementation changes
12261228 */
1227 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1229 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
12281230 result = libuna_utf16_string_copy_from_byte_stream(
12291231 (libuna_utf16_character_t *) value_string,
12301232 value_string_size,
12581260 return( -1 );
12591261 }
12601262 libcnotify_printf(
1261 "ASCII string\t: %" PRIs_LIBCSTRING_SYSTEM "\n\n",
1263 "ASCII string\t: %" PRIs_SYSTEM "\n\n",
12621264 value_string );
12631265
12641266 memory_free(
12741276 }
12751277 else
12761278 {
1277 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1279 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
12781280 result = libuna_utf16_string_size_from_utf16_stream(
12791281 value_data,
12801282 value_data_size,
13021304
13031305 return( -1 );
13041306 }
1305 value_string = libcstring_system_string_allocate(
1307 value_string = system_string_allocate(
13061308 value_string_size );
13071309
13081310 if( value_string == NULL )
13161318
13171319 return( -1 );
13181320 }
1319 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
1321 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
13201322 result = libuna_utf16_string_copy_from_utf16_stream(
13211323 (libuna_utf16_character_t *) value_string,
13221324 value_string_size,
13501352 return( -1 );
13511353 }
13521354 libcnotify_printf(
1353 "Unicode string\t: %" PRIs_LIBCSTRING_SYSTEM "\n\n",
1355 "Unicode string\t: %" PRIs_SYSTEM "\n\n",
13541356 value_string );
13551357
13561358 memory_free(
29122914 {
29132915 uint8_t filetime_buffer[ 8 ];
29142916
2915 libcstring_system_character_t filetime_string[ 32 ];
2916 libcstring_system_character_t guid_string[ 48 ];
2917 libcstring_system_character_t sid_string[ 128 ];
2918
2919 libfdatetime_filetime_t *delta_filetime = NULL;
2920 libfdatetime_filetime_t *filetime = NULL;
2921 libfguid_identifier_t *guid = NULL;
2922 libfwnt_security_identifier_t *sid = NULL;
2923 libcstring_system_character_t *value_string = NULL;
2924 uint8_t *rtf_value_string = NULL;
2925 uint8_t *value_data_pointer = NULL;
2926 static char *function = "libfmapi_debug_print_binary_data_value";
2927 size_t rtf_value_string_size = 0;
2928 size_t sid_string_size = 0;
2929 size_t value_data_iterator = 0;
2930 size_t value_string_size = 0;
2931 uint64_t value_64bit = 0;
2932 uint32_t entries_size = 0;
2933 uint32_t number_of_values = 0;
2934 uint32_t value_32bit = 0;
2935 uint32_t value_iterator = 0;
2936 uint16_t value_16bit = 0;
2937 uint8_t data_size = 0;
2938 int list_iterator = 0;
2939 int result = 0;
2917 system_character_t filetime_string[ 32 ];
2918 system_character_t guid_string[ 48 ];
2919 system_character_t sid_string[ 128 ];
2920
2921 libfdatetime_filetime_t *delta_filetime = NULL;
2922 libfdatetime_filetime_t *filetime = NULL;
2923 libfguid_identifier_t *guid = NULL;
2924 libfwnt_security_identifier_t *sid = NULL;
2925 system_character_t *value_string = NULL;
2926 uint8_t *rtf_value_string = NULL;
2927 uint8_t *value_data_pointer = NULL;
2928 static char *function = "libfmapi_debug_print_binary_data_value";
2929 size_t rtf_value_string_size = 0;
2930 size_t sid_string_size = 0;
2931 size_t value_data_iterator = 0;
2932 size_t value_string_size = 0;
2933 uint64_t value_64bit = 0;
2934 uint32_t entries_size = 0;
2935 uint32_t number_of_values = 0;
2936 uint32_t value_32bit = 0;
2937 uint32_t value_iterator = 0;
2938 uint16_t value_16bit = 0;
2939 uint8_t data_size = 0;
2940 int list_iterator = 0;
2941 int result = 0;
29402942
29412943 if( value_data == NULL )
29422944 {
30233025 value_data += 16;
30243026 value_data_size -= 16;
30253027
3026 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
3028 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
30273029 result = libfguid_identifier_copy_to_utf16_string(
30283030 guid,
30293031 (uint16_t *) guid_string,
30673069 return( -1 );
30683070 }
30693071 libcnotify_printf(
3070 "GUID\t: %" PRIs_LIBCSTRING_SYSTEM "\n\n",
3072 "GUID\t: %" PRIs_SYSTEM "\n\n",
30713073 guid_string );
30723074 }
30733075 else
33493351
33503352 return( -1 );
33513353 }
3352 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
3354 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
33533355 result = libfdatetime_filetime_copy_to_utf16_string(
33543356 filetime,
33553357 (uint16_t *) filetime_string,
33833385 return( -1 );
33843386 }
33853387 libcnotify_printf(
3386 "\tFiletime\t: %" PRIs_LIBCSTRING_SYSTEM " UTC\n",
3388 "\tFiletime\t: %" PRIs_SYSTEM " UTC\n",
33873389 filetime_string );
33883390
33893391 if( libfguid_identifier_initialize(
34393441 value_data_size -= 16;
34403442 */
34413443
3442 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
3444 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
34433445 result = libfguid_identifier_copy_to_utf16_string(
34443446 guid,
34453447 (uint16_t *) guid_string,
34963498 return( -1 );
34973499 }
34983500 libcnotify_printf(
3499 "\tGUID\t\t: %" PRIs_LIBCSTRING_SYSTEM "\n",
3501 "\tGUID\t\t: %" PRIs_SYSTEM "\n",
35003502 guid_string );
35013503
35023504 list_iterator = 1;
35873589
35883590 return( -1 );
35893591 }
3590 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
3592 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
35913593 result = libfdatetime_filetime_copy_to_utf16_string(
35923594 filetime,
35933595 (uint16_t *) filetime_string,
36213623 return( -1 );
36223624 }
36233625 libcnotify_printf(
3624 "\tFiletime\t: %" PRIs_LIBCSTRING_SYSTEM " UTC\n",
3626 "\tFiletime\t: %" PRIs_SYSTEM " UTC\n",
36253627 filetime_string );
36263628
36273629 libcnotify_printf(
38083810
38093811 return( -1 );
38103812 }
3811 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
3813 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
38123814 result = libfwnt_security_identifier_copy_to_utf16_string(
38133815 sid,
38143816 (uint16_t *) sid_string,
38393841 return( -1 );
38403842 }
38413843 libcnotify_printf(
3842 "\t\tOwner SID:\t\t%" PRIs_LIBCSTRING_SYSTEM "\n",
3844 "\t\tOwner SID:\t\t%" PRIs_SYSTEM "\n",
38433845 sid_string );
38443846 }
38453847 value_data_pointer = &( value_data[ 16 ] );
39163918
39173919 return( -1 );
39183920 }
3919 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
3921 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
39203922 result = libfwnt_security_identifier_copy_to_utf16_string(
39213923 sid,
39223924 (uint16_t *) sid_string,
39473949 return( -1 );
39483950 }
39493951 libcnotify_printf(
3950 "\t\tGroup SID:\t\t%" PRIs_LIBCSTRING_SYSTEM "\n",
3952 "\t\tGroup SID:\t\t%" PRIs_SYSTEM "\n",
39513953 sid_string );
39523954 }
39533955 value_data_pointer = &( value_data[ 20 ] );
41204122
41214123 return( -1 );
41224124 }
4123 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
4125 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
41244126 result = libfwnt_security_identifier_copy_to_utf16_string(
41254127 sid,
41264128 (uint16_t *) sid_string,
41514153 return( -1 );
41524154 }
41534155 libcnotify_printf(
4154 "\t\tSID:\t\t\t%" PRIs_LIBCSTRING_SYSTEM "\n",
4156 "\t\tSID:\t\t\t%" PRIs_SYSTEM "\n",
41554157 sid_string );
41564158
41574159 libcnotify_printf(
42664268
42674269 return( -1 );
42684270 }
4269 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
4271 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
42704272 result = libfwnt_security_identifier_copy_to_utf16_string(
42714273 sid,
42724274 (uint16_t *) sid_string,
42974299 return( -1 );
42984300 }
42994301 libcnotify_printf(
4300 "SID:\t%" PRIs_LIBCSTRING_SYSTEM "\n",
4302 "SID:\t%" PRIs_SYSTEM "\n",
43014303 sid_string );
43024304 libcnotify_printf(
43034305 "\n" );
44014403 }
44024404 else
44034405 {
4404 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
4406 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
44054407 result = libuna_utf16_string_size_from_byte_stream(
44064408 value_data,
44074409 value_data_size,
44284430
44294431 return( -1 );
44304432 }
4431 value_string = libcstring_system_string_allocate(
4433 value_string = system_string_allocate(
44324434 value_string_size );
44334435
44344436 if( value_string == NULL )
44424444
44434445 return( -1 );
44444446 }
4445 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
4447 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
44464448 result = libuna_utf16_string_copy_from_byte_stream(
44474449 (libuna_utf16_character_t *) value_string,
44484450 value_string_size,
44764478 return( -1 );
44774479 }
44784480 libcnotify_printf(
4479 "ASCII string\t: %" PRIs_LIBCSTRING_SYSTEM "\n\n",
4481 "ASCII string\t: %" PRIs_SYSTEM "\n\n",
44804482 value_string );
44814483
44824484 memory_free(
45294531 value_data += 16;
45304532 value_data_size -= 16;
45314533
4532 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
4534 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
45334535 result = libfguid_identifier_copy_to_utf16_string(
45344536 guid,
45354537 (uint16_t *) guid_string,
45734575 return( -1 );
45744576 }
45754577 libcnotify_printf(
4576 "MAPI UID\t: %" PRIs_LIBCSTRING_SYSTEM "\n\n",
4578 "MAPI UID\t: %" PRIs_SYSTEM "\n\n",
45774579 guid_string );
45784580 }
45794581 else
48204822 value_data += 16;
48214823 value_data_size -= 16;
48224824
4823 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
4825 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
48244826 result = libfguid_identifier_copy_to_utf16_string(
48254827 guid,
48264828 (uint16_t *) guid_string,
48644866 return( -1 );
48654867 }
48664868 libcnotify_printf(
4867 "GUID\t\t: %" PRIs_LIBCSTRING_SYSTEM "\n",
4869 "GUID\t\t: %" PRIs_SYSTEM "\n",
48684870 guid_string );
48694871
48704872 libcnotify_printf(
49524954 value_data_size -= 16;
49534955 data_size -= 16;
49544956
4955 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
4957 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
49564958 result = libfguid_identifier_copy_to_utf16_string(
49574959 guid,
49584960 (uint16_t *) guid_string,
49834985 return( -1 );
49844986 }
49854987 libcnotify_printf(
4986 "GUID\t\t: %" PRIs_LIBCSTRING_SYSTEM "\n",
4988 "GUID\t\t: %" PRIs_SYSTEM "\n",
49874989 guid_string );
49884990 }
49894991 libcnotify_printf(
50205022 break;
50215023
50225024 case 0x683c:
5023 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
5025 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
50245026 result = libuna_utf16_string_size_from_byte_stream(
50255027 value_data,
50265028 value_data_size,
50485050
50495051 return( -1 );
50505052 }
5051 value_string = libcstring_system_string_allocate(
5053 value_string = system_string_allocate(
50525054 value_string_size );
5053
50545055
50555056 if( value_string == NULL )
50565057 {
50635064
50645065 return( -1 );
50655066 }
5066 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
5067 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
50675068 result = libuna_utf16_string_copy_from_byte_stream(
50685069 (libuna_utf16_character_t *) value_string,
50695070 value_string_size,
50975098 return( -1 );
50985099 }
50995100 libcnotify_printf(
5100 "ASCII string\t: %" PRIs_LIBCSTRING_SYSTEM "\n",
5101 "ASCII string\t: %" PRIs_SYSTEM "\n",
51015102 value_string );
51025103
51035104 memory_free(
51475148 value_data += 16;
51485149 value_data_size -= 16;
51495150
5150 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
5151 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
51515152 result = libfguid_identifier_copy_to_utf16_string(
51525153 guid,
51535154 (uint16_t *) guid_string,
51915192 return( -1 );
51925193 }
51935194 libcnotify_printf(
5194 "GUID\t: %" PRIs_LIBCSTRING_SYSTEM "\n",
5195 "GUID\t: %" PRIs_SYSTEM "\n",
51955196 guid_string );
51965197
51975198 libcnotify_printf(
52635264 value_data += 16;
52645265 value_data_size -= 16;
52655266
5266 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
5267 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
52675268 result = libfguid_identifier_copy_to_utf16_string(
52685269 guid,
52695270 (uint16_t *) guid_string,
52945295 return( -1 );
52955296 }
52965297 libcnotify_printf(
5297 "GUID\t\t: %" PRIs_LIBCSTRING_SYSTEM "\n",
5298 "GUID\t\t: %" PRIs_SYSTEM "\n",
52985299 guid_string );
52995300
53005301 libcnotify_printf(
53305331 value_data += 16;
53315332 value_data_size -= 16;
53325333
5333 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
5334 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
53345335 result = libfguid_identifier_copy_to_utf16_string(
53355336 guid,
53365337 (uint16_t *) guid_string,
53615362 return( -1 );
53625363 }
53635364 libcnotify_printf(
5364 "GUID\t\t: %" PRIs_LIBCSTRING_SYSTEM "\n",
5365 "GUID\t\t: %" PRIs_SYSTEM "\n",
53655366 guid_string );
53665367
53675368 libcnotify_printf(
00 /*
11 * Debug functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
108108 }
109109 #endif
110110
111 #endif
111 #endif /* !defined( _LIBFMAPI_DEBUG_H ) */
112112
00 /*
11 * The internal definitions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3535 #else
3636 #include <byte_stream.h>
3737
38 #define LIBFMAPI_VERSION 20160707
38 #define LIBFMAPI_VERSION 20170112
3939
4040 /* The libfmapi version string
4141 */
42 #define LIBFMAPI_VERSION_STRING "20160707"
42 #define LIBFMAPI_VERSION_STRING "20170112"
4343
4444 /* The endian definitions
4545 */
00 /*
11 * Entry identifier (ENTRYID) functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2020
2121 #include <common.h>
2222 #include <memory.h>
23 #include <system_string.h>
2324 #include <types.h>
2425
2526 #include "libfmapi_definitions.h"
148149 static char *function = "libfmapi_entry_identifier_copy_from_byte_stream";
149150
150151 #if defined( HAVE_DEBUG_OUTPUT )
151 libcstring_system_character_t guid_string[ 48 ];
152 system_character_t guid_string[ 48 ];
152153
153154 libfguid_identifier_t *guid = NULL;
154155 int result = 0;
284285
285286 goto on_error;
286287 }
287 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
288 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
288289 result = libfguid_identifier_copy_to_utf16_string(
289290 guid,
290291 (uint16_t *) guid_string,
311312 goto on_error;
312313 }
313314 libcnotify_printf(
314 "%s: service provider identifier\t: %" PRIs_LIBCSTRING_SYSTEM " (%s)\n",
315 "%s: service provider identifier\t: %" PRIs_SYSTEM " (%s)\n",
315316 function,
316317 guid_string,
317318 libfmapi_service_provider_identifier_get_name(
00 /*
11 * Entry identifier (ENTRYID) functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
7373 }
7474 #endif
7575
76 #endif
76 #endif /* !defined( _LIBFMAPI_INTERNAL_ENTRY_IDENTIFIER_H ) */
7777
00 /*
11 * The internal extern definition
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 #include <libfmapi/extern.h>
3838
3939 #else
40 #define LIBFMAPI_EXTERN /* extern */
4041
41 #define LIBFMAPI_EXTERN extern
42 #endif /* !defined( HAVE_LOCAL_LIBFMAPI ) */
4243
43 #endif
44 #endif /* !defined( _LIBFMAPI_INTERNAL_EXTERN_H ) */
4445
45 #endif
46
00 /*
11 * GUID functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * GUID functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3434 }
3535 #endif
3636
37 #endif
37 #endif /* !defined( _LIBFMAPI_GUID_H ) */
3838
00 /*
11 * The internal libcerror header
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4343
4444 #include <libcerror.h>
4545
46 #endif
46 #endif /* defined( HAVE_LOCAL_LIBCERROR ) */
4747
48 #endif
48 #endif /* !defined( _LIBFMAPI_LIBCERROR_H ) */
4949
00 /*
11 * The internal libcnotify header
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
+0
-51
libfmapi/libfmapi_libcstring.h less more
0 /*
1 * The internal libcstring header
2 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBFMAPI_LIBCSTRING_H )
22 #define _LIBFMAPI_LIBCSTRING_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring
27 */
28 #if defined( HAVE_LOCAL_LIBCSTRING )
29
30 #include <libcstring_definitions.h>
31 #include <libcstring_narrow_string.h>
32 #include <libcstring_system_string.h>
33 #include <libcstring_types.h>
34 #include <libcstring_wide_string.h>
35
36 #else
37
38 /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT
39 * before including libcstring.h
40 */
41 #if defined( _WIN32 ) && defined( DLL_IMPORT )
42 #define LIBCSTRING_DLL_IMPORT
43 #endif
44
45 #include <libcstring.h>
46
47 #endif /* defined( HAVE_LOCAL_LIBCSTRING ) */
48
49 #endif /* !defined( _LIBFMAPI_LIBCSTRING_H ) */
50
00 /*
11 * The libfdatetime header wrapper
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The libfguid header wrapper
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The libfwnt header wrapper
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The libuna header wrapper
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * This software is free software: you can redistribute it and/or modify
66 * it under the terms of the GNU Lesser General Public License as published by
00 /*
11 * LZFu (un)compression functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * LZFu (un)compression functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
7777 }
7878 #endif
7979
80 #endif
80 #endif /* !defined( _LIBFMAPI_LZFU_H ) */
8181
00 /*
11 * One-off entry identifier functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * One-off entry identifier functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
185185 }
186186 #endif
187187
188 #endif
188 #endif /* !defined( _LIBFMAPI_INTERNAL_ONE_OFF_ENTRY_IDENTIFIER_H ) */
189189
00 /*
11 * Property type functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2020
2121 #include <common.h>
2222 #include <memory.h>
23 #include <narrow_string.h>
2324 #include <types.h>
2425
2526 #include "libfmapi_class_identifier.h"
26 #include "libfmapi_libcstring.h"
2727 #include "libfmapi_property_type.h"
2828
2929 #if defined( HAVE_DEBUG_OUTPUT )
29452945 while( ( libfmapi_named_property_types[ iterator ] ).name != NULL )
29462946 {
29472947 if( ( ( libfmapi_named_property_types[ iterator ] ).name_size == name_size )
2948 && ( libcstring_narrow_string_compare_no_case(
2948 && ( narrow_string_compare_no_case(
29492949 ( libfmapi_named_property_types[ iterator ] ).name,
29502950 name,
29512951 name_size ) == 0 ) )
30373037 while( ( libfmapi_named_property_types[ iterator ] ).name != NULL )
30383038 {
30393039 if( ( ( libfmapi_named_property_types[ iterator ] ).name_size == name_size )
3040 && ( libcstring_narrow_string_compare_no_case(
3040 && ( narrow_string_compare_no_case(
30413041 ( libfmapi_named_property_types[ iterator ] ).name,
30423042 name,
30433043 name_size ) == 0 ) )
00 /*
11 * Property type functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
120120 size_t name_size,
121121 uint32_t value_type );
122122
123 #endif
123 #endif /* defined( HAVE_DEBUG_OUTPUT ) */
124124
125125 #if defined( __cplusplus )
126126 }
127127 #endif
128128
129 #endif
129 #endif /* !defined( _LIBFMAPI_PROPERTY_TYPE_H ) */
130130
00 /*
11 * Sevice provider functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Service provider identifier functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4343 }
4444 #endif
4545
46 #endif
46 #endif /* !defined( _LIBFMAPI_SERVICE_PROVIDER_IDENTIFIER_H ) */
4747
0 /*
1 * Support functions
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <types.h>
23
24 #include "libfmapi_definitions.h"
25 #include "libfmapi_support.h"
26
27 #if !defined( HAVE_LOCAL_LIBFMAPI )
28
29 /* Returns the library version as a string
30 */
31 const char *libfmapi_get_version(
32 void )
33 {
34 return( (const char *) LIBFMAPI_VERSION_STRING );
35 }
36
37 #endif /* !defined( HAVE_LOCAL_LIBFMAPI ) */
38
0 /*
1 * Support functions
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBFMAPI_SUPPORT_H )
22 #define _LIBFMAPI_SUPPORT_H
23
24 #include <common.h>
25 #include <types.h>
26
27 #include "libfmapi_extern.h"
28
29 #if defined( __cplusplus )
30 extern "C" {
31 #endif
32
33 #if !defined( HAVE_LOCAL_LIBFMAPI )
34
35 LIBFMAPI_EXTERN \
36 const char *libfmapi_get_version(
37 void );
38
39 #endif /* !defined( HAVE_LOCAL_LIBFMAPI ) */
40
41 #if defined( __cplusplus )
42 }
43 #endif
44
45 #endif /* !defined( _LIBFMAPI_SUPPORT_H ) */
46
00 /*
11 * The internal type definitions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal unused definition
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Value type functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Value type functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
5959 }
6060 #endif
6161
62 #endif
62 #endif /* !defined( _LIBFMAPI_VALUE_TYPE_H ) */
6363
00 /*
11 * X.400 object identifier (MAPIOID) functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
6868 }
6969 #endif
7070
71 #endif
71 #endif /* !defined( _LIBFMAPI_X400_OBJECT_IDENTIFIER_H ) */
7272
11 AM_CPPFLAGS = \
22 -I$(top_srcdir)/include \
33 -I$(top_srcdir)/common \
4 @LIBCSTRING_CPPFLAGS@ \
54 @LIBCERROR_CPPFLAGS@ \
65 @LIBCTHREADS_CPPFLAGS@ \
76 @LIBCDATA_CPPFLAGS@ \
2726 libfvalue_libcdata.h \
2827 libfvalue_libcerror.h \
2928 libfvalue_libcnotify.h \
30 libfvalue_libcstring.h \
3129 libfvalue_libfdatetime.h \
3230 libfvalue_libfguid.h \
3331 libfvalue_libfwnt.h \
4341 libfvalue_unused.h
4442 endif
4543
46
4744 MAINTAINERCLEANFILES = \
4845 Makefile.in
4946
9797 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9898 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9999 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101100 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102101 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103102 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
108107 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109108 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110109 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
110 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
111 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
113112 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114113 $(ACLOCAL_M4)
115114 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
127126 libfvalue_floating_point.c libfvalue_floating_point.h \
128127 libfvalue_integer.c libfvalue_integer.h libfvalue_libcdata.h \
129128 libfvalue_libcerror.h libfvalue_libcnotify.h \
130 libfvalue_libcstring.h libfvalue_libfdatetime.h \
131 libfvalue_libfguid.h libfvalue_libfwnt.h libfvalue_libuna.h \
129 libfvalue_libfdatetime.h libfvalue_libfguid.h \
130 libfvalue_libfwnt.h libfvalue_libuna.h \
132131 libfvalue_split_string.c libfvalue_split_string.h \
133132 libfvalue_string.c libfvalue_string.h libfvalue_types.h \
134133 libfvalue_table.c libfvalue_table.h libfvalue_value.c \
259258 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
260259 HAVE_LIBCPATH = @HAVE_LIBCPATH@
261260 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
262 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
263 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
264261 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
265262 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
266263 HAVE_LIBFDATA = @HAVE_LIBFDATA@
279276 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
280277 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
281278 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
282 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
283 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
284279 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
285280 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
286281 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
327322 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
328323 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
329324 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
330 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
331 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
332 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
333 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
334325 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
335326 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
336327 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
363354 LTLIBICONV = @LTLIBICONV@
364355 LTLIBINTL = @LTLIBINTL@
365356 LTLIBOBJS = @LTLIBOBJS@
357 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
366358 MAKEINFO = @MAKEINFO@
367359 MANIFEST_TOOL = @MANIFEST_TOOL@
368360 MKDIR_P = @MKDIR_P@
469461 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
470462 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
471463 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
472 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
473 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
474 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
475 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
476 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
477 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
478464 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
479465 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
480466 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
543529 libcpath_LIBS = @libcpath_LIBS@
544530 libcsplit_CFLAGS = @libcsplit_CFLAGS@
545531 libcsplit_LIBS = @libcsplit_LIBS@
546 libcstring_CFLAGS = @libcstring_CFLAGS@
547 libcstring_LIBS = @libcstring_LIBS@
548 libcsystem_CFLAGS = @libcsystem_CFLAGS@
549 libcsystem_LIBS = @libcsystem_LIBS@
550532 libcthreads_CFLAGS = @libcthreads_CFLAGS@
551533 libcthreads_LIBS = @libcthreads_LIBS@
552534 libdir = @libdir@
598580 @HAVE_LOCAL_LIBFVALUE_TRUE@AM_CPPFLAGS = \
599581 @HAVE_LOCAL_LIBFVALUE_TRUE@ -I$(top_srcdir)/include \
600582 @HAVE_LOCAL_LIBFVALUE_TRUE@ -I$(top_srcdir)/common \
601 @HAVE_LOCAL_LIBFVALUE_TRUE@ @LIBCSTRING_CPPFLAGS@ \
602583 @HAVE_LOCAL_LIBFVALUE_TRUE@ @LIBCERROR_CPPFLAGS@ \
603584 @HAVE_LOCAL_LIBFVALUE_TRUE@ @LIBCTHREADS_CPPFLAGS@ \
604585 @HAVE_LOCAL_LIBFVALUE_TRUE@ @LIBCDATA_CPPFLAGS@ \
623604 @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_libcdata.h \
624605 @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_libcerror.h \
625606 @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_libcnotify.h \
626 @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_libcstring.h \
627607 @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_libfdatetime.h \
628608 @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_libfguid.h \
629609 @HAVE_LOCAL_LIBFVALUE_TRUE@ libfvalue_libfwnt.h \
00 /*
11 * Binary data value functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Binary data value functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
109109 }
110110 #endif
111111
112 #endif
112 #endif /* !defined( _LIBFVALUE_BINARY_DATA_H ) */
113113
00 /*
11 * Codepage functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Data handle functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Data handle functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
190190 }
191191 #endif
192192
193 #endif
193 #endif /* !defined( _LIBFVALUE_INTERNAL_DATA_HANDLE_H ) */
194194
00 /*
11 * The internal definitions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3535 #else
3636 #include <byte_stream.h>
3737
38 #define LIBFVALUE_VERSION 20160718
38 #define LIBFVALUE_VERSION 20170113
3939
4040 /* The libfvalue version string
4141 */
42 #define LIBFVALUE_VERSION_STRING "20160718"
42 #define LIBFVALUE_VERSION_STRING "20170113"
4343
4444 /* The endian definitions
4545 */
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4343 libfvalue_error_t *error,
4444 FILE *stream )
4545 {
46 return( libcerror_error_fprint(
47 (libcerror_error_t *) error,
48 stream ) );
46 int print_count = 0;
47
48 print_count = libcerror_error_fprint(
49 (libcerror_error_t *) error,
50 stream );
51
52 return( print_count );
4953 }
5054
5155 /* Prints a descriptive string of the error to the string
5761 char *string,
5862 size_t size )
5963 {
60 return( libcerror_error_sprint(
61 (libcerror_error_t *) error,
62 string,
63 size ) );
64 int print_count = 0;
65
66 print_count = libcerror_error_sprint(
67 (libcerror_error_t *) error,
68 string,
69 size );
70
71 return( print_count );
6472 }
6573
6674 /* Prints a backtrace of the error to the stream
7078 libfvalue_error_t *error,
7179 FILE *stream )
7280 {
73 return( libcerror_error_backtrace_fprint(
74 (libcerror_error_t *) error,
75 stream ) );
81 int print_count = 0;
82
83 print_count = libcerror_error_backtrace_fprint(
84 (libcerror_error_t *) error,
85 stream );
86
87 return( print_count );
7688 }
7789
7890 /* Prints a backtrace of the error to the string
8496 char *string,
8597 size_t size )
8698 {
87 return( libcerror_error_backtrace_sprint(
88 (libcerror_error_t *) error,
89 string,
90 size ) );
99 int print_count = 0;
100
101 print_count = libcerror_error_backtrace_sprint(
102 (libcerror_error_t *) error,
103 string,
104 size );
105
106 return( print_count );
91107 }
92108
93109 #endif /* !defined( HAVE_LOCAL_LIBFVALUE ) */
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal extern definition
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 #include <libfvalue/extern.h>
3838
3939 #else
40 #define LIBFVALUE_EXTERN /* extern */
4041
41 #define LIBFVALUE_EXTERN extern
42 #endif /* !defined( HAVE_LOCAL_LIBFVALUE ) */
4243
43 #endif
44 #endif /* !defined( _LIBFVALUE_INTERNAL_EXTERN_H ) */
4445
45 #endif
46
00 /*
11 * Filetime functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Filetime functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
5151 }
5252 #endif
5353
54 #endif
54 #endif /* !defined( _LIBFVALUE_FILETIME_H ) */
5555
00 /*
11 * Floating point value (IEEE 754) functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2121 #include <common.h>
2222 #include <byte_stream.h>
2323 #include <memory.h>
24 #include <narrow_string.h>
2425 #include <types.h>
2526
2627 #include "libfvalue_definitions.h"
2728 #include "libfvalue_floating_point.h"
2829 #include "libfvalue_libcerror.h"
29 #include "libfvalue_libcstring.h"
3030
3131 /* Creates a floating point
3232 * Make sure the value floating_point is referencing, is set to NULL
953953 {
954954 value_float32.integer = (uint32_t) floating_point_value;
955955
956 print_count = libcstring_narrow_string_snprintf(
956 print_count = narrow_string_snprintf(
957957 value_string,
958958 16,
959959 "%06e",
10251025 {
10261026 value_float64.integer = floating_point_value;
10271027
1028 print_count = libcstring_narrow_string_snprintf(
1028 print_count = narrow_string_snprintf(
10291029 value_string,
10301030 16,
10311031 "%06e",
13731373 {
13741374 value_float32.integer = (uint32_t) floating_point_value;
13751375
1376 print_count = libcstring_narrow_string_snprintf(
1376 print_count = narrow_string_snprintf(
13771377 value_string,
13781378 16,
13791379 "%06e",
14451445 {
14461446 value_float64.integer = floating_point_value;
14471447
1448 print_count = libcstring_narrow_string_snprintf(
1448 print_count = narrow_string_snprintf(
14491449 value_string,
14501450 16,
14511451 "%06e",
22362236 {
22372237 value_float32.integer = (uint32_t) floating_point_value;
22382238
2239 print_count = libcstring_narrow_string_snprintf(
2239 print_count = narrow_string_snprintf(
22402240 value_string,
22412241 16,
22422242 "%06e",
23082308 {
23092309 value_float64.integer = floating_point_value;
23102310
2311 print_count = libcstring_narrow_string_snprintf(
2311 print_count = narrow_string_snprintf(
23122312 value_string,
23132313 16,
23142314 "%06e",
30993099 {
31003100 value_float32.integer = (uint32_t) floating_point_value;
31013101
3102 print_count = libcstring_narrow_string_snprintf(
3102 print_count = narrow_string_snprintf(
31033103 value_string,
31043104 16,
31053105 "%06e",
31713171 {
31723172 value_float64.integer = floating_point_value;
31733173
3174 print_count = libcstring_narrow_string_snprintf(
3174 print_count = narrow_string_snprintf(
31753175 value_string,
31763176 16,
31773177 "%06e",
00 /*
11 * Floating point value (IEEE 754) functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
241241 }
242242 #endif
243243
244 #endif
245
244 #endif /* !defined( _LIBFVALUE_FLOATING_POINT_H ) */
245
00 /*
11 * Integer value functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Integer value functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
256256 }
257257 #endif
258258
259 #endif
260
259 #endif /* !defined( _LIBFVALUE_INTEGER_H ) */
260
00 /*
11 * The internal libcdata header
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal libcerror header
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal libcnotify header
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
+0
-51
libfvalue/libfvalue_libcstring.h less more
0 /*
1 * The internal libcstring header
2 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBFVALUE_LIBCSTRING_H )
22 #define _LIBFVALUE_LIBCSTRING_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring
27 */
28 #if defined( HAVE_LOCAL_LIBCSTRING )
29
30 #include <libcstring_definitions.h>
31 #include <libcstring_narrow_string.h>
32 #include <libcstring_system_string.h>
33 #include <libcstring_types.h>
34 #include <libcstring_wide_string.h>
35
36 #else
37
38 /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT
39 * before including libcstring.h
40 */
41 #if defined( _WIN32 ) && defined( DLL_IMPORT )
42 #define LIBCSTRING_DLL_IMPORT
43 #endif
44
45 #include <libcstring.h>
46
47 #endif /* defined( HAVE_LOCAL_LIBCSTRING ) */
48
49 #endif /* !defined( _LIBFVALUE_LIBCSTRING_H ) */
50
00 /*
11 * The libfdatetime header wrapper
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The libfguid header wrapper
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The libfwnt header wrapper
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The libuna header wrapper
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * This software is free software: you can redistribute it and/or modify
66 * it under the terms of the GNU Lesser General Public License as published by
00 /*
11 * Split string functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2323 #include <types.h>
2424
2525 #include "libfvalue_libcerror.h"
26 #include "libfvalue_libcstring.h"
2726 #include "libfvalue_split_string.h"
2827 #include "libfvalue_types.h"
2928
00 /*
11 * Split string functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
168168 }
169169 #endif
170170
171 #endif
171 #endif /* !defined( _LIBFVALUE_INTERNAL_SPLIT_STRING_H ) */
172172
00 /*
11 * String value functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2626 #include "libfvalue_definitions.h"
2727 #include "libfvalue_libcerror.h"
2828 #include "libfvalue_libcnotify.h"
29 #include "libfvalue_libcstring.h"
3029 #include "libfvalue_libuna.h"
3130 #include "libfvalue_split_string.h"
3231 #include "libfvalue_string.h"
00 /*
11 * String value functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4242 }
4343 #endif
4444
45 #endif
45 #endif /* !defined( _LIBFVALUE_SUPPORT_H ) */
4646
00 /*
11 * Values table functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2020
2121 #include <common.h>
2222 #include <memory.h>
23 #include <narrow_string.h>
2324 #include <types.h>
2425
2526 #include "libfvalue_codepage.h"
2627 #include "libfvalue_definitions.h"
2728 #include "libfvalue_libcdata.h"
2829 #include "libfvalue_libcerror.h"
29 #include "libfvalue_libcstring.h"
3030 #include "libfvalue_table.h"
3131 #include "libfvalue_types.h"
3232 #include "libfvalue_value.h"
10751075 {
10761076 if( ( xml_tag_type == LIBFVALUE_XML_TAG_TYPE_OPEN )
10771077 && ( xml_tag_name_length == table_name_length )
1078 && ( libcstring_narrow_string_compare(
1078 && ( narrow_string_compare(
10791079 table_name,
10801080 xml_tag_name,
10811081 xml_tag_name_length ) == 0 ) )
10881088 {
10891089 if( ( xml_tag_type == LIBFVALUE_XML_TAG_TYPE_CLOSE )
10901090 && ( xml_tag_name_length == xml_table_name_length )
1091 && ( libcstring_narrow_string_compare(
1091 && ( narrow_string_compare(
10921092 xml_table_name,
10931093 xml_tag_name,
10941094 xml_tag_name_length ) == 0 ) )
11391139 {
11401140 if( ( xml_tag_type == LIBFVALUE_XML_TAG_TYPE_CLOSE )
11411141 && ( xml_tag_name_length == value_identifier_length )
1142 && ( libcstring_narrow_string_compare(
1142 && ( narrow_string_compare(
11431143 value_identifier,
11441144 xml_tag_name,
11451145 xml_tag_name_length ) == 0 ) )
00 /*
11 * Values table functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
131131 }
132132 #endif
133133
134 #endif
134 #endif /* !defined( _LIBFVALUE_INTERNAL_TABLE_H ) */
135135
00 /*
11 * The internal type definitions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal unused definition
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Value functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2121 #include <common.h>
2222 #include <file_stream.h>
2323 #include <memory.h>
24 #include <narrow_string.h>
25 #include <system_string.h>
2426 #include <types.h>
27 #include <wide_string.h>
2528
2629 #include "libfvalue_data_handle.h"
2730 #include "libfvalue_definitions.h"
2831 #include "libfvalue_libcdata.h"
2932 #include "libfvalue_libcerror.h"
3033 #include "libfvalue_libcnotify.h"
31 #include "libfvalue_libcstring.h"
3234 #include "libfvalue_types.h"
3335 #include "libfvalue_value.h"
3436
49574959 uint8_t flags,
49584960 libcerror_error_t **error )
49594961 {
4960 libfvalue_internal_value_t *internal_value = NULL;
4961 libcstring_system_character_t *value_string = NULL;
4962 intptr_t *value_instance = NULL;
4963 static char *function = "libfvalue_value_print";
4964 size_t value_string_index = 0;
4965 size_t value_string_size = 0;
4966 int result = 0;
4962 libfvalue_internal_value_t *internal_value = NULL;
4963 system_character_t *value_string = NULL;
4964 intptr_t *value_instance = NULL;
4965 static char *function = "libfvalue_value_print";
4966 size_t value_string_index = 0;
4967 size_t value_string_size = 0;
4968 int result = 0;
49674969
49684970 if( value == NULL )
49694971 {
49894991
49904992 return( -1 );
49914993 }
4992 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
4994 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
49934995 if( internal_value->get_utf16_string_size == NULL )
49944996 #else
49954997 if( internal_value->get_utf8_string_size == NULL )
50045006
50055007 return( -1 );
50065008 }
5007 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
5009 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
50085010 if( internal_value->copy_to_utf16_string_with_index == NULL )
50095011 #else
50105012 if( internal_value->copy_to_utf8_string_with_index == NULL )
50725074 }
50735075 if( value_instance != NULL )
50745076 {
5075 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
5077 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
50765078 result = internal_value->get_utf16_string_size(
50775079 value_instance,
50785080 &value_string_size,
50985100 }
50995101 if( value_string_size > 0 )
51005102 {
5101 value_string = libcstring_system_string_allocate(
5103 value_string = system_string_allocate(
51025104 value_string_size );
51035105
51045106 if( value_string == NULL )
51125114
51135115 goto on_error;
51145116 }
5115 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
5117 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
51165118 result = internal_value->copy_to_utf16_string_with_index(
51175119 value_instance,
51185120 (uint16_t *) value_string,
51415143 goto on_error;
51425144 }
51435145 libcnotify_printf(
5144 "%" PRIs_LIBCSTRING_SYSTEM "",
5146 "%" PRIs_SYSTEM "",
51455147 value_string );
51465148
51475149 memory_free(
00 /*
11 * Value functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
748748 }
749749 #endif
750750
751 #endif
752
751 #endif /* !defined( _LIBFVALUE_INTERNAL_VALUE_H ) */
752
00 /*
11 * Value entry functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Value entry functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
6060 }
6161 #endif
6262
63 #endif
63 #endif /* !defined( _LIBFVALUE_VALUE_ENTRY_H ) */
6464
00 /*
11 * Value functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Value type functions
22 *
3 * Copyright (C) 2010-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2010-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
8383 }
8484 #endif
8585
86 #endif
86 #endif /* !defined( _LIBFVALUE_INTERNAL_VALUE_TYPE_H ) */
8787
11 AM_CPPFLAGS = \
22 -I$(top_srcdir)/include \
33 -I$(top_srcdir)/common \
4 @LIBCSTRING_CPPFLAGS@ \
54 @LIBCERROR_CPPFLAGS@ \
65 @LIBCTHREADS_CPPFLAGS@ \
76 @LIBCDATA_CPPFLAGS@ \
2120 libfwnt_libcerror.h \
2221 libfwnt_libcdata.h \
2322 libfwnt_libcnotify.h \
24 libfwnt_libcstring.h \
2523 libfwnt_locale_identifier.c libfwnt_locale_identifier.h \
2624 libfwnt_lznt1.c libfwnt_lznt1.h \
2725 libfwnt_lzxpress.c libfwnt_lzxpress.h \
9797 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9898 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9999 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101100 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102101 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103102 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
108107 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109108 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110109 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
110 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
111 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
113112 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114113 $(ACLOCAL_M4)
115114 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
125124 libfwnt_bit_stream.h libfwnt_debug.c libfwnt_debug.h \
126125 libfwnt_definitions.h libfwnt_extern.h libfwnt_error.c \
127126 libfwnt_error.h libfwnt_libcerror.h libfwnt_libcdata.h \
128 libfwnt_libcnotify.h libfwnt_libcstring.h \
129 libfwnt_locale_identifier.c libfwnt_locale_identifier.h \
130 libfwnt_lznt1.c libfwnt_lznt1.h libfwnt_lzxpress.c \
131 libfwnt_lzxpress.h libfwnt_security_descriptor.c \
132 libfwnt_security_descriptor.h libfwnt_security_identifier.c \
133 libfwnt_security_identifier.h libfwnt_support.c \
134 libfwnt_support.h libfwnt_types.h libfwnt_unused.h
127 libfwnt_libcnotify.h libfwnt_locale_identifier.c \
128 libfwnt_locale_identifier.h libfwnt_lznt1.c libfwnt_lznt1.h \
129 libfwnt_lzxpress.c libfwnt_lzxpress.h \
130 libfwnt_security_descriptor.c libfwnt_security_descriptor.h \
131 libfwnt_security_identifier.c libfwnt_security_identifier.h \
132 libfwnt_support.c libfwnt_support.h libfwnt_types.h \
133 libfwnt_unused.h
135134 @HAVE_LOCAL_LIBFWNT_TRUE@am_libfwnt_la_OBJECTS = \
136135 @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_access_control_entry.lo \
137136 @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_access_control_list.lo \
251250 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
252251 HAVE_LIBCPATH = @HAVE_LIBCPATH@
253252 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
254 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
255 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
256253 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
257254 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
258255 HAVE_LIBFDATA = @HAVE_LIBFDATA@
271268 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
272269 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
273270 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
274 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
275 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
276271 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
277272 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
278273 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
319314 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
320315 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
321316 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
322 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
323 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
324 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
325 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
326317 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
327318 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
328319 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
355346 LTLIBICONV = @LTLIBICONV@
356347 LTLIBINTL = @LTLIBINTL@
357348 LTLIBOBJS = @LTLIBOBJS@
349 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
358350 MAKEINFO = @MAKEINFO@
359351 MANIFEST_TOOL = @MANIFEST_TOOL@
360352 MKDIR_P = @MKDIR_P@
461453 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
462454 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
463455 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
464 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
465 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
466 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
467 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
468 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
469 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
470456 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
471457 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
472458 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
535521 libcpath_LIBS = @libcpath_LIBS@
536522 libcsplit_CFLAGS = @libcsplit_CFLAGS@
537523 libcsplit_LIBS = @libcsplit_LIBS@
538 libcstring_CFLAGS = @libcstring_CFLAGS@
539 libcstring_LIBS = @libcstring_LIBS@
540 libcsystem_CFLAGS = @libcsystem_CFLAGS@
541 libcsystem_LIBS = @libcsystem_LIBS@
542524 libcthreads_CFLAGS = @libcthreads_CFLAGS@
543525 libcthreads_LIBS = @libcthreads_LIBS@
544526 libdir = @libdir@
590572 @HAVE_LOCAL_LIBFWNT_TRUE@AM_CPPFLAGS = \
591573 @HAVE_LOCAL_LIBFWNT_TRUE@ -I$(top_srcdir)/include \
592574 @HAVE_LOCAL_LIBFWNT_TRUE@ -I$(top_srcdir)/common \
593 @HAVE_LOCAL_LIBFWNT_TRUE@ @LIBCSTRING_CPPFLAGS@ \
594575 @HAVE_LOCAL_LIBFWNT_TRUE@ @LIBCERROR_CPPFLAGS@ \
595576 @HAVE_LOCAL_LIBFWNT_TRUE@ @LIBCTHREADS_CPPFLAGS@ \
596577 @HAVE_LOCAL_LIBFWNT_TRUE@ @LIBCDATA_CPPFLAGS@ \
609590 @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_libcerror.h \
610591 @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_libcdata.h \
611592 @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_libcnotify.h \
612 @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_libcstring.h \
613593 @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_locale_identifier.c libfwnt_locale_identifier.h \
614594 @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_lznt1.c libfwnt_lznt1.h \
615595 @HAVE_LOCAL_LIBFWNT_TRUE@ libfwnt_lzxpress.c libfwnt_lzxpress.h \
00 /*
11 * Windows NT Access Control Entry (ACE) functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2121 #include <common.h>
2222 #include <byte_stream.h>
2323 #include <memory.h>
24 #include <narrow_string.h>
25 #include <system_string.h>
2426 #include <types.h>
27 #include <wide_string.h>
2528
2629 #include "libfwnt_access_control_entry.h"
2730 #include "libfwnt_debug.h"
195198 size_t sid_offset = 0;
196199
197200 #if defined( HAVE_DEBUG_OUTPUT )
198 libcstring_system_character_t *sid_string = NULL;
201 system_character_t *sid_string = NULL;
199202 size_t sid_string_size = 0;
200203 int result = 0;
201204 #endif
463466
464467 if( sid_string_size > 0 )
465468 {
466 sid_string = libcstring_system_string_allocate(
469 sid_string = system_string_allocate(
467470 sid_string_size );
468471
469472 if( sid_string == NULL )
477480
478481 goto on_error;
479482 }
480 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
483 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
481484 result = libfwnt_security_identifier_copy_to_utf16_string(
482485 internal_access_control_entry->security_identifier,
483486 (uint16_t *) sid_string,
504507 goto on_error;
505508 }
506509 libcnotify_printf(
507 "%" PRIs_LIBCSTRING_SYSTEM "",
510 "%" PRIs_SYSTEM "",
508511 sid_string );
509512
510513 memory_free(
00 /*
11 * Windows NT Access Contol Entry (ACE) functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
7676 libfwnt_internal_access_control_entry_t **internal_access_control_entry,
7777 libcerror_error_t **error );
7878
79 LIBFWNT_EXTERN \
8079 int libfwnt_access_control_entry_copy_from_byte_stream(
8180 libfwnt_access_control_entry_t *access_control_entry,
8281 const uint8_t *byte_stream,
00 /*
11 * Windows NT Access Control List (ACL) functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Windows NT Access Contol List (ACL) functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
6464 libfwnt_internal_access_control_list_t **internal_access_control_list,
6565 libcerror_error_t **error );
6666
67 LIBFWNT_EXTERN \
6867 int libfwnt_access_control_list_copy_from_byte_stream(
6968 libfwnt_access_control_list_t *access_control_list,
7069 const uint8_t *byte_stream,
00 /*
11 * Bit stream functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Bit stream functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
7474 }
7575 #endif
7676
77 #endif
77 #endif /* !defined( _LIBFWNT_BIT_STREAM_H ) */
7878
00 /*
11 * Debug functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Debug functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal definitions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3535 #else
3636 #include <byte_stream.h>
3737
38 #define LIBFWNT_VERSION 20160429
38 #define LIBFWNT_VERSION 20170115
3939
4040 /* The version string
4141 */
42 #define LIBFWNT_VERSION_STRING "20160429"
42 #define LIBFWNT_VERSION_STRING "20170115"
4343
4444
4545 /* The endian definitions
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4343 libfwnt_error_t *error,
4444 FILE *stream )
4545 {
46 return( libcerror_error_fprint(
47 (libcerror_error_t *) error,
48 stream ) );
46 int print_count = 0;
47
48 print_count = libcerror_error_fprint(
49 (libcerror_error_t *) error,
50 stream );
51
52 return( print_count );
4953 }
5054
5155 /* Prints a descriptive string of the error to the string
5761 char *string,
5862 size_t size )
5963 {
60 return( libcerror_error_sprint(
61 (libcerror_error_t *) error,
62 string,
63 size ) );
64 int print_count = 0;
65
66 print_count = libcerror_error_sprint(
67 (libcerror_error_t *) error,
68 string,
69 size );
70
71 return( print_count );
6472 }
6573
6674 /* Prints a backtrace of the error to the stream
7078 libfwnt_error_t *error,
7179 FILE *stream )
7280 {
73 return( libcerror_error_backtrace_fprint(
74 (libcerror_error_t *) error,
75 stream ) );
81 int print_count = 0;
82
83 print_count = libcerror_error_backtrace_fprint(
84 (libcerror_error_t *) error,
85 stream );
86
87 return( print_count );
7688 }
7789
7890 /* Prints a backtrace of the error to the string
8496 char *string,
8597 size_t size )
8698 {
87 return( libcerror_error_backtrace_sprint(
88 (libcerror_error_t *) error,
89 string,
90 size ) );
99 int print_count = 0;
100
101 print_count = libcerror_error_backtrace_sprint(
102 (libcerror_error_t *) error,
103 string,
104 size );
105
106 return( print_count );
91107 }
92108
93109 #endif /* !defined( HAVE_LOCAL_LIBFWNT ) */
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal extern definition
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 #include <libfwnt/extern.h>
3838
3939 #else
40 #define LIBFWNT_EXTERN /* extern */
4041
41 #define LIBFWNT_EXTERN extern
42 #endif /* !defined( HAVE_LOCAL_LIBFWNT ) */
4243
43 #endif
44 #endif /* !defined( _LIBFWNT_INTERNAL_EXTERN_H ) */
4445
45 #endif
46
00 /*
11 * The internal libcdata header
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal libcerror header
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal libcnotify header
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
+0
-51
libfwnt/libfwnt_libcstring.h less more
0 /*
1 * The internal libcstring header
2 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBFWNT_LIBCSTRING_H )
22 #define _LIBFWNT_LIBCSTRING_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring
27 */
28 #if defined( HAVE_LOCAL_LIBCSTRING )
29
30 #include <libcstring_definitions.h>
31 #include <libcstring_narrow_string.h>
32 #include <libcstring_system_string.h>
33 #include <libcstring_types.h>
34 #include <libcstring_wide_string.h>
35
36 #else
37
38 /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT
39 * before including libcstring.h
40 */
41 #if defined( _WIN32 ) && defined( DLL_IMPORT )
42 #define LIBCSTRING_DLL_IMPORT
43 #endif
44
45 #include <libcstring.h>
46
47 #endif /* defined( HAVE_LOCAL_LIBCSTRING ) */
48
49 #endif /* !defined( _LIBFWNT_LIBCSTRING_H ) */
50
00 /*
11 * Locale identifier (LCID) functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Locale identifier (LCID) functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
5555 }
5656 #endif
5757
58 #endif
58 #endif /* !defined( _LIBFWNT_LOCALE_IDENTIFIER_H ) */
5959
00 /*
11 * LZNT1 (de)compression functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
9393 int libfwnt_lznt1_decompress_chunk(
9494 const uint8_t *compressed_data,
9595 size_t compressed_data_size,
96 size_t *compressed_data_index,
96 size_t *compressed_data_offset,
9797 size_t compression_chunk_size,
9898 uint8_t *uncompressed_data,
9999 size_t *uncompressed_data_size,
102102 static char *function = "libfwnt_lznt1_decompress_chunk";
103103 size_t compression_tuple_index = 0;
104104 size_t compression_tuple_threshold = 0;
105 size_t uncompressed_data_index = 0;
105 size_t uncompressed_data_offset = 0;
106106 uint16_t compression_tuple = 0;
107107 uint16_t compression_tuple_offset_shift = 0;
108108 uint16_t compression_tuple_size = 0;
133133
134134 return( -1 );
135135 }
136 if( compressed_data_index == NULL )
137 {
138 libcerror_error_set(
139 error,
140 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
141 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
142 "%s: invalid compressed data index.",
143 function );
144
145 return( -1 );
146 }
147 if( *compressed_data_index > compressed_data_size )
136 if( compressed_data_offset == NULL )
137 {
138 libcerror_error_set(
139 error,
140 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
141 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
142 "%s: invalid compressed data offset.",
143 function );
144
145 return( -1 );
146 }
147 if( *compressed_data_offset > compressed_data_size )
148148 {
149149 libcerror_error_set(
150150 error,
151151 LIBCERROR_ERROR_DOMAIN_RUNTIME,
152152 LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,
153 "%s: invalid compressed data index value out of bounds.",
153 "%s: invalid compressed data offset value out of bounds.",
154154 function );
155155
156156 return( -1 );
166166
167167 return( -1 );
168168 }
169 if( ( *compressed_data_index + compression_chunk_size ) > compressed_data_size )
169 if( ( *compressed_data_offset + compression_chunk_size ) > compressed_data_size )
170170 {
171171 libcerror_error_set(
172172 error,
205205
206206 while( compression_chunk_size > 0 )
207207 {
208 compression_flag_byte = compressed_data[ *compressed_data_index ];
208 compression_flag_byte = compressed_data[ *compressed_data_offset ];
209209
210210 #if defined( HAVE_DEBUG_OUTPUT )
211211 if( libcnotify_verbose != 0 )
212212 {
213213 libcnotify_printf(
214 "%s: compressed byte index\t\t\t: %" PRIzd " (0x%08" PRIzx ")\n",
215 function,
216 *compressed_data_index,
217 *compressed_data_index );
214 "%s: compressed data offset\t\t\t: %" PRIzd " (0x%08" PRIzx ")\n",
215 function,
216 *compressed_data_offset,
217 *compressed_data_offset );
218218
219219 libcnotify_printf(
220220 "%s: compression flag byte\t\t\t: 0x%02" PRIx8 "\n",
225225 "\n" );
226226 }
227227 #endif
228 *compressed_data_index += 1;
228 *compressed_data_offset += 1;
229229 compression_chunk_size -= 1;
230230
231231 for( compression_flag_bit_index = 0;
239239 /* Read the compression ( size, offset ) tuple
240240 */
241241 byte_stream_copy_to_uint16_little_endian(
242 &( compressed_data[ *compressed_data_index ] ),
242 &( compressed_data[ *compressed_data_offset ] ),
243243 compression_tuple );
244244
245245 compression_tuple_offset = ( compression_tuple >> compression_tuple_offset_shift ) + 1;
249249 if( libcnotify_verbose != 0 )
250250 {
251251 libcnotify_printf(
252 "%s: compressed byte index\t\t\t: %" PRIzd " (0x%08" PRIzx ")\n",
252 "%s: compressed data offset\t\t\t: %" PRIzd " (0x%08" PRIzx ")\n",
253253 function,
254 *compressed_data_index,
255 *compressed_data_index );
254 *compressed_data_offset,
255 *compressed_data_offset );
256256
257257 libcnotify_printf(
258258 "%s: compression tuple\t\t\t: 0x%04" PRIx16 " (shift: %" PRIu16 ", mask: 0x%04" PRIx16 ")\n",
272272 compression_tuple_size );
273273
274274 libcnotify_printf(
275 "%s: uncompressed data index\t\t\t: %" PRIzd "\n",
275 "%s: uncompressed data offset\t\t: %" PRIzd "\n",
276276 function,
277 uncompressed_data_index );
277 uncompressed_data_offset );
278278
279279 libcnotify_printf(
280280 "\n" );
281281 }
282282 #endif
283 *compressed_data_index += 2;
283 *compressed_data_offset += 2;
284284 compression_chunk_size -= 2;
285285
286286 /* The compression tuple offset refers to an offset in the uncompressed data
287287 */
288 if( (size_t) compression_tuple_offset > uncompressed_data_index )
288 if( (size_t) compression_tuple_offset > uncompressed_data_offset )
289289 {
290290 libcerror_error_set(
291291 error,
296296
297297 return( -1 );
298298 }
299 compression_tuple_index = uncompressed_data_index - compression_tuple_offset;
299 compression_tuple_index = uncompressed_data_offset - compression_tuple_offset;
300300
301301 while( compression_tuple_size > 0 )
302302 {
303 if( compression_tuple_index > uncompressed_data_index )
303 if( compression_tuple_index > uncompressed_data_offset )
304304 {
305305 libcerror_error_set(
306306 error,
311311
312312 return( -1 );
313313 }
314 if( uncompressed_data_index > *uncompressed_data_size )
314 if( uncompressed_data_offset > *uncompressed_data_size )
315315 {
316316 libcerror_error_set(
317317 error,
322322
323323 return( -1 );
324324 }
325 uncompressed_data[ uncompressed_data_index++ ] = uncompressed_data[ compression_tuple_index++ ];
325 uncompressed_data[ uncompressed_data_offset++ ] = uncompressed_data[ compression_tuple_index++ ];
326326
327327 compression_tuple_size -= 1;
328328 }
329329 }
330330 else
331331 {
332 if( uncompressed_data_index > *uncompressed_data_size )
332 if( uncompressed_data_offset > *uncompressed_data_size )
333333 {
334334 libcerror_error_set(
335335 error,
340340
341341 return( -1 );
342342 }
343 uncompressed_data[ uncompressed_data_index++ ] = compressed_data[ *compressed_data_index ];
344
345 *compressed_data_index += 1;
343 uncompressed_data[ uncompressed_data_offset++ ] = compressed_data[ *compressed_data_offset ];
344
345 *compressed_data_offset += 1;
346346 compression_chunk_size -= 1;
347347 }
348348 compression_flag_byte >>= 1;
354354 /* The compression tuple size mask and offset shift
355355 * are dependent on the current buffer offset in the uncompressed data
356356 */
357 while( uncompressed_data_index > compression_tuple_threshold )
357 while( uncompressed_data_offset > compression_tuple_threshold )
358358 {
359359 compression_tuple_offset_shift -= 1;
360360 compression_tuple_size_mask >>= 1;
362362 }
363363 }
364364 }
365 *uncompressed_data_size = uncompressed_data_index;
365 *uncompressed_data_size = uncompressed_data_offset;
366366
367367 return( 1 );
368368 }
378378 libcerror_error_t **error )
379379 {
380380 static char *function = "libfwnt_lznt1_decompress";
381 size_t compressed_data_index = 0;
381 size_t compressed_data_offset = 0;
382382 size_t uncompressed_chunk_size = 0;
383 size_t uncompressed_data_index = 0;
383 size_t uncompressed_data_offset = 0;
384384 uint16_t compression_chunk_header = 0;
385385 uint16_t compression_chunk_size = 0;
386386
428428
429429 return( -1 );
430430 }
431 while( compressed_data_index < compressed_data_size )
432 {
433 if( ( compressed_data_index + 1 ) >= compressed_data_size )
431 while( compressed_data_offset < compressed_data_size )
432 {
433 if( uncompressed_data_offset >= *uncompressed_data_size )
434 {
435 break;
436 }
437 if( ( compressed_data_offset + 1 ) >= compressed_data_size )
434438 {
435439 libcerror_error_set(
436440 error,
447451 * 15 is compressed flag
448452 */
449453 byte_stream_copy_to_uint16_little_endian(
450 &( compressed_data[ compressed_data_index ] ),
454 &( compressed_data[ compressed_data_offset ] ),
451455 compression_chunk_header );
452456
453457 #if defined( HAVE_DEBUG_OUTPUT )
454458 if( libcnotify_verbose != 0 )
455459 {
456460 libcnotify_printf(
457 "%s: compressed byte index\t\t\t\t: %" PRIzd " (0x%08" PRIzx ")\n",
458 function,
459 compressed_data_index,
460 compressed_data_index );
461 "%s: compressed data offset\t\t\t\t: %" PRIzd " (0x%08" PRIzx ")\n",
462 function,
463 compressed_data_offset,
464 compressed_data_offset );
461465
462466 libcnotify_printf(
463467 "%s: compression chunk header\t\t\t: 0x%04" PRIx16 "\n",
483487 "\n" );
484488 }
485489 #endif
486 compressed_data_index += 2;
490 compressed_data_offset += 2;
487491
488492 if( compression_chunk_header == 0 )
489493 {
495499 {
496500 /* Adjust the compression chunk size for the iteration
497501 */
498 // compression_chunk_size += 2;
499
500 uncompressed_chunk_size = *uncompressed_data_size - uncompressed_data_index;
502 uncompressed_chunk_size = *uncompressed_data_size - uncompressed_data_offset;
501503
502504 if( libfwnt_lznt1_decompress_chunk(
503505 compressed_data,
504506 compressed_data_size,
505 &compressed_data_index,
507 &compressed_data_offset,
506508 compression_chunk_size,
507 &( uncompressed_data[ uncompressed_data_index ] ),
509 &( uncompressed_data[ uncompressed_data_offset ] ),
508510 &uncompressed_chunk_size,
509511 error ) != 1 )
510512 {
517519
518520 return( -1 );
519521 }
520 uncompressed_data_index += uncompressed_chunk_size;
522 uncompressed_data_offset += uncompressed_chunk_size;
521523 }
522524 else
523525 {
524 if( ( compressed_data_index + compression_chunk_size ) > compressed_data_size )
526 if( ( compressed_data_offset + compression_chunk_size ) > compressed_data_size )
525527 {
526528 libcerror_error_set(
527529 error,
532534
533535 return( -1 );
534536 }
535 if( ( uncompressed_data_index + compression_chunk_size ) > *uncompressed_data_size )
537 if( ( uncompressed_data_offset + compression_chunk_size ) > *uncompressed_data_size )
536538 {
537539 libcerror_error_set(
538540 error,
544546 return( -1 );
545547 }
546548 if( memory_copy(
547 &( uncompressed_data[ uncompressed_data_index ] ),
548 &( compressed_data[ compressed_data_index ] ),
549 &( uncompressed_data[ uncompressed_data_offset ] ),
550 &( compressed_data[ compressed_data_offset ] ),
549551 compression_chunk_size ) == NULL )
550552 {
551553 libcerror_error_set(
557559
558560 return( -1 );
559561 }
560 compressed_data_index += (size_t) compression_chunk_size;
561 uncompressed_data_index += (size_t) compression_chunk_size;
562 }
563 }
564 *uncompressed_data_size = uncompressed_data_index;
562 compressed_data_offset += (size_t) compression_chunk_size;
563 uncompressed_data_offset += (size_t) compression_chunk_size;
564 }
565 }
566 *uncompressed_data_size = uncompressed_data_offset;
565567
566568 return( 1 );
567569 }
00 /*
11 * LZNT1 (de)compression functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4242 int libfwnt_lznt1_decompress_chunk(
4343 const uint8_t *compressed_data,
4444 size_t compressed_data_size,
45 size_t *compressed_data_index,
45 size_t *compressed_data_offset,
4646 size_t compression_chunk_size,
4747 uint8_t *uncompressed_data,
4848 size_t *uncompressed_data_size,
6060 }
6161 #endif
6262
63 #endif
63 #endif /* !defined( _LIBFWNT_LZNT1_H ) */
6464
00 /*
11 * LZXPRESS (de)compression functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2828 #include "libfwnt_libcnotify.h"
2929 #include "libfwnt_lzxpress.h"
3030
31 /* Determines the uncompressed data size from the LZXPRESS (LZ77 + DIRECT2) compressed data
32 * Return 1 on success or -1 on error
33 */
34 int libfwnt_lzxpress_get_uncompressed_data_size(
35 const uint8_t *compressed_data,
36 size_t compressed_data_size,
37 size_t *uncompressed_data_size,
38 libcerror_error_t **error )
39 {
40 static char *function = "libfwnt_lzxpress_get_uncompressed_data_size";
41
42 if( compressed_data == NULL )
43 {
44 libcerror_error_set(
45 error,
46 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
47 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
48 "%s: invalid compressed data.",
49 function );
50
51 return( -1 );
52 }
53 if( compressed_data_size > (size_t) SSIZE_MAX )
54 {
55 libcerror_error_set(
56 error,
57 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
58 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
59 "%s: invalid compressed data size value exceeds maximum.",
60 function );
61
62 return( -1 );
63 }
64 if( uncompressed_data_size == NULL )
65 {
66 libcerror_error_set(
67 error,
68 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
69 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
70 "%s: invalid uncompressed data size.",
71 function );
72
73 return( -1 );
74 }
75 if( compressed_data_size <= 1 )
76 {
77 libcerror_error_set(
78 error,
79 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
80 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
81 "%s: compressed data size value too small.",
82 function );
83
84 return( -1 );
85 }
86 /* The uncompressed data size is: ( ( compressed data size - 1 ) * 2 ) + 2
87 * The first byte in the compressed data contains a bitmask no data.
88 * Every other compressed byte is uncompressed as an UTF-16 little-endian
89 * character. An additional end of string characters is added.
90 */
91 *uncompressed_data_size = compressed_data_size * 2;
92
93 return( 1 );
94 }
95
9631 /* Compresses data using LZXPRESS (LZ77 + DIRECT2) compression
9732 * Returns 1 on success or -1 on error
9833 */
16499 libcerror_error_t **error )
165100 {
166101 static char *function = "libfwnt_lzxpress_decompress";
167 size_t compressed_data_index = 0;
102 size_t compressed_data_offset = 0;
168103 size_t compression_index = 0;
169104 size_t compression_shared_byte_index = 0;
170 size_t uncompressed_data_index = 0;
105 size_t uncompressed_data_offset = 0;
171106 uint32_t compression_indicator = 0;
172107 uint32_t compression_indicator_bitmask = 0;
173 uint16_t compression_size = 0;
174108 uint16_t compression_tuple = 0;
175 int16_t compression_offset = 0;
109 uint16_t compression_tuple_size = 0;
110 int16_t compression_tuple_offset = 0;
176111
177112 if( compressed_data == NULL )
178113 {
229164
230165 return( -1 );
231166 }
232 if( *uncompressed_data_size < ( 2 * compressed_data_size ) )
233 {
234 libcerror_error_set(
235 error,
236 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
237 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
238 "%s: uncompressed data size value too small.",
239 function );
240
241 return( -1 );
242 }
243 while( compressed_data_index < compressed_data_size )
244 {
167 while( compressed_data_offset < compressed_data_size )
168 {
169 if( uncompressed_data_offset >= *uncompressed_data_size )
170 {
171 break;
172 }
245173 byte_stream_copy_to_uint32_little_endian(
246 &( compressed_data[ compressed_data_index ] ),
174 &( compressed_data[ compressed_data_offset ] ),
247175 compression_indicator );
248176
249 compressed_data_index += 4;
177 #if defined( HAVE_DEBUG_OUTPUT )
178 if( libcnotify_verbose != 0 )
179 {
180 libcnotify_printf(
181 "%s: compressed data offset\t\t\t: %" PRIzd " (0x%08" PRIzx ")\n",
182 function,
183 compressed_data_offset,
184 compressed_data_offset );
185
186 libcnotify_printf(
187 "%s: compression indicator\t\t\t: 0x%08" PRIx32 "\n",
188 function,
189 compression_indicator );
190
191 libcnotify_printf(
192 "\n" );
193 }
194 #endif
195 compressed_data_offset += 4;
250196
251197 for( compression_indicator_bitmask = 0x80000000UL;
252198 compression_indicator_bitmask > 0;
253199 compression_indicator_bitmask >>= 1 )
254200 {
255 if( compressed_data_index >= compressed_data_size )
201 if( uncompressed_data_offset >= *uncompressed_data_size )
202 {
203 break;
204 }
205 if( compressed_data_offset >= compressed_data_size )
256206 {
257207 break;
258208 }
261211 */
262212 if( ( compression_indicator & compression_indicator_bitmask ) != 0 )
263213 {
264 if( compressed_data_index >= ( compressed_data_size - 1 ) )
214 if( compressed_data_offset >= ( compressed_data_size - 1 ) )
265215 {
266216 libcerror_error_set(
267217 error,
270220 "%s: compressed data too small.",
271221 function );
272222
273 *uncompressed_data_size = uncompressed_data_index;
274
275223 return( -1 );
276224 }
277225 byte_stream_copy_to_uint16_little_endian(
278 &( compressed_data[ compressed_data_index ] ),
226 &( compressed_data[ compressed_data_offset ] ),
279227 compression_tuple );
280228
281 compressed_data_index += 2;
229 compressed_data_offset += 2;
282230
283231 /* The compression tuple contains:
284232 * 0 - 2 the size
285233 * 3 - 15 the offset - 1
286234 */
287 compression_size = ( compression_tuple & 0x0007 );
288 compression_offset = ( compression_tuple >> 3 ) + 1;
235 compression_tuple_size = ( compression_tuple & 0x0007 );
236 compression_tuple_offset = ( compression_tuple >> 3 ) + 1;
289237
290238 /* Check for a first level extended size
291 * stored in the 4-bits of a shared extended compression size byte
239 * stored in the 4-bits of a shared extended compression tuple size byte
292240 * the size is added to the previous size
293241 */
294 if( compression_size == 0x07 )
242 if( compression_tuple_size == 0x07 )
295243 {
296244 if( compression_shared_byte_index == 0 )
297245 {
298 if( compressed_data_index >= compressed_data_size )
246 if( compressed_data_offset >= compressed_data_size )
299247 {
300248 libcerror_error_set(
301249 error,
304252 "%s: compressed data too small.",
305253 function );
306254
307 *uncompressed_data_size = uncompressed_data_index;
308
309255 return( -1 );
310256 }
311 compression_size += compressed_data[ compressed_data_index ] & 0x0f;
312
313 compression_shared_byte_index = compressed_data_index++;
257 compression_tuple_size += compressed_data[ compressed_data_offset ] & 0x0f;
258
259 compression_shared_byte_index = compressed_data_offset++;
314260 }
315261 else
316262 {
317 compression_size += compressed_data[ compression_shared_byte_index ] >> 4;
263 compression_tuple_size += compressed_data[ compression_shared_byte_index ] >> 4;
318264
319265 compression_shared_byte_index = 0;
320266 }
323269 * stored in the 8-bits of the next byte
324270 * the size is added to the previous size
325271 */
326 if( compression_size == ( 0x07 + 0x0f ) )
272 if( compression_tuple_size == ( 0x07 + 0x0f ) )
327273 {
328 if( compressed_data_index >= compressed_data_size )
274 if( compressed_data_offset >= compressed_data_size )
329275 {
330276 libcerror_error_set(
331277 error,
334280 "%s: compressed data too small.",
335281 function );
336282
337 *uncompressed_data_size = uncompressed_data_index;
338
339283 return( -1 );
340284 }
341 compression_size += compressed_data[ compressed_data_index++ ];
285 compression_tuple_size += compressed_data[ compressed_data_offset++ ];
342286 }
343287 /* Check for a third level extended size
344288 * stored in the 16-bits of the next two bytes
345289 * the previous size is ignored
346290 */
347 if( compression_size == ( 0x07 + 0x0f + 0xff ) )
291 if( compression_tuple_size == ( 0x07 + 0x0f + 0xff ) )
348292 {
349 if( compressed_data_index >= ( compressed_data_size - 1 ) )
293 if( compressed_data_offset >= ( compressed_data_size - 1 ) )
350294 {
351295 libcerror_error_set(
352296 error,
355299 "%s: compressed data too small.",
356300 function );
357301
358 *uncompressed_data_size = uncompressed_data_index;
359
360302 return( -1 );
361303 }
362304 byte_stream_copy_to_uint16_little_endian(
363 &( compressed_data[ compressed_data_index ] ),
364 compression_size );
305 &( compressed_data[ compressed_data_offset ] ),
306 compression_tuple_size );
365307
366 compressed_data_index += 2;
308 compressed_data_offset += 2;
367309
368310 }
369311 /* The size value is stored as
370312 * size - 3
371313 */
372 compression_size += 3;
373
374 if( compression_size > 32771 )
314 compression_tuple_size += 3;
315
316 #if defined( HAVE_DEBUG_OUTPUT )
317 if( libcnotify_verbose != 0 )
318 {
319 libcnotify_printf(
320 "%s: compressed data offset\t\t\t: %" PRIzd " (0x%08" PRIzx ")\n",
321 function,
322 compressed_data_offset,
323 compressed_data_offset );
324
325 libcnotify_printf(
326 "%s: compression tuple offset\t\t\t: %" PRIi16 "\n",
327 function,
328 compression_tuple_offset );
329
330 libcnotify_printf(
331 "%s: compression tuple size\t\t\t: %" PRIu16 "\n",
332 function,
333 compression_tuple_size );
334
335 libcnotify_printf(
336 "%s: uncompressed data offset\t\t\t: %" PRIzd "\n",
337 function,
338 uncompressed_data_offset );
339
340 libcnotify_printf(
341 "\n" );
342 }
343 #endif
344 if( compression_tuple_size > 32771 )
375345 {
376346 libcerror_error_set(
377347 error,
378348 LIBCERROR_ERROR_DOMAIN_RUNTIME,
379349 LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,
380 "%s: compression size value out of bounds.",
350 "%s: compression tuple size value out of bounds.",
381351 function );
382
383 *uncompressed_data_size = uncompressed_data_index;
384352
385353 return( -1 );
386354 }
387 compression_index = uncompressed_data_index - compression_offset;
388
389 while( compression_size > 0 )
355 compression_index = uncompressed_data_offset - compression_tuple_offset;
356
357 while( compression_tuple_size > 0 )
390358 {
391 if( compression_index > uncompressed_data_index )
359 if( compression_index > uncompressed_data_offset )
392360 {
393361 libcerror_error_set(
394362 error,
396364 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
397365 "%s: invalid compressed data at offset: %" PRIzd " - compression index: %" PRIzd " out of range: %" PRIzd ".",
398366 function,
399 compressed_data_index,
367 compressed_data_offset,
400368 compression_index,
401 uncompressed_data_index );
402
403 *uncompressed_data_size = uncompressed_data_index;
369 uncompressed_data_offset );
404370
405371 return( -1 );
406372 }
407 if( uncompressed_data_index > *uncompressed_data_size )
373 if( uncompressed_data_offset > *uncompressed_data_size )
408374 {
409375 libcerror_error_set(
410376 error,
413379 "%s: uncompressed data too small.",
414380 function );
415381
416 *uncompressed_data_size = uncompressed_data_index;
417
418382 return( -1 );
419383 }
420 uncompressed_data[ uncompressed_data_index++ ] = uncompressed_data[ compression_index++ ];
421
422 compression_size--;
384 uncompressed_data[ uncompressed_data_offset++ ] = uncompressed_data[ compression_index++ ];
385
386 compression_tuple_size--;
423387 }
424388 }
425389 else
426390 {
427 if( compressed_data_index >= compressed_data_size )
391 if( compressed_data_offset >= compressed_data_size )
428392 {
429393 libcerror_error_set(
430394 error,
433397 "%s: compressed data too small.",
434398 function );
435399
436 *uncompressed_data_size = uncompressed_data_index;
437
438400 return( -1 );
439401 }
440 if( uncompressed_data_index > *uncompressed_data_size )
402 if( uncompressed_data_offset > *uncompressed_data_size )
441403 {
442404 libcerror_error_set(
443405 error,
446408 "%s: uncompressed data too small.",
447409 function );
448410
449 *uncompressed_data_size = uncompressed_data_index;
450
451411 return( -1 );
452412 }
453 uncompressed_data[ uncompressed_data_index++ ] = compressed_data[ compressed_data_index++ ];
413 uncompressed_data[ uncompressed_data_offset++ ] = compressed_data[ compressed_data_offset++ ];
454414 }
455415 }
456416 }
457 *uncompressed_data_size = uncompressed_data_index;
417 *uncompressed_data_size = uncompressed_data_offset;
458418
459419 return( 1 );
460420 }
497457 * Returns 1 on success or -1 on error
498458 */
499459 int libfwnt_lzxpress_huffman_tree_add_leaf(
500 libfwnt_lzxpress_huffman_tree_node_t tree_nodes[ 1024 ],
460 libfwnt_lzxpress_huffman_tree_node_t *tree_nodes,
501461 int tree_node_index,
502462 uint32_t bits,
503463 uint8_t number_of_bits )
520480 tree_node->sub_tree_nodes[ sub_tree_node_index ] = &( tree_nodes[ next_tree_node_index ] );
521481 tree_nodes[ next_tree_node_index ].is_leaf = 0;
522482
483 #if defined( HAVE_DEBUG_OUTPUT )
484 tree_node->sub_tree_node_indexes[ sub_tree_node_index ] = next_tree_node_index;
485 #endif
486
523487 next_tree_node_index++;
524488 }
525489 tree_node = tree_node->sub_tree_nodes[ sub_tree_node_index ];
526490 }
491 /* TODO store index instead of pointer ? */
527492 tree_node->sub_tree_nodes[ bits & 0x00000001UL ] = &( tree_nodes[ tree_node_index ] );
493
494 #if defined( HAVE_DEBUG_OUTPUT )
495 tree_node->sub_tree_node_indexes[ bits & 0x00000001UL ] = tree_node_index;
496 #endif
528497
529498 return( next_tree_node_index );
530499 }
533502 * Returns 1 on success or -1 on error
534503 */
535504 int libfwnt_lzxpress_huffman_tree_read(
536 libfwnt_lzxpress_huffman_tree_node_t tree_nodes[ 1024 ],
505 libfwnt_lzxpress_huffman_tree_node_t *tree_nodes,
537506 const uint8_t *compressed_data,
538507 size_t compressed_data_size,
539 size_t compressed_data_index,
508 size_t compressed_data_offset,
540509 libcerror_error_t **error )
541510 {
542511 libfwnt_lzxpress_huffman_code_symbol_t code_symbols[ 512 ];
571540
572541 return( -1 );
573542 }
574 if( ( compressed_data_index >= compressed_data_size )
575 || ( ( compressed_data_size - compressed_data_index ) < 256 ) )
543 if( ( compressed_data_offset >= compressed_data_size )
544 || ( ( compressed_data_size - compressed_data_offset ) < 256 ) )
576545 {
577546 libcerror_error_set(
578547 error,
579548 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
580549 LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,
581 "%s: compressed data index value out of bounds.",
550 "%s: compressed data offset value out of bounds.",
582551 function );
583552
584553 return( -1 );
597566
598567 return( -1 );
599568 }
569 /* The initial table contains a 4-bits code size per symbol
570 */
600571 for( byte_index = 0;
601572 byte_index < 256;
602573 byte_index++ )
603574 {
604 byte_value = compressed_data[ compressed_data_index ];
605
606 compressed_data_index++;
575 byte_value = compressed_data[ compressed_data_offset++ ];
607576
608577 code_symbols[ symbol_index ].symbol = symbol_index;
609578 code_symbols[ symbol_index ].code_size = (uint16_t) ( byte_value & 0x0f );
628597 /* Find the first symbol with a code size > 0
629598 */
630599 for( symbol_index = 0;
631 symbol_index < 512;
600 symbol_index < 512;
632601 symbol_index++ )
633602 {
634603 if( code_symbols[ symbol_index ].code_size > 0 )
658627 number_of_bits );
659628
660629 bits++;
661
662630 symbol_index++;
663631 }
632 #if defined( HAVE_DEBUG_OUTPUT )
633 if( libcnotify_verbose != 0 )
634 {
635 for( tree_node_index = 0;
636 tree_node_index < 1024;
637 tree_node_index++ )
638 {
639 libcnotify_printf(
640 "%s: tree node: %04d symbol\t\t: 0x%04" PRIx16 "\n",
641 function,
642 tree_node_index,
643 tree_nodes[ tree_node_index ].symbol );
644
645 libcnotify_printf(
646 "%s: tree node: %04d is leaf\t\t: %" PRId8 "\n",
647 function,
648 tree_node_index,
649 tree_nodes[ tree_node_index ].is_leaf );
650
651 libcnotify_printf(
652 "%s: tree node: %04d sub node: 0\t\t: %" PRId16 "\n",
653 function,
654 tree_node_index,
655 tree_nodes[ tree_node_index ].sub_tree_node_indexes[ 0 ] );
656
657 libcnotify_printf(
658 "%s: tree node: %04d sub node: 1\t\t: %" PRId16 "\n",
659 function,
660 tree_node_index,
661 tree_nodes[ tree_node_index ].sub_tree_node_indexes[ 1 ] );
662 }
663 libcnotify_printf(
664 "\n" );
665
666 for( symbol_index = 0;
667 symbol_index < 512;
668 symbol_index++ )
669 {
670 libcnotify_printf(
671 "%s: symbol: %03d symbol\t\t\t: 0x%04" PRIx16 "\n",
672 function,
673 symbol_index,
674 code_symbols[ symbol_index ].symbol );
675
676 libcnotify_printf(
677 "%s: symbol: %03d code size\t\t: %" PRIu16 "\n",
678 function,
679 symbol_index,
680 code_symbols[ symbol_index ].code_size );
681 }
682 libcnotify_printf(
683 "\n" );
684 }
685 #endif
664686 return( 1 );
665687 }
666688
668690 * Returns 1 on success or -1 on error
669691 */
670692 int libfwnt_lzxpress_huffman_tree_read_symbol(
671 libfwnt_lzxpress_huffman_tree_node_t tree_nodes[ 1024 ],
693 libfwnt_lzxpress_huffman_tree_node_t *tree_nodes,
672694 libfwnt_bit_stream_t *compressed_data_bit_stream,
673695 uint16_t *symbol,
674696 libcerror_error_t **error )
675697 {
676698 libfwnt_lzxpress_huffman_tree_node_t *tree_node = NULL;
677699 static char *function = "libfwnt_lzxpress_huffman_tree_read_symbol";
700 uint16_t bits = 0;
678701 uint8_t sub_tree_node_index = 0;
679702
680703 if( compressed_data_bit_stream == NULL )
709732 compressed_data_bit_stream->bits <<= 1;
710733 compressed_data_bit_stream->number_of_bits -= 1;
711734
735 #if defined( HAVE_DEBUG_OUTPUT )
736 if( libcnotify_verbose != 0 )
737 {
738 libcnotify_printf(
739 "%s: sub tree node index\t\t: 0x%02" PRIx8 "\n",
740 function,
741 sub_tree_node_index );
742 }
743 #endif
744 if( ( compressed_data_bit_stream->number_of_bits < 16 )
745 && ( compressed_data_bit_stream->byte_stream_offset <= ( compressed_data_bit_stream->byte_stream_size - 2 ) ) )
746 {
747 byte_stream_copy_to_uint16_little_endian(
748 &( compressed_data_bit_stream->byte_stream[ compressed_data_bit_stream->byte_stream_offset ] ),
749 bits );
750
751 compressed_data_bit_stream->bits |= bits << ( 16 - compressed_data_bit_stream->number_of_bits );
752 compressed_data_bit_stream->byte_stream_offset += 2;
753 compressed_data_bit_stream->number_of_bits += 16;
754 }
712755 tree_node = tree_node->sub_tree_nodes[ sub_tree_node_index ];
713756
714757 if( tree_node == NULL )
730773 return( 1 );
731774 }
732775
733 /* Decompresses data using LZXPRESS Huffman compression
776 /* Decompresses a LZXPRESS Huffman compressed chunk
734777 * Return 1 on success or -1 on error
735778 */
736 int libfwnt_lzxpress_huffman_decompress_with_index(
779 int libfwnt_lzxpress_huffman_decompress_chunk(
737780 const uint8_t *compressed_data,
738781 size_t compressed_data_size,
739 size_t *compressed_data_index,
782 size_t *compressed_data_offset,
740783 uint8_t *uncompressed_data,
741 size_t *uncompressed_data_size,
742 size_t uncompressed_data_index,
784 size_t uncompressed_data_size,
785 size_t *uncompressed_data_offset,
743786 libcerror_error_t **error )
744787 {
745788 libfwnt_lzxpress_huffman_tree_node_t tree_nodes[ 1024 ];
746789
747790 libfwnt_bit_stream_t *compressed_data_bit_stream = NULL;
748 static char *function = "libfwnt_lzxpress_huffman_decompress_with_index";
749 size_t compression_uncompressed_data_index = 0;
750 size_t initial_uncompressed_data_index = 0;
791 static char *function = "libfwnt_lzxpress_huffman_decompress_chunk";
792 size_t compression_uncompressed_data_offset = 0;
793 size_t next_chunk_uncompressed_data_offset = 0;
794 size_t safe_uncompressed_data_offset = 0;
751795 uint32_t compression_offset = 0;
752796 uint16_t bits = 0;
753797 uint16_t compression_size = 0;
754798 uint16_t symbol = 0;
755 uint8_t end_of_input = 0;
756799
757800 if( compressed_data == NULL )
758801 {
776819
777820 return( -1 );
778821 }
779 if( compressed_data_index == NULL )
780 {
781 libcerror_error_set(
782 error,
783 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
784 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
785 "%s: invalid compressed data index.",
786 function );
787
788 return( -1 );
789 }
790 if( ( *compressed_data_index >= compressed_data_size )
791 || ( ( compressed_data_size - *compressed_data_index ) < 260 ) )
822 if( compressed_data_offset == NULL )
823 {
824 libcerror_error_set(
825 error,
826 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
827 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
828 "%s: invalid compressed data offset.",
829 function );
830
831 return( -1 );
832 }
833 if( ( *compressed_data_offset >= compressed_data_size )
834 || ( ( compressed_data_size - *compressed_data_offset ) < 260 ) )
792835 {
793836 libcerror_error_set(
794837 error,
795838 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
796839 LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,
797 "%s: compressed data index value out of bounds.",
840 "%s: compressed data offset value out of bounds.",
798841 function );
799842
800843 return( -1 );
810853
811854 return( -1 );
812855 }
813 if( uncompressed_data_size == NULL )
814 {
815 libcerror_error_set(
816 error,
817 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
818 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
819 "%s: invalid uncompressed data size.",
820 function );
821
822 return( -1 );
823 }
824 if( uncompressed_data_index > *uncompressed_data_size )
856 if( uncompressed_data_size > (size_t) SSIZE_MAX )
857 {
858 libcerror_error_set(
859 error,
860 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
861 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
862 "%s: invalid uncompressed data size value exceeds maximum.",
863 function );
864
865 return( -1 );
866 }
867 if( uncompressed_data_offset == NULL )
868 {
869 libcerror_error_set(
870 error,
871 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
872 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
873 "%s: invalid uncompressed data offset.",
874 function );
875
876 return( -1 );
877 }
878 if( *uncompressed_data_offset > uncompressed_data_size )
825879 {
826880 libcerror_error_set(
827881 error,
828882 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
829883 LIBCERROR_ARGUMENT_ERROR_VALUE_OUT_OF_BOUNDS,
830 "%s: uncompressed data index value out of bounds.",
884 "%s: uncompressed data offset value out of bounds.",
831885 function );
832886
833887 return( -1 );
836890 tree_nodes,
837891 compressed_data,
838892 compressed_data_size,
839 *compressed_data_index,
893 *compressed_data_offset,
840894 error ) != 1 )
841895 {
842896 libcerror_error_set(
850904 }
851905 if( libfwnt_bit_stream_initialize(
852906 &compressed_data_bit_stream,
853 &( compressed_data[ *compressed_data_index ] ),
907 &( compressed_data[ *compressed_data_offset ] ),
854908 compressed_data_size,
855909 error ) != 1 )
856910 {
880934
881935 goto on_error;
882936 }
883 initial_uncompressed_data_index = uncompressed_data_index;
884
937 safe_uncompressed_data_offset = *uncompressed_data_offset;
938
939 next_chunk_uncompressed_data_offset = safe_uncompressed_data_offset + 65536;
940
941 if( next_chunk_uncompressed_data_offset > uncompressed_data_size )
942 {
943 next_chunk_uncompressed_data_offset = uncompressed_data_size;
944 }
885945 while( ( compressed_data_bit_stream->byte_stream_offset < compressed_data_bit_stream->byte_stream_size )
886946 || ( compressed_data_bit_stream->number_of_bits > 0 ) )
887947 {
948 if( safe_uncompressed_data_offset >= next_chunk_uncompressed_data_offset )
949 {
950 break;
951 }
952 #if defined( HAVE_DEBUG_OUTPUT )
953 if( libcnotify_verbose != 0 )
954 {
955 libcnotify_printf(
956 "%s: compressed data offset\t: %" PRIzd " (0x%08" PRIzx ")\n",
957 function,
958 compressed_data_bit_stream->byte_stream_offset,
959 compressed_data_bit_stream->byte_stream_offset );
960 }
961 #endif
888962 if( libfwnt_lzxpress_huffman_tree_read_symbol(
889963 tree_nodes,
890964 compressed_data_bit_stream,
900974
901975 goto on_error;
902976 }
977 #if defined( HAVE_DEBUG_OUTPUT )
978 if( libcnotify_verbose != 0 )
979 {
980 libcnotify_printf(
981 "%s: number of bits\t\t: %" PRId8 "\n",
982 function,
983 compressed_data_bit_stream->number_of_bits );
984
985 libcnotify_printf(
986 "%s: huffman symbol\t\t: 0x%04" PRIx16 "\n",
987 function,
988 symbol );
989 }
990 #endif
903991 if( ( compressed_data_bit_stream->number_of_bits < 16 )
904992 && ( compressed_data_bit_stream->byte_stream_offset <= ( compressed_data_bit_stream->byte_stream_size - 2 ) ) )
905993 {
907995 &( compressed_data_bit_stream->byte_stream[ compressed_data_bit_stream->byte_stream_offset ] ),
908996 bits );
909997
910 if( bits == 0 )
911 {
912 end_of_input = 1;
913 }
914998 /* TODO bits read infront of the bit stream ? */
915999 compressed_data_bit_stream->bits |= bits << ( 16 - compressed_data_bit_stream->number_of_bits );
9161000 compressed_data_bit_stream->byte_stream_offset += 2;
9181002 }
9191003 if( symbol < 256 )
9201004 {
921 uncompressed_data[ uncompressed_data_index ] = (uint8_t) symbol;
922
923 uncompressed_data_index++;
1005 uncompressed_data[ safe_uncompressed_data_offset++ ] = (uint8_t) symbol;
9241006 }
9251007 /* Check if we have an end-of-block marker (remaining bits are 0)
9261008 */
9271009 if( ( compressed_data_bit_stream->bits == 0 )
928 && ( uncompressed_data_index >= *uncompressed_data_size ) )
1010 && ( safe_uncompressed_data_offset >= uncompressed_data_size ) )
9291011 {
9301012 break;
9311013 }
9441026 /* TODO add a read number of bits function ? */
9451027 compression_offset = (uint32_t) ( compressed_data_bit_stream->bits >> ( 32 - symbol ) );
9461028 }
947 compression_offset = (uint32_t) ( ( 1 << symbol ) + compression_offset );
1029 compression_offset = (uint32_t) ( ( 1 << symbol ) | compression_offset );
9481030
9491031 compressed_data_bit_stream->bits <<= symbol;
9501032 compressed_data_bit_stream->number_of_bits -= (uint8_t) symbol;
9901072 }
9911073 compression_size += 3;
9921074
993 if( compression_offset > uncompressed_data_index )
1075 #if defined( HAVE_DEBUG_OUTPUT )
1076 if( libcnotify_verbose != 0 )
1077 {
1078 libcnotify_printf(
1079 "%s: compression offset\t\t: %" PRIi16 "\n",
1080 function,
1081 compression_offset );
1082
1083 libcnotify_printf(
1084 "%s: compression size\t\t: %" PRIu16 "\n",
1085 function,
1086 compression_size );
1087
1088 libcnotify_printf(
1089 "%s: uncompressed data offset\t: %" PRIzd "\n",
1090 function,
1091 safe_uncompressed_data_offset );
1092 }
1093 #endif
1094 if( compression_offset > safe_uncompressed_data_offset )
9941095 {
9951096 libcerror_error_set(
9961097 error,
10011102
10021103 goto on_error;
10031104 }
1004 if( compression_size > ( *uncompressed_data_size - uncompressed_data_index ) )
1105 if( compression_size > ( uncompressed_data_size - safe_uncompressed_data_offset ) )
10051106 {
10061107 libcerror_error_set(
10071108 error,
10121113
10131114 goto on_error;
10141115 }
1015 compression_uncompressed_data_index = uncompressed_data_index - compression_offset;
1116 compression_uncompressed_data_offset = safe_uncompressed_data_offset - compression_offset;
10161117
10171118 while( compression_size > 0 )
10181119 {
1019 uncompressed_data[ uncompressed_data_index ] = uncompressed_data[ compression_uncompressed_data_index ];
1020
1021 compression_uncompressed_data_index++;
1022 uncompressed_data_index++;
1120 uncompressed_data[ safe_uncompressed_data_offset++ ] = uncompressed_data[ compression_uncompressed_data_offset++ ];
1121
10231122 compression_size--;
10241123 }
10251124 if( ( compressed_data_bit_stream->number_of_bits < 16 )
10291128 &( compressed_data_bit_stream->byte_stream[ compressed_data_bit_stream->byte_stream_offset ] ),
10301129 bits );
10311130
1032 if( bits == 0 )
1033 {
1034 end_of_input = 1;
1035 }
10361131 /* TODO bits read infront of the bit stream ? */
10371132 compressed_data_bit_stream->bits |= bits << ( 16 - compressed_data_bit_stream->number_of_bits );
10381133 compressed_data_bit_stream->byte_stream_offset += 2;
10391134 compressed_data_bit_stream->number_of_bits += 16;
10401135 }
10411136 }
1042 }
1043 *compressed_data_index += compressed_data_bit_stream->byte_stream_offset;
1137 #if defined( HAVE_DEBUG_OUTPUT )
1138 if( libcnotify_verbose != 0 )
1139 {
1140 libcnotify_printf(
1141 "\n" );
1142 }
1143 #endif
1144 }
1145 *compressed_data_offset += compressed_data_bit_stream->byte_stream_offset;
10441146
10451147 if( libfwnt_bit_stream_free(
10461148 &compressed_data_bit_stream,
10551157
10561158 goto on_error;
10571159 }
1058 *uncompressed_data_size = uncompressed_data_index - initial_uncompressed_data_index;
1160 *uncompressed_data_offset = safe_uncompressed_data_offset;
10591161
10601162 return( 1 );
10611163
10791181 size_t *uncompressed_data_size,
10801182 libcerror_error_t **error )
10811183 {
1082 static char *function = "libfwnt_lzxpress_huffman_decompress";
1083 size_t compressed_data_index = 0;
1084
1085 if( libfwnt_lzxpress_huffman_decompress_with_index(
1086 compressed_data,
1087 compressed_data_size,
1088 &compressed_data_index,
1089 uncompressed_data,
1090 uncompressed_data_size,
1091 0,
1092 error ) != 1 )
1093 {
1094 libcerror_error_set(
1095 error,
1096 LIBCERROR_ERROR_DOMAIN_COMPRESSION,
1097 LIBCERROR_COMPRESSION_ERROR_DECOMPRESS_FAILED,
1098 "%s: unable to decompress compressed data.",
1099 function );
1100
1101 return( -1 );
1102 }
1103 return( 1 );
1104 }
1105
1106 /* Decompresses data using LZXPRESS Huffman stream compression
1107 * Return 1 on success or -1 on error
1108 */
1109 int libfwnt_lzxpress_huffman_stream_decompress(
1110 const uint8_t *compressed_data,
1111 size_t compressed_data_size,
1112 uint8_t *uncompressed_data,
1113 size_t *uncompressed_data_size,
1114 libcerror_error_t **error )
1115 {
1116 static char *function = "libfwnt_lzxpress_huffman_stream_decompress";
1117 size_t compressed_data_index = 0;
1118 size_t uncompressed_block_size = 0;
1119 size_t uncompressed_data_index = 0;
1184 static char *function = "libfwnt_lzxpress_huffman_decompress";
1185 size_t compressed_data_offset = 0;
1186 size_t uncompressed_data_offset = 0;
11201187
11211188 if( uncompressed_data_size == NULL )
11221189 {
11291196
11301197 return( -1 );
11311198 }
1132 while( compressed_data_index < compressed_data_size )
1133 {
1134 uncompressed_block_size = uncompressed_data_index + 65536;
1135
1136 if( uncompressed_block_size > *uncompressed_data_size )
1137 {
1138 uncompressed_block_size = *uncompressed_data_size;
1139 }
1140 if( libfwnt_lzxpress_huffman_decompress_with_index(
1199 while( compressed_data_offset < compressed_data_size )
1200 {
1201 if( uncompressed_data_offset >= *uncompressed_data_size )
1202 {
1203 break;
1204 }
1205 if( libfwnt_lzxpress_huffman_decompress_chunk(
11411206 compressed_data,
11421207 compressed_data_size,
1143 &compressed_data_index,
1208 &compressed_data_offset,
11441209 uncompressed_data,
1145 &uncompressed_block_size,
1146 uncompressed_data_index,
1210 *uncompressed_data_size,
1211 &uncompressed_data_offset,
11471212 error ) != 1 )
11481213 {
11491214 libcerror_error_set(
11501215 error,
11511216 LIBCERROR_ERROR_DOMAIN_COMPRESSION,
11521217 LIBCERROR_COMPRESSION_ERROR_DECOMPRESS_FAILED,
1153 "%s: unable to decompress compressed data.",
1218 "%s: unable to decompress chunk.",
11541219 function );
11551220
11561221 return( -1 );
11571222 }
1158 uncompressed_data_index += uncompressed_block_size;
1159 }
1160 *uncompressed_data_size = uncompressed_data_index;
1223 }
1224 *uncompressed_data_size = uncompressed_data_offset;
11611225
11621226 return( 1 );
11631227 }
1228
00 /*
11 * LZXPRESS (de)compression functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4747 /* The sub tree nodes
4848 */
4949 libfwnt_lzxpress_huffman_tree_node_t *sub_tree_nodes[ 2 ];
50
51 #if defined( HAVE_DEBUG_OUTPUT )
52
53 /* The sub tree node indexes
54 */
55 uint16_t sub_tree_node_indexes[ 2 ];
56 #endif
5057 };
5158
5259 typedef struct libfwnt_lzxpress_huffman_code_symbol libfwnt_lzxpress_huffman_code_symbol_t;
6168 */
6269 uint16_t code_size;
6370 };
64
65 LIBFWNT_EXTERN \
66 int libfwnt_lzxpress_get_uncompressed_data_size(
67 const uint8_t *compressed_data,
68 size_t compressed_data_size,
69 size_t *uncompressed_data_size,
70 libcerror_error_t **error );
7171
7272 LIBFWNT_EXTERN \
7373 int libfwnt_lzxpress_compress(
9090 libfwnt_lzxpress_huffman_code_symbol_t *second_symbol );
9191
9292 int libfwnt_lzxpress_huffman_tree_add_leaf(
93 libfwnt_lzxpress_huffman_tree_node_t tree_nodes[ 1024 ],
93 libfwnt_lzxpress_huffman_tree_node_t *tree_nodes,
9494 int tree_node_index,
9595 uint32_t bits,
9696 uint8_t number_of_bits );
9797
9898 int libfwnt_lzxpress_huffman_tree_read(
99 libfwnt_lzxpress_huffman_tree_node_t tree_nodes[ 1024 ],
99 libfwnt_lzxpress_huffman_tree_node_t *tree_nodes,
100100 const uint8_t *compressed_data,
101101 size_t compressed_data_size,
102 size_t compressed_data_index,
102 size_t compressed_data_offset,
103103 libcerror_error_t **error );
104104
105105 int libfwnt_lzxpress_huffman_tree_read_symbol(
106 libfwnt_lzxpress_huffman_tree_node_t tree_nodes[ 1024 ],
106 libfwnt_lzxpress_huffman_tree_node_t *tree_nodes,
107107 libfwnt_bit_stream_t *compressed_data_bit_stream,
108108 uint16_t *symbol,
109109 libcerror_error_t **error );
110110
111 int libfwnt_lzxpress_huffman_decompress_with_index(
111 int libfwnt_lzxpress_huffman_decompress_chunk(
112112 const uint8_t *compressed_data,
113113 size_t compressed_data_size,
114 size_t *compressed_data_index,
114 size_t *compressed_data_offset,
115115 uint8_t *uncompressed_data,
116 size_t *uncompressed_data_size,
117 size_t uncompressed_data_index,
116 size_t uncompressed_data_size,
117 size_t *uncompressed_data_offset,
118118 libcerror_error_t **error );
119119
120120 LIBFWNT_EXTERN \
125125 size_t *uncompressed_data_size,
126126 libcerror_error_t **error );
127127
128 LIBFWNT_EXTERN \
129 int libfwnt_lzxpress_huffman_stream_decompress(
130 const uint8_t *compressed_data,
131 size_t compressed_data_size,
132 uint8_t *uncompressed_data,
133 size_t *uncompressed_data_size,
134 libcerror_error_t **error );
135
136128 #if defined( __cplusplus )
137129 }
138130 #endif
139131
140 #endif
132 #endif /* !defined( _LIBFWNT_LZXPRESS_H ) */
141133
00 /*
11 * Windows NT Security Descriptor functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2121 #include <common.h>
2222 #include <byte_stream.h>
2323 #include <memory.h>
24 #include <narrow_string.h>
25 #include <system_string.h>
2426 #include <types.h>
27 #include <wide_string.h>
2528
2629 #include "libfwnt_access_control_list.h"
2730 #include "libfwnt_debug.h"
222225 uint16_t control_flags = 0;
223226
224227 #if defined( HAVE_DEBUG_OUTPUT )
225 libcstring_system_character_t *sid_string = NULL;
228 system_character_t *sid_string = NULL;
226229 size_t sid_string_size = 0;
227230 int result = 0;
228231 #endif
488491
489492 if( sid_string_size > 0 )
490493 {
491 sid_string = libcstring_system_string_allocate(
494 sid_string = system_string_allocate(
492495 sid_string_size );
493496
494497 if( sid_string == NULL )
502505
503506 goto on_error;
504507 }
505 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
508 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
506509 result = libfwnt_security_identifier_copy_to_utf16_string(
507510 internal_security_descriptor->owner_sid,
508511 (uint16_t *) sid_string,
529532 goto on_error;
530533 }
531534 libcnotify_printf(
532 "%" PRIs_LIBCSTRING_SYSTEM "",
535 "%" PRIs_SYSTEM "",
533536 sid_string );
534537
535538 memory_free(
622625
623626 if( sid_string_size > 0 )
624627 {
625 sid_string = libcstring_system_string_allocate(
628 sid_string = system_string_allocate(
626629 sid_string_size );
627630
628631 if( sid_string == NULL )
636639
637640 goto on_error;
638641 }
639 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
642 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
640643 result = libfwnt_security_identifier_copy_to_utf16_string(
641644 internal_security_descriptor->group_sid,
642645 (uint16_t *) sid_string,
663666 goto on_error;
664667 }
665668 libcnotify_printf(
666 "%" PRIs_LIBCSTRING_SYSTEM "",
669 "%" PRIs_SYSTEM "",
667670 sid_string );
668671
669672 memory_free(
00 /*
11 * Windows NT Security Descriptor functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Windows NT Security Identifier (SID) functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Windows NT Security Identifier (SID) functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4242 }
4343 #endif
4444
45 #endif
45 #endif /* !defined( _LIBFWNT_SUPPORT_H ) */
4646
00 /*
11 * The internal type definitions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal unused definition
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
11 AM_CPPFLAGS = \
22 -I$(top_srcdir)/include \
33 -I$(top_srcdir)/common \
4 @LIBCSTRING_CPPFLAGS@ \
54 @LIBCERROR_CPPFLAGS@ \
65 @LIBCNOTIFY_CPPFLAGS@
76
1514 libmapidb_folder.c libmapidb_folder.h \
1615 libmapidb_libcerror.h \
1716 libmapidb_libcnotify.h \
18 libmapidb_libcstring.h \
1917 libmapidb_support.c libmapidb_support.h \
2018 libmapidb_types.h \
2119 libmapidb_unused.h
2220 endif
23
2421
2522 MAINTAINERCLEANFILES = \
2623 Makefile.in
9797 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9898 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9999 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101100 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102101 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103102 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
108107 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109108 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110109 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
110 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
111 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
113112 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114113 $(ACLOCAL_M4)
115114 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
123122 libmapidb_database.h libmapidb_definitions.h libmapidb_error.c \
124123 libmapidb_error.h libmapidb_extern.h libmapidb_folder.c \
125124 libmapidb_folder.h libmapidb_libcerror.h \
126 libmapidb_libcnotify.h libmapidb_libcstring.h \
127 libmapidb_support.c libmapidb_support.h libmapidb_types.h \
128 libmapidb_unused.h
125 libmapidb_libcnotify.h libmapidb_support.c libmapidb_support.h \
126 libmapidb_types.h libmapidb_unused.h
129127 @HAVE_LOCAL_LIBMAPIDB_TRUE@am_libmapidb_la_OBJECTS = \
130128 @HAVE_LOCAL_LIBMAPIDB_TRUE@ libmapidb_database.lo \
131129 @HAVE_LOCAL_LIBMAPIDB_TRUE@ libmapidb_error.lo \
240238 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
241239 HAVE_LIBCPATH = @HAVE_LIBCPATH@
242240 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
243 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
244 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
245241 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
246242 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
247243 HAVE_LIBFDATA = @HAVE_LIBFDATA@
260256 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
261257 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
262258 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
263 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
264 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
265259 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
266260 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
267261 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
308302 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
309303 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
310304 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
311 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
312 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
313 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
314 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
315305 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
316306 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
317307 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
344334 LTLIBICONV = @LTLIBICONV@
345335 LTLIBINTL = @LTLIBINTL@
346336 LTLIBOBJS = @LTLIBOBJS@
337 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
347338 MAKEINFO = @MAKEINFO@
348339 MANIFEST_TOOL = @MANIFEST_TOOL@
349340 MKDIR_P = @MKDIR_P@
450441 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
451442 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
452443 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
453 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
454 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
455 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
456 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
457 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
458 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
459444 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
460445 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
461446 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
524509 libcpath_LIBS = @libcpath_LIBS@
525510 libcsplit_CFLAGS = @libcsplit_CFLAGS@
526511 libcsplit_LIBS = @libcsplit_LIBS@
527 libcstring_CFLAGS = @libcstring_CFLAGS@
528 libcstring_LIBS = @libcstring_LIBS@
529 libcsystem_CFLAGS = @libcsystem_CFLAGS@
530 libcsystem_LIBS = @libcsystem_LIBS@
531512 libcthreads_CFLAGS = @libcthreads_CFLAGS@
532513 libcthreads_LIBS = @libcthreads_LIBS@
533514 libdir = @libdir@
579560 @HAVE_LOCAL_LIBMAPIDB_TRUE@AM_CPPFLAGS = \
580561 @HAVE_LOCAL_LIBMAPIDB_TRUE@ -I$(top_srcdir)/include \
581562 @HAVE_LOCAL_LIBMAPIDB_TRUE@ -I$(top_srcdir)/common \
582 @HAVE_LOCAL_LIBMAPIDB_TRUE@ @LIBCSTRING_CPPFLAGS@ \
583563 @HAVE_LOCAL_LIBMAPIDB_TRUE@ @LIBCERROR_CPPFLAGS@ \
584564 @HAVE_LOCAL_LIBMAPIDB_TRUE@ @LIBCNOTIFY_CPPFLAGS@
585565
592572 @HAVE_LOCAL_LIBMAPIDB_TRUE@ libmapidb_folder.c libmapidb_folder.h \
593573 @HAVE_LOCAL_LIBMAPIDB_TRUE@ libmapidb_libcerror.h \
594574 @HAVE_LOCAL_LIBMAPIDB_TRUE@ libmapidb_libcnotify.h \
595 @HAVE_LOCAL_LIBMAPIDB_TRUE@ libmapidb_libcstring.h \
596575 @HAVE_LOCAL_LIBMAPIDB_TRUE@ libmapidb_support.c libmapidb_support.h \
597576 @HAVE_LOCAL_LIBMAPIDB_TRUE@ libmapidb_types.h \
598577 @HAVE_LOCAL_LIBMAPIDB_TRUE@ libmapidb_unused.h
3535 #else
3636 #include <byte_stream.h>
3737
38 #define LIBMAPIDB_VERSION 20160307
38 #define LIBMAPIDB_VERSION 20161003
3939
4040 /* The libmapidb version string
4141 */
42 #define LIBMAPIDB_VERSION_STRING "20160307"
42 #define LIBMAPIDB_VERSION_STRING "20161003"
4343
4444 /* The endian definitions
4545 */
4343 libmapidb_error_t *error,
4444 FILE *stream )
4545 {
46 return( libcerror_error_fprint(
47 (libcerror_error_t *) error,
48 stream ) );
46 int print_count = 0;
47
48 print_count = libcerror_error_fprint(
49 (libcerror_error_t *) error,
50 stream );
51
52 return( print_count );
4953 }
5054
5155 /* Prints a descriptive string of the error to the string
5761 char *string,
5862 size_t size )
5963 {
60 return( libcerror_error_sprint(
61 (libcerror_error_t *) error,
62 string,
63 size ) );
64 int print_count = 0;
65
66 print_count = libcerror_error_sprint(
67 (libcerror_error_t *) error,
68 string,
69 size );
70
71 return( print_count );
6472 }
6573
6674 /* Prints a backtrace of the error to the stream
7078 libmapidb_error_t *error,
7179 FILE *stream )
7280 {
73 return( libcerror_error_backtrace_fprint(
74 (libcerror_error_t *) error,
75 stream ) );
81 int print_count = 0;
82
83 print_count = libcerror_error_backtrace_fprint(
84 (libcerror_error_t *) error,
85 stream );
86
87 return( print_count );
7688 }
7789
7890 /* Prints a backtrace of the error to the string
8496 char *string,
8597 size_t size )
8698 {
87 return( libcerror_error_backtrace_sprint(
88 (libcerror_error_t *) error,
89 string,
90 size ) );
99 int print_count = 0;
100
101 print_count = libcerror_error_backtrace_sprint(
102 (libcerror_error_t *) error,
103 string,
104 size );
105
106 return( print_count );
91107 }
92108
93109 #endif /* !defined( HAVE_LOCAL_LIBMAPIDB ) */
+0
-51
libmapidb/libmapidb_libcstring.h less more
0 /*
1 * The internal libcstring header
2 *
3 * Copyright (C) 2011-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _LIBMAPIDB_LIBCSTRING_H )
22 #define _LIBMAPIDB_LIBCSTRING_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring
27 */
28 #if defined( HAVE_LOCAL_LIBCSTRING )
29
30 #include <libcstring_definitions.h>
31 #include <libcstring_narrow_string.h>
32 #include <libcstring_system_string.h>
33 #include <libcstring_types.h>
34 #include <libcstring_wide_string.h>
35
36 #else
37
38 /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT
39 * before including libcstring.h
40 */
41 #if defined( _WIN32 ) && defined( DLL_IMPORT )
42 #define LIBCSTRING_DLL_IMPORT
43 #endif
44
45 #include <libcstring.h>
46
47 #endif /* defined( HAVE_LOCAL_LIBCSTRING ) */
48
49 #endif /* !defined( _LIBMAPIDB_LIBCSTRING_H ) */
50
11 AM_CPPFLAGS = \
22 -I$(top_srcdir)/include \
33 -I$(top_srcdir)/common \
4 @LIBCSTRING_CPPFLAGS@ \
54 @LIBCERROR_CPPFLAGS@
65
76 noinst_LTLIBRARIES = libuna.la
5958 libuna_utf8_string.c libuna_utf8_string.h
6059 endif
6160
62
6361 MAINTAINERCLEANFILES = \
6462 Makefile.in
6563
9797 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9898 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9999 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101100 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102101 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103102 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
108107 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109108 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110109 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
110 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
111 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
113112 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114113 $(ACLOCAL_M4)
115114 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
317316 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
318317 HAVE_LIBCPATH = @HAVE_LIBCPATH@
319318 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
320 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
321 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
322319 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
323320 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
324321 HAVE_LIBFDATA = @HAVE_LIBFDATA@
337334 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
338335 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
339336 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
340 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
341 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
342337 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
343338 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
344339 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
385380 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
386381 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
387382 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
388 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
389 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
390 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
391 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
392383 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
393384 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
394385 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
421412 LTLIBICONV = @LTLIBICONV@
422413 LTLIBINTL = @LTLIBINTL@
423414 LTLIBOBJS = @LTLIBOBJS@
415 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
424416 MAKEINFO = @MAKEINFO@
425417 MANIFEST_TOOL = @MANIFEST_TOOL@
426418 MKDIR_P = @MKDIR_P@
527519 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
528520 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
529521 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
530 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
531 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
532 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
533 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
534 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
535 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
536522 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
537523 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
538524 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
601587 libcpath_LIBS = @libcpath_LIBS@
602588 libcsplit_CFLAGS = @libcsplit_CFLAGS@
603589 libcsplit_LIBS = @libcsplit_LIBS@
604 libcstring_CFLAGS = @libcstring_CFLAGS@
605 libcstring_LIBS = @libcstring_LIBS@
606 libcsystem_CFLAGS = @libcsystem_CFLAGS@
607 libcsystem_LIBS = @libcsystem_LIBS@
608590 libcthreads_CFLAGS = @libcthreads_CFLAGS@
609591 libcthreads_LIBS = @libcthreads_LIBS@
610592 libdir = @libdir@
656638 @HAVE_LOCAL_LIBUNA_TRUE@AM_CPPFLAGS = \
657639 @HAVE_LOCAL_LIBUNA_TRUE@ -I$(top_srcdir)/include \
658640 @HAVE_LOCAL_LIBUNA_TRUE@ -I$(top_srcdir)/common \
659 @HAVE_LOCAL_LIBUNA_TRUE@ @LIBCSTRING_CPPFLAGS@ \
660641 @HAVE_LOCAL_LIBUNA_TRUE@ @LIBCERROR_CPPFLAGS@
661642
662643 @HAVE_LOCAL_LIBUNA_TRUE@noinst_LTLIBRARIES = libuna.la
00 /*
11 * Base16 stream functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Base16 stream functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
8282 }
8383 #endif
8484
85 #endif
85 #endif /* !defined( _LIBUNA_BASE16_STREAM_H ) */
8686
00 /*
11 * Base32 stream functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3636 /* Copies a base32 character to a base32 quintet
3737 * Returns 1 if successful or -1 on error
3838 */
39 LIBUNA_INLINE \
4039 int libuna_base32_character_copy_to_quintet(
4140 uint8_t base32_character,
4241 uint8_t *base32_quintet,
154153 *
155154 * Returns 1 if successful or -1 on error
156155 */
157 LIBUNA_INLINE \
158156 int libuna_base32_quintuplet_copy_from_base32_stream(
159157 uint64_t *base32_quintuplet,
160158 const uint8_t *base32_stream,
10191017 /* Copies a base32 quintuplet to a base32 stream
10201018 * Returns 1 if successful or -1 on error
10211019 */
1022 LIBUNA_INLINE \
10231020 int libuna_base32_quintuplet_copy_to_base32_stream(
10241021 uint64_t base32_quintuplet,
10251022 uint8_t *base32_stream,
12891286 /* Copies a base32 quintuplet from a byte stream
12901287 * Returns 1 if successful or -1 on error
12911288 */
1292 LIBUNA_INLINE \
12931289 int libuna_base32_quintuplet_copy_from_byte_stream(
12941290 uint64_t *base32_quintuplet,
12951291 const uint8_t *byte_stream,
13911387 /* Copies a base32 quintuplet to a byte stream
13921388 * Returns 1 if successful or -1 on error
13931389 */
1394 LIBUNA_INLINE \
13951390 int libuna_base32_quintuplet_copy_to_byte_stream(
13961391 uint64_t base32_quintuplet,
13971392 uint8_t *byte_stream,
00 /*
11 * Base32 stream functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2424 #include <common.h>
2525 #include <types.h>
2626
27 #include "libuna_inline.h"
2827 #include "libuna_extern.h"
2928 #include "libuna_libcerror.h"
3029 #include "libuna_types.h"
3332 extern "C" {
3433 #endif
3534
36 LIBUNA_INLINE \
3735 int libuna_base32_character_copy_to_quintet(
3836 uint8_t base32_character,
3937 uint8_t *base32_quintet,
4139 libcerror_error_t **error );
4240
4341 LIBUNA_EXTERN \
44 LIBUNA_INLINE \
4542 int libuna_base32_quintuplet_copy_from_base32_stream(
4643 uint64_t *base32_quintuplet,
4744 const uint8_t *base32_stream,
5249 libcerror_error_t **error );
5350
5451 LIBUNA_EXTERN \
55 LIBUNA_INLINE \
5652 int libuna_base32_quintuplet_copy_to_base32_stream(
5753 uint64_t base32_quintuplet,
5854 uint8_t *base32_stream,
6359 libcerror_error_t **error );
6460
6561 LIBUNA_EXTERN \
66 LIBUNA_INLINE \
6762 int libuna_base32_quintuplet_copy_from_byte_stream(
6863 uint64_t *base32_quintuplet,
6964 const uint8_t *byte_stream,
7368 libcerror_error_t **error );
7469
7570 LIBUNA_EXTERN \
76 LIBUNA_INLINE \
7771 int libuna_base32_quintuplet_copy_to_byte_stream(
7872 uint64_t base32_quintuplet,
7973 uint8_t *byte_stream,
132126 }
133127 #endif
134128
135 #endif
129 #endif /* !defined( _LIBUNA_BASE32_STREAM_H ) */
136130
00 /*
11 * Base64 stream functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2424
2525 #include "libuna_base64_stream.h"
2626 #include "libuna_definitions.h"
27 #include "libuna_inline.h"
2827 #include "libuna_libcerror.h"
2928 #include "libuna_types.h"
3029
3736 /* Copies a base64 character to a base64 sixtet
3837 * Returns 1 if successful or -1 on error
3938 */
40 LIBUNA_INLINE \
4139 int libuna_base64_character_copy_to_sixtet(
4240 uint8_t base64_character,
4341 uint8_t *base64_sixtet,
152150 *
153151 * Returns 1 if successful or -1 on error
154152 */
155 LIBUNA_INLINE \
156153 int libuna_base64_triplet_copy_from_base64_stream(
157154 uint32_t *base64_triplet,
158155 const uint8_t *base64_stream,
632629 /* Copies a base64 triplet to a base64 stream
633630 * Returns 1 if successful or -1 on error
634631 */
635 LIBUNA_INLINE \
636632 int libuna_base64_triplet_copy_to_base64_stream(
637633 uint32_t base64_triplet,
638634 uint8_t *base64_stream,
991987 /* Copies a base64 triplet from a byte stream
992988 * Returns 1 if successful or -1 on error
993989 */
994 LIBUNA_INLINE \
995990 int libuna_base64_triplet_copy_from_byte_stream(
996991 uint32_t *base64_triplet,
997992 const uint8_t *byte_stream,
10811076 /* Copies a base64 triplet to a byte stream
10821077 * Returns 1 if successful or -1 on error
10831078 */
1084 LIBUNA_INLINE \
10851079 int libuna_base64_triplet_copy_to_byte_stream(
10861080 uint32_t base64_triplet,
10871081 uint8_t *byte_stream,
00 /*
11 * Base64 stream functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2525 #include <types.h>
2626
2727 #include "libuna_extern.h"
28 #include "libuna_inline.h"
2928 #include "libuna_libcerror.h"
3029 #include "libuna_types.h"
3130
3332 extern "C" {
3433 #endif
3534
36 LIBUNA_INLINE \
3735 int libuna_base64_character_copy_to_sixtet(
3836 uint8_t base64_character,
3937 uint8_t *base64_sixtet,
4139 libcerror_error_t **error );
4240
4341 LIBUNA_EXTERN \
44 LIBUNA_INLINE \
4542 int libuna_base64_triplet_copy_from_base64_stream(
4643 uint32_t *base64_triplet,
4744 const uint8_t *base64_stream,
5249 libcerror_error_t **error );
5350
5451 LIBUNA_EXTERN \
55 LIBUNA_INLINE \
5652 int libuna_base64_triplet_copy_to_base64_stream(
5753 uint32_t base64_triplet,
5854 uint8_t *base64_stream,
6359 libcerror_error_t **error );
6460
6561 LIBUNA_EXTERN \
66 LIBUNA_INLINE \
6762 int libuna_base64_triplet_copy_from_byte_stream(
6863 uint32_t *base64_triplet,
6964 const uint8_t *byte_stream,
7368 libcerror_error_t **error );
7469
7570 LIBUNA_EXTERN \
76 LIBUNA_INLINE \
7771 int libuna_base64_triplet_copy_to_byte_stream(
7872 uint32_t base64_triplet,
7973 uint8_t *byte_stream,
132126 }
133127 #endif
134128
135 #endif
129 #endif /* !defined( _LIBUNA_BASE64_STREAM_H ) */
136130
00 /*
11 * Byte stream functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Byte stream functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
9999 }
100100 #endif
101101
102 #endif
102 #endif /* !defined( _LIBUNA_BYTE_STREAM_H ) */
103103
00 /*
11 * ISO 8859-10 codepage (Nordic) function
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * ISO 8859-10 codepage (Nordic) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 }
3838 #endif
3939
40 #endif
40 #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_10_H ) */
4141
00 /*
11 * ISO 8859-13 codepage (Baltic) function
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * ISO 8859-13 codepage (Baltic) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 }
3838 #endif
3939
40 #endif
40 #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_13_H ) */
4141
00 /*
11 * ISO 8859-14 codepage (Celtic) function
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * ISO 8859-14 codepage (Celtic) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3838 }
3939 #endif
4040
41 #endif
41 #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_14_H ) */
4242
00 /*
11 * ISO 8859-15 codepage (Latin 9) function
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * ISO 8859-15 codepage (Latin 9) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3636 }
3737 #endif
3838
39 #endif
39 #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_15_H ) */
4040
00 /*
11 * ISO 8859-16 codepage (Latin 10) function
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * ISO 8859-16 codepage (Latin 10) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4040 }
4141 #endif
4242
43 #endif
43 #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_16_H ) */
4444
00 /*
11 * ISO 8859-2 codepage (Central European) function
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * ISO 8859-2 codepage (Central European) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3838 }
3939 #endif
4040
41 #endif
41 #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_2_H ) */
4242
00 /*
11 * ISO 8859-3 codepage (Latin 3) function
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * ISO 8859-3 codepage (Latin 3) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4040 }
4141 #endif
4242
43 #endif
43 #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_3_H ) */
4444
00 /*
11 * ISO 8859-4 codepage (Baltic) function
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * ISO 8859-4 codepage (Baltic) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 }
3838 #endif
3939
40 #endif
40 #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_4_H ) */
4141
00 /*
11 * ISO 8859-5 codepage (Cyrillic) function
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * ISO 8859-5 codepage (Cyrillic) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3636 }
3737 #endif
3838
39 #endif
39 #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_5_H ) */
4040
00 /*
11 * ISO 8859-6 codepage (Arabic) function
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * ISO 8859-6 codepage (Arabic) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3636 }
3737 #endif
3838
39 #endif
39 #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_6_H ) */
4040
00 /*
11 * ISO 8859-7 codepage (Greek) function
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * ISO 8859-7 codepage (Greek) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 }
3838 #endif
3939
40 #endif
40 #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_7_H ) */
4141
00 /*
11 * ISO 8859-8 codepage (Hebrew) function
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * ISO 8859-8 codepage (Hebrew) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 }
3838 #endif
3939
40 #endif
40 #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_8_H ) */
4141
00 /*
11 * ISO 8859-9 codepage (Turkish) function
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * ISO 8859-9 codepage (Turkish) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3636 }
3737 #endif
3838
39 #endif
39 #endif /* !defined( _LIBUNA_CODEPAGE_ISO_8859_9_H ) */
4040
00 /*
11 * KOI8-R codepage (Russian Cyrillic) function
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * KOI8-R codepage (Russian Cyrillic) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 }
3838 #endif
3939
40 #endif
40 #endif /* !defined( _LIBUNA_CODEPAGE_KOI8_R_H ) */
4141
00 /*
11 * KOI8-U codepage (Ukrainian Cyrillic) function
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * KOI8-U codepage (Ukrainian Cyrillic) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 }
3838 #endif
3939
40 #endif
40 #endif /* !defined( _LIBUNA_CODEPAGE_KOI8_U_H ) */
4141
00 /*
11 * Windows 1250 codepage (Central European) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Windows 1250 codepage (Central European) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4040 }
4141 #endif
4242
43 #endif
43 #endif /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1250_H ) */
4444
00 /*
11 * Windows 1251 codepage (Cyrillic) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Windows 1251 codepage (Cyrillic) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3838 }
3939 #endif
4040
41 #endif
41 #endif /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1251_H ) */
4242
00 /*
11 * Windows 1252 codepage (Western European/Latin 1) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Windows 1252 codepage (Western European/Latin 1) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3636 }
3737 #endif
3838
39 #endif
39 #endif /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1252_H ) */
4040
00 /*
11 * Windows 1253 codepage (Greek) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Windows 1253 codepage (Greek) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3838 }
3939 #endif
4040
41 #endif
41 #endif /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1253_H ) */
4242
00 /*
11 * Windows 1254 codepage (Turkish) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Windows 1254 codepage (Turkish) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3939 }
4040 #endif
4141
42 #endif
42 #endif /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1254_H ) */
4343
00 /*
11 * Windows 1255 codepage (Hebrew) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Windows 1255 codepage (Hebrew) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3939 }
4040 #endif
4141
42 #endif
42 #endif /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1255_H ) */
4343
00 /*
11 * Windows 1256 codepage (Arabic) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Windows 1256 codepage (Arabic) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3939 }
4040 #endif
4141
42 #endif
42 #endif /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1256_H ) */
4343
00 /*
11 * Windows 1257 codepage (Baltic) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Windows 1257 codepage (Baltic) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 }
3838 #endif
3939
40 #endif
40 #endif /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1257_H ) */
4141
00 /*
11 * Windows 1258 codepage (Vietnamese) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Windows 1258 codepage (Vietnamese) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 }
3838 #endif
3939
40 #endif
40 #endif /* !defined( _LIBUNA_CODEPAGE_WINDOWS_1258_H ) */
4141
00 /*
11 * Windows 874 codepage (Thai) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Windows 874 codepage (Thai) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3737 }
3838 #endif
3939
40 #endif
40 #endif /* !defined( _LIBUNA_CODEPAGE_WINDOWS_874_H ) */
4141
00 /*
11 * Windows 932 codepage (Japanese Shift-JIS) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2222 #include <types.h>
2323
2424 #include "libuna_codepage_windows_932.h"
25 #include "libuna_inline.h"
2625 #include "libuna_libcerror.h"
2726 #include "libuna_types.h"
2827
41854184 * Adds the size to the byte stream character size value
41864185 * Returns 1 if successful or -1 on error
41874186 */
4188 LIBUNA_INLINE \
41894187 int libuna_codepage_windows_932_unicode_character_size_to_byte_stream(
41904188 libuna_unicode_character_t unicode_character,
41914189 size_t *byte_stream_character_size,
42794277 /* Copies a Unicode character from a byte stream
42804278 * Returns 1 if successful or -1 on error
42814279 */
4282 LIBUNA_INLINE \
42834280 int libuna_codepage_windows_932_copy_from_byte_stream(
42844281 libuna_unicode_character_t *unicode_character,
42854282 const uint8_t *byte_stream,
48454842 /* Copies a Unicode character to a byte stream
48464843 * Returns 1 if successful or -1 on error
48474844 */
4848 LIBUNA_INLINE \
48494845 int libuna_codepage_windows_932_copy_to_byte_stream(
48504846 libuna_unicode_character_t unicode_character,
48514847 uint8_t *byte_stream,
00 /*
11 * Windows 932 codepage (Japanese Shift-JIS) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2525 #include <types.h>
2626
2727 #include "libuna_extern.h"
28 #include "libuna_inline.h"
2928 #include "libuna_libcerror.h"
3029 #include "libuna_types.h"
3130
3433 #endif
3534
3635 LIBUNA_EXTERN \
37 LIBUNA_INLINE \
3836 int libuna_codepage_windows_932_unicode_character_size_to_byte_stream(
3937 libuna_unicode_character_t unicode_character,
4038 size_t *byte_stream_character_size,
4139 libcerror_error_t **error );
4240
4341 LIBUNA_EXTERN \
44 LIBUNA_INLINE \
4542 int libuna_codepage_windows_932_copy_from_byte_stream(
4643 libuna_unicode_character_t *unicode_character,
4744 const uint8_t *byte_stream,
5047 libcerror_error_t **error );
5148
5249 LIBUNA_EXTERN \
53 LIBUNA_INLINE \
5450 int libuna_codepage_windows_932_copy_to_byte_stream(
5551 libuna_unicode_character_t unicode_character,
5652 uint8_t *byte_stream,
6258 }
6359 #endif
6460
65 #endif
61 #endif /* !defined( _LIBUNA_CODEPAGE_WINDOWS_932_H ) */
6662
00 /*
11 * Windows 936 codepage (Chinese Simplified) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2222 #include <types.h>
2323
2424 #include "libuna_codepage_windows_936.h"
25 #include "libuna_inline.h"
2625 #include "libuna_libcerror.h"
2726 #include "libuna_types.h"
2827
63556354 * Adds the size to the byte stream character size value
63566355 * Returns 1 if successful or -1 on error
63576356 */
6358 LIBUNA_INLINE \
63596357 int libuna_codepage_windows_936_unicode_character_size_to_byte_stream(
63606358 libuna_unicode_character_t unicode_character,
63616359 size_t *byte_stream_character_size,
64376435 /* Copies a Unicode character from a byte stream
64386436 * Returns 1 if successful or -1 on error
64396437 */
6440 LIBUNA_INLINE \
64416438 int libuna_codepage_windows_936_copy_from_byte_stream(
64426439 libuna_unicode_character_t *unicode_character,
64436440 const uint8_t *byte_stream,
73397336 /* Copies a Unicode character to a byte stream
73407337 * Returns 1 if successful or -1 on error
73417338 */
7342 LIBUNA_INLINE \
73437339 int libuna_codepage_windows_936_copy_to_byte_stream(
73447340 libuna_unicode_character_t unicode_character,
73457341 uint8_t *byte_stream,
00 /*
11 * Windows 936 codepage (Chinese Simplified) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2525 #include <types.h>
2626
2727 #include "libuna_extern.h"
28 #include "libuna_inline.h"
2928 #include "libuna_libcerror.h"
3029 #include "libuna_types.h"
3130
3433 #endif
3534
3635 LIBUNA_EXTERN \
37 LIBUNA_INLINE \
3836 int libuna_codepage_windows_936_unicode_character_size_to_byte_stream(
3937 libuna_unicode_character_t unicode_character,
4038 size_t *byte_stream_character_size,
4139 libcerror_error_t **error );
4240
4341 LIBUNA_EXTERN \
44 LIBUNA_INLINE \
4542 int libuna_codepage_windows_936_copy_from_byte_stream(
4643 libuna_unicode_character_t *unicode_character,
4744 const uint8_t *byte_stream,
5047 libcerror_error_t **error );
5148
5249 LIBUNA_EXTERN \
53 LIBUNA_INLINE \
5450 int libuna_codepage_windows_936_copy_to_byte_stream(
5551 libuna_unicode_character_t unicode_character,
5652 uint8_t *byte_stream,
6258 }
6359 #endif
6460
65 #endif
61 #endif /* !defined( _LIBUNA_CODEPAGE_WINDOWS_936_H ) */
6662
00 /*
11 * Windows 949 codepage (Korean) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2222 #include <types.h>
2323
2424 #include "libuna_codepage_windows_949.h"
25 #include "libuna_inline.h"
2625 #include "libuna_libcerror.h"
2726 #include "libuna_types.h"
2827
72147213 * Adds the size to the byte stream character size value
72157214 * Returns 1 if successful or -1 on error
72167215 */
7217 LIBUNA_INLINE \
72187216 int libuna_codepage_windows_949_unicode_character_size_to_byte_stream(
72197217 libuna_unicode_character_t unicode_character,
72207218 size_t *byte_stream_character_size,
73027300 /* Copies a Unicode character from a byte stream
73037301 * Returns 1 if successful or -1 on error
73047302 */
7305 LIBUNA_INLINE \
73067303 int libuna_codepage_windows_949_copy_from_byte_stream(
73077304 libuna_unicode_character_t *unicode_character,
73087305 const uint8_t *byte_stream,
81148111 /* Copies a Unicode character to a byte stream
81158112 * Returns 1 if successful or -1 on error
81168113 */
8117 LIBUNA_INLINE \
81188114 int libuna_codepage_windows_949_copy_to_byte_stream(
81198115 libuna_unicode_character_t unicode_character,
81208116 uint8_t *byte_stream,
00 /*
11 * Windows 949 codepage (Korean) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2525 #include <types.h>
2626
2727 #include "libuna_extern.h"
28 #include "libuna_inline.h"
2928 #include "libuna_libcerror.h"
3029 #include "libuna_types.h"
3130
3433 #endif
3534
3635 LIBUNA_EXTERN \
37 LIBUNA_INLINE \
3836 int libuna_codepage_windows_949_unicode_character_size_to_byte_stream(
3937 libuna_unicode_character_t unicode_character,
4038 size_t *byte_stream_character_size,
4139 libcerror_error_t **error );
4240
4341 LIBUNA_EXTERN \
44 LIBUNA_INLINE \
4542 int libuna_codepage_windows_949_copy_from_byte_stream(
4643 libuna_unicode_character_t *unicode_character,
4744 const uint8_t *byte_stream,
5047 libcerror_error_t **error );
5148
5249 LIBUNA_EXTERN \
53 LIBUNA_INLINE \
5450 int libuna_codepage_windows_949_copy_to_byte_stream(
5551 libuna_unicode_character_t unicode_character,
5652 uint8_t *byte_stream,
6258 }
6359 #endif
6460
65 #endif
61 #endif /* !defined( _LIBUNA_CODEPAGE_WINDOWS_949_H ) */
6662
00 /*
11 * Windows 950 codepage (Traditional Chinese) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2222 #include <types.h>
2323
2424 #include "libuna_codepage_windows_950.h"
25 #include "libuna_inline.h"
2625 #include "libuna_libcerror.h"
2726 #include "libuna_types.h"
2827
53185317 * Adds the size to the byte stream character size value
53195318 * Returns 1 if successful or -1 on error
53205319 */
5321 LIBUNA_INLINE \
53225320 int libuna_codepage_windows_950_unicode_character_size_to_byte_stream(
53235321 libuna_unicode_character_t unicode_character,
53245322 size_t *byte_stream_character_size,
54065404 /* Copies a Unicode character from a byte stream
54075405 * Returns 1 if successful or -1 on error
54085406 */
5409 LIBUNA_INLINE \
54105407 int libuna_codepage_windows_950_copy_from_byte_stream(
54115408 libuna_unicode_character_t *unicode_character,
54125409 const uint8_t *byte_stream,
62936290 /* Copies a Unicode character to a byte stream
62946291 * Returns 1 if successful or -1 on error
62956292 */
6296 LIBUNA_INLINE \
62976293 int libuna_codepage_windows_950_copy_to_byte_stream(
62986294 libuna_unicode_character_t unicode_character,
62996295 uint8_t *byte_stream,
00 /*
11 * Windows 950 codepage (Traditional Chinese) functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2525 #include <types.h>
2626
2727 #include "libuna_extern.h"
28 #include "libuna_inline.h"
2928 #include "libuna_libcerror.h"
3029 #include "libuna_types.h"
3130
3433 #endif
3534
3635 LIBUNA_EXTERN \
37 LIBUNA_INLINE \
3836 int libuna_codepage_windows_950_unicode_character_size_to_byte_stream(
3937 libuna_unicode_character_t unicode_character,
4038 size_t *byte_stream_character_size,
4139 libcerror_error_t **error );
4240
4341 LIBUNA_EXTERN \
44 LIBUNA_INLINE \
4542 int libuna_codepage_windows_950_copy_from_byte_stream(
4643 libuna_unicode_character_t *unicode_character,
4744 const uint8_t *byte_stream,
5047 libcerror_error_t **error );
5148
5249 LIBUNA_EXTERN \
53 LIBUNA_INLINE \
5450 int libuna_codepage_windows_950_copy_to_byte_stream(
5551 libuna_unicode_character_t unicode_character,
5652 uint8_t *byte_stream,
6258 }
6359 #endif
6460
65 #endif
61 #endif /* !defined( _LIBUNA_CODEPAGE_WINDOWS_950_H ) */
6662
00 /*
11 * The internal definitions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3434 #else
3535 #include <byte_stream.h>
3636
37 #define LIBUNA_VERSION 20160705
37 #define LIBUNA_VERSION 20170112
3838
3939 /* The libuna version string
4040 */
41 #define LIBUNA_VERSION_STRING "20160705"
41 #define LIBUNA_VERSION_STRING "20170112"
4242
4343 /* The endian definitions
4444 */
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4343 libuna_error_t *error,
4444 FILE *stream )
4545 {
46 return( libcerror_error_fprint(
47 (libcerror_error_t *) error,
48 stream ) );
46 int print_count = 0;
47
48 print_count = libcerror_error_fprint(
49 (libcerror_error_t *) error,
50 stream );
51
52 return( print_count );
4953 }
5054
5155 /* Prints a descriptive string of the error to the string
5761 char *string,
5862 size_t size )
5963 {
60 return( libcerror_error_sprint(
61 (libcerror_error_t *) error,
62 string,
63 size ) );
64 int print_count = 0;
65
66 print_count = libcerror_error_sprint(
67 (libcerror_error_t *) error,
68 string,
69 size );
70
71 return( print_count );
6472 }
6573
6674 /* Prints a backtrace of the error to the stream
7078 libuna_error_t *error,
7179 FILE *stream )
7280 {
73 return( libcerror_error_backtrace_fprint(
74 (libcerror_error_t *) error,
75 stream ) );
81 int print_count = 0;
82
83 print_count = libcerror_error_backtrace_fprint(
84 (libcerror_error_t *) error,
85 stream );
86
87 return( print_count );
7688 }
7789
7890 /* Prints a backtrace of the error to the string
8496 char *string,
8597 size_t size )
8698 {
87 return( libcerror_error_backtrace_sprint(
88 (libcerror_error_t *) error,
89 string,
90 size ) );
99 int print_count = 0;
100
101 print_count = libcerror_error_backtrace_sprint(
102 (libcerror_error_t *) error,
103 string,
104 size );
105
106 return( print_count );
91107 }
92108
93109 #endif /* !defined( HAVE_LOCAL_LIBUNA ) */
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal extern definition
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3636
3737 #include <libuna/extern.h>
3838
39 #elif defined( _MSC_VER )
40 #define LIBUNA_EXTERN extern
41
4239 #else
4340 #define LIBUNA_EXTERN /* extern */
4441
45 #endif
42 #endif /* !defined( HAVE_LOCAL_LIBUNA ) */
4643
47 #endif
44 #endif /* !defined( _LIBUNA_INTERNAL_EXTERN_H ) */
4845
3434
3535 #endif
3636
37 #endif
37 #endif /* !defined( _LIBUNA_INTERNAL_INLINE_H ) */
3838
00 /*
11 * The internal libcerror header
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Support functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4444 }
4545 #endif
4646
47 #endif
47 #endif /* !defined( _LIBUNA_SUPPORT_H ) */
4848
00 /*
11 * The internal type definitions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Unicode character functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
5252 #include "libuna_codepage_windows_1257.h"
5353 #include "libuna_codepage_windows_1258.h"
5454 #include "libuna_definitions.h"
55 #include "libuna_inline.h"
5655 #include "libuna_libcerror.h"
5756 #include "libuna_types.h"
5857 #include "libuna_unicode_character.h"
6261 * Adds the size to the byte stream character size value
6362 * Returns 1 if successful or -1 on error
6463 */
65 LIBUNA_INLINE \
6664 int libuna_unicode_character_size_to_byte_stream(
6765 libuna_unicode_character_t unicode_character,
6866 int codepage,
172170 /* Copies a Unicode character from a byte stream
173171 * Returns 1 if successful or -1 on error
174172 */
175 LIBUNA_INLINE \
176173 int libuna_unicode_character_copy_from_byte_stream(
177174 libuna_unicode_character_t *unicode_character,
178175 const uint8_t *byte_stream,
750747 /* Copies a Unicode character to a byte stream
751748 * Returns 1 if successful or -1 on error
752749 */
753 LIBUNA_INLINE \
754750 int libuna_unicode_character_copy_to_byte_stream(
755751 libuna_unicode_character_t unicode_character,
756752 uint8_t *byte_stream,
29312927 * Adds the size to the UTF-7 stream character size value
29322928 * Returns 1 if successful or -1 on error
29332929 */
2934 LIBUNA_INLINE \
29352930 int libuna_unicode_character_size_to_utf7_stream(
29362931 libuna_unicode_character_t unicode_character,
29372932 size_t *utf7_stream_character_size,
32193214 *
32203215 * Returns 1 if successful or -1 on error
32213216 */
3222 LIBUNA_INLINE \
32233217 int libuna_unicode_character_copy_from_utf7_stream(
32243218 libuna_unicode_character_t *unicode_character,
32253219 const uint8_t *utf7_stream,
36973691 *
36983692 * Returns 1 if successful or -1 on error
36993693 */
3700 LIBUNA_INLINE \
37013694 int libuna_unicode_character_copy_to_utf7_stream(
37023695 libuna_unicode_character_t unicode_character,
37033696 uint8_t *utf7_stream,
41264119 * Adds the size to the UTF-8 character size value
41274120 * Returns 1 if successful or -1 on error
41284121 */
4129 LIBUNA_INLINE \
41304122 int libuna_unicode_character_size_to_utf8(
41314123 libuna_unicode_character_t unicode_character,
41324124 size_t *utf8_character_size,
41964188 /* Copies a Unicode character from an UTF-8 string
41974189 * Returns 1 if successful or -1 on error
41984190 */
4199 LIBUNA_INLINE \
42004191 int libuna_unicode_character_copy_from_utf8(
42014192 libuna_unicode_character_t *unicode_character,
42024193 const libuna_utf8_character_t *utf8_string,
45214512 /* Copies a Unicode character into a UTF-8 string
45224513 * Returns 1 if successful or -1 on error
45234514 */
4524 LIBUNA_INLINE \
45254515 int libuna_unicode_character_copy_to_utf8(
45264516 libuna_unicode_character_t unicode_character,
45274517 libuna_utf8_character_t *utf8_string,
46484638 * Adds the size to the UTF-16 character size value
46494639 * Returns 1 if successful or -1 on error
46504640 */
4651 LIBUNA_INLINE \
46524641 int libuna_unicode_character_size_to_utf16(
46534642 libuna_unicode_character_t unicode_character,
46544643 size_t *utf16_character_size,
46824671 /* Copies a Unicode character from an UTF-16 string
46834672 * Returns 1 if successful or -1 on error
46844673 */
4685 LIBUNA_INLINE \
46864674 int libuna_unicode_character_copy_from_utf16(
46874675 libuna_unicode_character_t *unicode_character,
46884676 const libuna_utf16_character_t *utf16_string,
47984786 /* Copies a Unicode character into a UTF-16 string
47994787 * Returns 1 if successful or -1 on error
48004788 */
4801 LIBUNA_INLINE \
48024789 int libuna_unicode_character_copy_to_utf16(
48034790 libuna_unicode_character_t unicode_character,
48044791 libuna_utf16_character_t *utf16_string,
48914878 /* Copies a Unicode character from an UTF-16 stream
48924879 * Returns 1 if successful or -1 on error
48934880 */
4894 LIBUNA_INLINE \
48954881 int libuna_unicode_character_copy_from_utf16_stream(
48964882 libuna_unicode_character_t *unicode_character,
48974883 const uint8_t *utf16_stream,
50425028 /* Copies a Unicode character to an UTF-16 stream
50435029 * Returns 1 if successful or -1 on error
50445030 */
5045 LIBUNA_INLINE \
50465031 int libuna_unicode_character_copy_to_utf16_stream(
50475032 libuna_unicode_character_t unicode_character,
50485033 uint8_t *utf16_stream,
51885173 * Adds the size to the UTF-32 character size value
51895174 * Returns 1 if successful or -1 on error
51905175 */
5191 LIBUNA_INLINE \
51925176 int libuna_unicode_character_size_to_utf32(
51935177 libuna_unicode_character_t unicode_character LIBUNA_ATTRIBUTE_UNUSED,
51945178 size_t *utf32_character_size,
52175201 /* Copies a Unicode character from an UTF-32 string
52185202 * Returns 1 if successful or -1 on error
52195203 */
5220 LIBUNA_INLINE \
52215204 int libuna_unicode_character_copy_from_utf32(
52225205 libuna_unicode_character_t *unicode_character,
52235206 const libuna_utf32_character_t *utf32_string,
53015284 /* Copies a Unicode character into a UTF-32 string
53025285 * Returns 1 if successful or -1 on error
53035286 */
5304 LIBUNA_INLINE \
53055287 int libuna_unicode_character_copy_to_utf32(
53065288 libuna_unicode_character_t unicode_character,
53075289 libuna_utf32_character_t *utf32_string,
53755357 /* Copies a Unicode character from an UTF-32 stream
53765358 * Returns 1 if successful or -1 on error
53775359 */
5378 LIBUNA_INLINE \
53795360 int libuna_unicode_character_copy_from_utf32_stream(
53805361 libuna_unicode_character_t *unicode_character,
53815362 const uint8_t *utf32_stream,
54885469 /* Copies a Unicode character to an UTF-32 stream
54895470 * Returns 1 if successful or -1 on error
54905471 */
5491 LIBUNA_INLINE \
54925472 int libuna_unicode_character_copy_to_utf32_stream(
54935473 libuna_unicode_character_t unicode_character,
54945474 uint8_t *utf32_stream,
00 /*
11 * Unicode character functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2626
2727 #include "libuna_definitions.h"
2828 #include "libuna_extern.h"
29 #include "libuna_inline.h"
3029 #include "libuna_libcerror.h"
3130 #include "libuna_types.h"
3231
3534 #endif
3635
3736 LIBUNA_EXTERN \
38 LIBUNA_INLINE \
3937 int libuna_unicode_character_size_to_byte_stream(
4038 libuna_unicode_character_t unicode_character,
4139 int codepage,
4341 libcerror_error_t **error );
4442
4543 LIBUNA_EXTERN \
46 LIBUNA_INLINE \
4744 int libuna_unicode_character_copy_from_byte_stream(
4845 libuna_unicode_character_t *unicode_character,
4946 const uint8_t *byte_stream,
5350 libcerror_error_t **error );
5451
5552 LIBUNA_EXTERN \
56 LIBUNA_INLINE \
5753 int libuna_unicode_character_copy_to_byte_stream(
5854 libuna_unicode_character_t unicode_character,
5955 uint8_t *byte_stream,
6359 libcerror_error_t **error );
6460
6561 LIBUNA_EXTERN \
66 LIBUNA_INLINE \
6762 int libuna_unicode_character_size_to_utf7_stream(
6863 libuna_unicode_character_t unicode_character,
6964 size_t *utf7_stream_character_size,
7166 libcerror_error_t **error );
7267
7368 LIBUNA_EXTERN \
74 LIBUNA_INLINE \
7569 int libuna_unicode_character_copy_from_utf7_stream(
7670 libuna_unicode_character_t *unicode_character,
7771 const uint8_t *utf7_stream,
8175 libcerror_error_t **error );
8276
8377 LIBUNA_EXTERN \
84 LIBUNA_INLINE \
8578 int libuna_unicode_character_copy_to_utf7_stream(
8679 libuna_unicode_character_t unicode_character,
8780 uint8_t *utf7_stream,
9184 libcerror_error_t **error );
9285
9386 LIBUNA_EXTERN \
94 LIBUNA_INLINE \
9587 int libuna_unicode_character_size_to_utf8(
9688 libuna_unicode_character_t unicode_character,
9789 size_t *utf8_character_size,
9890 libcerror_error_t **error );
9991
10092 LIBUNA_EXTERN \
101 LIBUNA_INLINE \
10293 int libuna_unicode_character_copy_from_utf8(
10394 libuna_unicode_character_t *unicode_character,
10495 const libuna_utf8_character_t *utf8_string,
10798 libcerror_error_t **error );
10899
109100 LIBUNA_EXTERN \
110 LIBUNA_INLINE \
111101 int libuna_unicode_character_copy_to_utf8(
112102 libuna_unicode_character_t unicode_character,
113103 libuna_utf8_character_t *utf8_string,
116106 libcerror_error_t **error );
117107
118108 LIBUNA_EXTERN \
119 LIBUNA_INLINE \
120109 int libuna_unicode_character_size_to_utf16(
121110 libuna_unicode_character_t unicode_character,
122111 size_t *utf16_character_size,
123112 libcerror_error_t **error );
124113
125114 LIBUNA_EXTERN \
126 LIBUNA_INLINE \
127115 int libuna_unicode_character_copy_from_utf16(
128116 libuna_unicode_character_t *unicode_character,
129117 const libuna_utf16_character_t *utf16_string,
132120 libcerror_error_t **error );
133121
134122 LIBUNA_EXTERN \
135 LIBUNA_INLINE \
136123 int libuna_unicode_character_copy_to_utf16(
137124 libuna_unicode_character_t unicode_character,
138125 libuna_utf16_character_t *utf16_string,
141128 libcerror_error_t **error );
142129
143130 LIBUNA_EXTERN \
144 LIBUNA_INLINE \
145131 int libuna_unicode_character_copy_from_utf16_stream(
146132 libuna_unicode_character_t *unicode_character,
147133 const uint8_t *utf16_stream,
151137 libcerror_error_t **error );
152138
153139 LIBUNA_EXTERN \
154 LIBUNA_INLINE \
155140 int libuna_unicode_character_copy_to_utf16_stream(
156141 libuna_unicode_character_t unicode_character,
157142 uint8_t *utf16_stream,
161146 libcerror_error_t **error );
162147
163148 LIBUNA_EXTERN \
164 LIBUNA_INLINE \
165149 int libuna_unicode_character_size_to_utf32(
166150 libuna_unicode_character_t unicode_character,
167151 size_t *utf32_character_size,
168152 libcerror_error_t **error );
169153
170154 LIBUNA_EXTERN \
171 LIBUNA_INLINE \
172155 int libuna_unicode_character_copy_from_utf32(
173156 libuna_unicode_character_t *unicode_character,
174157 const libuna_utf32_character_t *utf32_string,
177160 libcerror_error_t **error );
178161
179162 LIBUNA_EXTERN \
180 LIBUNA_INLINE \
181163 int libuna_unicode_character_copy_to_utf32(
182164 libuna_unicode_character_t unicode_character,
183165 libuna_utf32_character_t *utf32_string,
186168 libcerror_error_t **error );
187169
188170 LIBUNA_EXTERN \
189 LIBUNA_INLINE \
190171 int libuna_unicode_character_copy_from_utf32_stream(
191172 libuna_unicode_character_t *unicode_character,
192173 const uint8_t *utf32_stream,
196177 libcerror_error_t **error );
197178
198179 LIBUNA_EXTERN \
199 LIBUNA_INLINE \
200180 int libuna_unicode_character_copy_to_utf32_stream(
201181 libuna_unicode_character_t unicode_character,
202182 uint8_t *utf32_stream,
209189 }
210190 #endif
211191
212 #endif
192 #endif /* !defined( _LIBUNA_UNICDODE_CHARACTER_H ) */
213193
00 /*
11 * The internal unused definition
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Percent or URL encoded stream functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Percent or URL encoded stream functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
6666 }
6767 #endif
6868
69 #endif
69 #endif /* !defined( _LIBUNA_URL_STREAM_H ) */
7070
00 /*
11 * UTF-16 stream functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2222 #include <types.h>
2323
2424 #include "libuna_definitions.h"
25 #include "libuna_inline.h"
2625 #include "libuna_libcerror.h"
2726 #include "libuna_types.h"
2827 #include "libuna_unicode_character.h"
3130 /* Copies an UTF-16 stream byte order mark (BOM)
3231 * Returns 1 if successful or -1 on error
3332 */
34 LIBUNA_INLINE \
3533 int libuna_utf16_stream_copy_byte_order_mark(
3634 uint8_t *utf16_stream,
3735 size_t utf16_stream_size,
00 /*
11 * UTF-16 stream functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2525 #include <types.h>
2626
2727 #include "libuna_extern.h"
28 #include "libuna_inline.h"
2928 #include "libuna_libcerror.h"
3029 #include "libuna_types.h"
3130
3433 #endif
3534
3635 LIBUNA_EXTERN \
37 LIBUNA_INLINE \
3836 int libuna_utf16_stream_copy_byte_order_mark(
3937 uint8_t *utf16_stream,
4038 size_t utf16_stream_size,
106104 }
107105 #endif
108106
109 #endif
107 #endif /* !defined( _LIBUNA_UTF16_STREAM_H ) */
110108
00 /*
11 * UTF-16 string functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * UTF-16 string functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
296296 }
297297 #endif
298298
299 #endif
300
299 #endif /* !defined( _LIBUNA_UTF16_STRING_H ) */
300
00 /*
11 * UTF-32 stream functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2222 #include <types.h>
2323
2424 #include "libuna_definitions.h"
25 #include "libuna_inline.h"
2625 #include "libuna_libcerror.h"
2726 #include "libuna_types.h"
2827 #include "libuna_unicode_character.h"
3130 /* Copies an UTF-32 stream byte order mark (BOM)
3231 * Returns 1 if successful or -1 on error
3332 */
34 LIBUNA_INLINE \
3533 int libuna_utf32_stream_copy_byte_order_mark(
3634 uint8_t *utf32_stream,
3735 size_t utf32_stream_size,
00 /*
11 * UTF-32 stream functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2525 #include <types.h>
2626
2727 #include "libuna_extern.h"
28 #include "libuna_inline.h"
2928 #include "libuna_libcerror.h"
3029 #include "libuna_types.h"
3130
3433 #endif
3534
3635 LIBUNA_EXTERN \
37 LIBUNA_INLINE \
3836 int libuna_utf32_stream_copy_byte_order_mark(
3937 uint8_t *utf32_stream,
4038 size_t utf32_stream_size,
106104 }
107105 #endif
108106
109 #endif
107 #endif /* !defined( _LIBUNA_UTF32_STREAM_H ) */
110108
00 /*
11 * UTF-32 string functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * UTF-32 string functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
292292 }
293293 #endif
294294
295 #endif
296
295 #endif /* !defined( _LIBUNA_UTF32_STRING_H ) */
296
00 /*
11 * UTF-7 stream functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2323 #include <types.h>
2424
2525 #include "libuna_definitions.h"
26 #include "libuna_inline.h"
2726 #include "libuna_libcerror.h"
2827 #include "libuna_types.h"
2928 #include "libuna_unicode_character.h"
00 /*
11 * UTF-7 stream functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2525 #include <types.h>
2626
2727 #include "libuna_extern.h"
28 #include "libuna_inline.h"
2928 #include "libuna_libcerror.h"
3029 #include "libuna_types.h"
3130
9493 }
9594 #endif
9695
97 #endif
96 #endif /* !defined( _LIBUNA_UTF7_STREAM_H ) */
9897
00 /*
11 * UTF-8 stream functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2323 #include <types.h>
2424
2525 #include "libuna_definitions.h"
26 #include "libuna_inline.h"
2726 #include "libuna_libcerror.h"
2827 #include "libuna_types.h"
2928 #include "libuna_unicode_character.h"
3231 /* Copies an UTF-8 stream byte order mark (BOM)
3332 * Returns 1 if successful or -1 on error
3433 */
35 LIBUNA_INLINE \
3634 int libuna_utf8_stream_copy_byte_order_mark(
3735 uint8_t *utf8_stream,
3836 size_t utf8_stream_size,
00 /*
11 * UTF-8 stream functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2525 #include <types.h>
2626
2727 #include "libuna_extern.h"
28 #include "libuna_inline.h"
2928 #include "libuna_libcerror.h"
3029 #include "libuna_types.h"
3130
3433 #endif
3534
3635 LIBUNA_EXTERN \
37 LIBUNA_INLINE \
3836 int libuna_utf8_stream_copy_byte_order_mark(
3937 uint8_t *utf8_stream,
4038 size_t utf8_stream_size,
102100 }
103101 #endif
104102
105 #endif
103 #endif /* !defined( _LIBUNA_UTF8_STREAM_H ) */
106104
00 /*
11 * UTF-8 string functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * UTF-8 string functions
22 *
3 * Copyright (C) 2008-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2008-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
300300 }
301301 #endif
302302
303 #endif
304
303 #endif /* !defined( _LIBUNA_UTF8_STRING_H ) */
304
+3652
-2160
ltmain.sh less more
0
1 # libtool (GNU libtool) 2.4.2
0 #! /bin/sh
1 ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
2 ## by inline-source v2014-01-03.01
3
4 # libtool (GNU libtool) 2.4.6
5 # Provide generalized library-building support services.
26 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
37
4 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
5 # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
8 # Copyright (C) 1996-2015 Free Software Foundation, Inc.
69 # This is free software; see the source for copying conditions. There is NO
710 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
811
2225 # General Public License for more details.
2326 #
2427 # You should have received a copy of the GNU General Public License
25 # along with GNU Libtool; see the file COPYING. If not, a copy
26 # can be downloaded from http://www.gnu.org/licenses/gpl.html,
27 # or obtained by writing to the Free Software Foundation, Inc.,
28 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
29
30 # Usage: $progname [OPTION]... [MODE-ARG]...
31 #
32 # Provide generalized library-building support services.
33 #
34 # --config show all configuration variables
35 # --debug enable verbose shell tracing
36 # -n, --dry-run display commands without modifying any files
37 # --features display basic configuration information and exit
38 # --mode=MODE use operation mode MODE
39 # --preserve-dup-deps don't remove duplicate dependency libraries
40 # --quiet, --silent don't print informational messages
41 # --no-quiet, --no-silent
42 # print informational messages (default)
43 # --no-warn don't display warning messages
44 # --tag=TAG use configuration variables from tag TAG
45 # -v, --verbose print more informational messages than default
46 # --no-verbose don't print the extra informational messages
47 # --version print version information
48 # -h, --help, --help-all print short, long, or detailed help message
49 #
50 # MODE must be one of the following:
51 #
52 # clean remove files from the build directory
53 # compile compile a source file into a libtool object
54 # execute automatically set library path, then run a program
55 # finish complete the installation of libtool libraries
56 # install install libraries or executables
57 # link create a library or an executable
58 # uninstall remove libraries from an installed directory
59 #
60 # MODE-ARGS vary depending on the MODE. When passed as first option,
61 # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
62 # Try `$progname --help --mode=MODE' for a more detailed description of MODE.
63 #
64 # When reporting a bug, please describe a test case to reproduce it and
65 # include the following information:
66 #
67 # host-triplet: $host
68 # shell: $SHELL
69 # compiler: $LTCC
70 # compiler flags: $LTCFLAGS
71 # linker: $LD (gnu? $with_gnu_ld)
72 # $progname: (GNU libtool) 2.4.2
73 # automake: $automake_version
74 # autoconf: $autoconf_version
75 #
76 # Report bugs to <bug-libtool@gnu.org>.
77 # GNU libtool home page: <http://www.gnu.org/software/libtool/>.
78 # General help using GNU software: <http://www.gnu.org/gethelp/>.
28 # along with this program. If not, see <http://www.gnu.org/licenses/>.
29
7930
8031 PROGRAM=libtool
8132 PACKAGE=libtool
82 VERSION=2.4.2
83 TIMESTAMP=""
84 package_revision=1.3337
85
86 # Be Bourne compatible
87 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
33 VERSION=2.4.6
34 package_revision=2.4.6
35
36
37 ## ------ ##
38 ## Usage. ##
39 ## ------ ##
40
41 # Run './libtool --help' for help with using this script from the
42 # command line.
43
44
45 ## ------------------------------- ##
46 ## User overridable command paths. ##
47 ## ------------------------------- ##
48
49 # After configure completes, it has a better idea of some of the
50 # shell tools we need than the defaults used by the functions shared
51 # with bootstrap, so set those here where they can still be over-
52 # ridden by the user, but otherwise take precedence.
53
54 : ${AUTOCONF="autoconf"}
55 : ${AUTOMAKE="automake"}
56
57
58 ## -------------------------- ##
59 ## Source external libraries. ##
60 ## -------------------------- ##
61
62 # Much of our low-level functionality needs to be sourced from external
63 # libraries, which are installed to $pkgauxdir.
64
65 # Set a version string for this script.
66 scriptversion=2015-01-20.17; # UTC
67
68 # General shell script boiler plate, and helper functions.
69 # Written by Gary V. Vaughan, 2004
70
71 # Copyright (C) 2004-2015 Free Software Foundation, Inc.
72 # This is free software; see the source for copying conditions. There is NO
73 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
74
75 # This program is free software; you can redistribute it and/or modify
76 # it under the terms of the GNU General Public License as published by
77 # the Free Software Foundation; either version 3 of the License, or
78 # (at your option) any later version.
79
80 # As a special exception to the GNU General Public License, if you distribute
81 # this file as part of a program or library that is built using GNU Libtool,
82 # you may include this file under the same distribution terms that you use
83 # for the rest of that program.
84
85 # This program is distributed in the hope that it will be useful,
86 # but WITHOUT ANY WARRANTY; without even the implied warranty of
87 # MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
88 # General Public License for more details.
89
90 # You should have received a copy of the GNU General Public License
91 # along with this program. If not, see <http://www.gnu.org/licenses/>.
92
93 # Please report bugs or propose patches to gary@gnu.org.
94
95
96 ## ------ ##
97 ## Usage. ##
98 ## ------ ##
99
100 # Evaluate this file near the top of your script to gain access to
101 # the functions and variables defined here:
102 #
103 # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh
104 #
105 # If you need to override any of the default environment variable
106 # settings, do that before evaluating this file.
107
108
109 ## -------------------- ##
110 ## Shell normalisation. ##
111 ## -------------------- ##
112
113 # Some shells need a little help to be as Bourne compatible as possible.
114 # Before doing anything else, make sure all that help has been provided!
115
116 DUALCASE=1; export DUALCASE # for MKS sh
117 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
88118 emulate sh
89119 NULLCMD=:
90 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
120 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
91121 # is contrary to our usage. Disable this feature.
92122 alias -g '${1+"$@"}'='"$@"'
93123 setopt NO_GLOB_SUBST
94124 else
95 case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
125 case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac
96126 fi
97 BIN_SH=xpg4; export BIN_SH # for Tru64
98 DUALCASE=1; export DUALCASE # for MKS sh
99
100 # A function that is used when there is no print builtin or printf.
101 func_fallback_echo ()
102 {
103 eval 'cat <<_LTECHO_EOF
104 $1
105 _LTECHO_EOF'
106 }
107
108 # NLS nuisances: We save the old values to restore during execute mode.
109 lt_user_locale=
110 lt_safe_locale=
111 for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
127
128 # NLS nuisances: We save the old values in case they are required later.
129 _G_user_locale=
130 _G_safe_locale=
131 for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
112132 do
113 eval "if test \"\${$lt_var+set}\" = set; then
114 save_$lt_var=\$$lt_var
115 $lt_var=C
116 export $lt_var
117 lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
118 lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
133 eval "if test set = \"\${$_G_var+set}\"; then
134 save_$_G_var=\$$_G_var
135 $_G_var=C
136 export $_G_var
137 _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\"
138 _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\"
119139 fi"
120140 done
121 LC_ALL=C
122 LANGUAGE=C
123 export LANGUAGE LC_ALL
124
125 $lt_unset CDPATH
126
141
142 # CDPATH.
143 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
144
145 # Make sure IFS has a sensible default
146 sp=' '
147 nl='
148 '
149 IFS="$sp $nl"
150
151 # There are apparently some retarded systems that use ';' as a PATH separator!
152 if test "${PATH_SEPARATOR+set}" != set; then
153 PATH_SEPARATOR=:
154 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
155 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
156 PATH_SEPARATOR=';'
157 }
158 fi
159
160
161
162 ## ------------------------- ##
163 ## Locate command utilities. ##
164 ## ------------------------- ##
165
166
167 # func_executable_p FILE
168 # ----------------------
169 # Check that FILE is an executable regular file.
170 func_executable_p ()
171 {
172 test -f "$1" && test -x "$1"
173 }
174
175
176 # func_path_progs PROGS_LIST CHECK_FUNC [PATH]
177 # --------------------------------------------
178 # Search for either a program that responds to --version with output
179 # containing "GNU", or else returned by CHECK_FUNC otherwise, by
180 # trying all the directories in PATH with each of the elements of
181 # PROGS_LIST.
182 #
183 # CHECK_FUNC should accept the path to a candidate program, and
184 # set $func_check_prog_result if it truncates its output less than
185 # $_G_path_prog_max characters.
186 func_path_progs ()
187 {
188 _G_progs_list=$1
189 _G_check_func=$2
190 _G_PATH=${3-"$PATH"}
191
192 _G_path_prog_max=0
193 _G_path_prog_found=false
194 _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:}
195 for _G_dir in $_G_PATH; do
196 IFS=$_G_save_IFS
197 test -z "$_G_dir" && _G_dir=.
198 for _G_prog_name in $_G_progs_list; do
199 for _exeext in '' .EXE; do
200 _G_path_prog=$_G_dir/$_G_prog_name$_exeext
201 func_executable_p "$_G_path_prog" || continue
202 case `"$_G_path_prog" --version 2>&1` in
203 *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;;
204 *) $_G_check_func $_G_path_prog
205 func_path_progs_result=$func_check_prog_result
206 ;;
207 esac
208 $_G_path_prog_found && break 3
209 done
210 done
211 done
212 IFS=$_G_save_IFS
213 test -z "$func_path_progs_result" && {
214 echo "no acceptable sed could be found in \$PATH" >&2
215 exit 1
216 }
217 }
218
219
220 # We want to be able to use the functions in this file before configure
221 # has figured out where the best binaries are kept, which means we have
222 # to search for them ourselves - except when the results are already set
223 # where we skip the searches.
224
225 # Unless the user overrides by setting SED, search the path for either GNU
226 # sed, or the sed that truncates its output the least.
227 test -z "$SED" && {
228 _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
229 for _G_i in 1 2 3 4 5 6 7; do
230 _G_sed_script=$_G_sed_script$nl$_G_sed_script
231 done
232 echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed
233 _G_sed_script=
234
235 func_check_prog_sed ()
236 {
237 _G_path_prog=$1
238
239 _G_count=0
240 printf 0123456789 >conftest.in
241 while :
242 do
243 cat conftest.in conftest.in >conftest.tmp
244 mv conftest.tmp conftest.in
245 cp conftest.in conftest.nl
246 echo '' >> conftest.nl
247 "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break
248 diff conftest.out conftest.nl >/dev/null 2>&1 || break
249 _G_count=`expr $_G_count + 1`
250 if test "$_G_count" -gt "$_G_path_prog_max"; then
251 # Best one so far, save it but keep looking for a better one
252 func_check_prog_result=$_G_path_prog
253 _G_path_prog_max=$_G_count
254 fi
255 # 10*(2^10) chars as input seems more than enough
256 test 10 -lt "$_G_count" && break
257 done
258 rm -f conftest.in conftest.tmp conftest.nl conftest.out
259 }
260
261 func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
262 rm -f conftest.sed
263 SED=$func_path_progs_result
264 }
265
266
267 # Unless the user overrides by setting GREP, search the path for either GNU
268 # grep, or the grep that truncates its output the least.
269 test -z "$GREP" && {
270 func_check_prog_grep ()
271 {
272 _G_path_prog=$1
273
274 _G_count=0
275 _G_path_prog_max=0
276 printf 0123456789 >conftest.in
277 while :
278 do
279 cat conftest.in conftest.in >conftest.tmp
280 mv conftest.tmp conftest.in
281 cp conftest.in conftest.nl
282 echo 'GREP' >> conftest.nl
283 "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break
284 diff conftest.out conftest.nl >/dev/null 2>&1 || break
285 _G_count=`expr $_G_count + 1`
286 if test "$_G_count" -gt "$_G_path_prog_max"; then
287 # Best one so far, save it but keep looking for a better one
288 func_check_prog_result=$_G_path_prog
289 _G_path_prog_max=$_G_count
290 fi
291 # 10*(2^10) chars as input seems more than enough
292 test 10 -lt "$_G_count" && break
293 done
294 rm -f conftest.in conftest.tmp conftest.nl conftest.out
295 }
296
297 func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
298 GREP=$func_path_progs_result
299 }
300
301
302 ## ------------------------------- ##
303 ## User overridable command paths. ##
304 ## ------------------------------- ##
305
306 # All uppercase variable names are used for environment variables. These
307 # variables can be overridden by the user before calling a script that
308 # uses them if a suitable command of that name is not already available
309 # in the command search PATH.
310
311 : ${CP="cp -f"}
312 : ${ECHO="printf %s\n"}
313 : ${EGREP="$GREP -E"}
314 : ${FGREP="$GREP -F"}
315 : ${LN_S="ln -s"}
316 : ${MAKE="make"}
317 : ${MKDIR="mkdir"}
318 : ${MV="mv -f"}
319 : ${RM="rm -f"}
320 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
321
322
323 ## -------------------- ##
324 ## Useful sed snippets. ##
325 ## -------------------- ##
326
327 sed_dirname='s|/[^/]*$||'
328 sed_basename='s|^.*/||'
329
330 # Sed substitution that helps us do robust quoting. It backslashifies
331 # metacharacters that are still active within double-quoted strings.
332 sed_quote_subst='s|\([`"$\\]\)|\\\1|g'
333
334 # Same as above, but do not quote variable references.
335 sed_double_quote_subst='s/\(["`\\]\)/\\\1/g'
336
337 # Sed substitution that turns a string into a regex matching for the
338 # string literally.
339 sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g'
340
341 # Sed substitution that converts a w32 file name or path
342 # that contains forward slashes, into one that contains
343 # (escaped) backslashes. A very naive implementation.
344 sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
345
346 # Re-'\' parameter expansions in output of sed_double_quote_subst that
347 # were '\'-ed in input to the same. If an odd number of '\' preceded a
348 # '$' in input to sed_double_quote_subst, that '$' was protected from
349 # expansion. Since each input '\' is now two '\'s, look for any number
350 # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'.
351 _G_bs='\\'
352 _G_bs2='\\\\'
353 _G_bs4='\\\\\\\\'
354 _G_dollar='\$'
355 sed_double_backslash="\
356 s/$_G_bs4/&\\
357 /g
358 s/^$_G_bs2$_G_dollar/$_G_bs&/
359 s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g
360 s/\n//g"
361
362
363 ## ----------------- ##
364 ## Global variables. ##
365 ## ----------------- ##
366
367 # Except for the global variables explicitly listed below, the following
368 # functions in the '^func_' namespace, and the '^require_' namespace
369 # variables initialised in the 'Resource management' section, sourcing
370 # this file will not pollute your global namespace with anything
371 # else. There's no portable way to scope variables in Bourne shell
372 # though, so actually running these functions will sometimes place
373 # results into a variable named after the function, and often use
374 # temporary variables in the '^_G_' namespace. If you are careful to
375 # avoid using those namespaces casually in your sourcing script, things
376 # should continue to work as you expect. And, of course, you can freely
377 # overwrite any of the functions or variables defined here before
378 # calling anything to customize them.
379
380 EXIT_SUCCESS=0
381 EXIT_FAILURE=1
382 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
383 EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
384
385 # Allow overriding, eg assuming that you follow the convention of
386 # putting '$debug_cmd' at the start of all your functions, you can get
387 # bash to show function call trace with:
388 #
389 # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
390 debug_cmd=${debug_cmd-":"}
391 exit_cmd=:
392
393 # By convention, finish your script with:
394 #
395 # exit $exit_status
396 #
397 # so that you can set exit_status to non-zero if you want to indicate
398 # something went wrong during execution without actually bailing out at
399 # the point of failure.
400 exit_status=$EXIT_SUCCESS
127401
128402 # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
129403 # is ksh but when the shell is invoked as "sh" and the current value of
130404 # the _XPG environment variable is not equal to 1 (one), the special
131405 # positional parameter $0, within a function call, is the name of the
132406 # function.
133 progpath="$0"
134
135
136
137 : ${CP="cp -f"}
138 test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
139 : ${MAKE="make"}
140 : ${MKDIR="mkdir"}
141 : ${MV="mv -f"}
142 : ${RM="rm -f"}
143 : ${SHELL="${CONFIG_SHELL-/bin/sh}"}
144 : ${Xsed="$SED -e 1s/^X//"}
145
146 # Global variables:
147 EXIT_SUCCESS=0
148 EXIT_FAILURE=1
149 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
150 EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
151
152 exit_status=$EXIT_SUCCESS
153
154 # Make sure IFS has a sensible default
155 lt_nl='
156 '
157 IFS=" $lt_nl"
158
159 dirname="s,/[^/]*$,,"
160 basename="s,^.*/,,"
161
162 # func_dirname file append nondir_replacement
407 progpath=$0
408
409 # The name of this program.
410 progname=`$ECHO "$progpath" |$SED "$sed_basename"`
411
412 # Make sure we have an absolute progpath for reexecution:
413 case $progpath in
414 [\\/]*|[A-Za-z]:\\*) ;;
415 *[\\/]*)
416 progdir=`$ECHO "$progpath" |$SED "$sed_dirname"`
417 progdir=`cd "$progdir" && pwd`
418 progpath=$progdir/$progname
419 ;;
420 *)
421 _G_IFS=$IFS
422 IFS=${PATH_SEPARATOR-:}
423 for progdir in $PATH; do
424 IFS=$_G_IFS
425 test -x "$progdir/$progname" && break
426 done
427 IFS=$_G_IFS
428 test -n "$progdir" || progdir=`pwd`
429 progpath=$progdir/$progname
430 ;;
431 esac
432
433
434 ## ----------------- ##
435 ## Standard options. ##
436 ## ----------------- ##
437
438 # The following options affect the operation of the functions defined
439 # below, and should be set appropriately depending on run-time para-
440 # meters passed on the command line.
441
442 opt_dry_run=false
443 opt_quiet=false
444 opt_verbose=false
445
446 # Categories 'all' and 'none' are always available. Append any others
447 # you will pass as the first argument to func_warning from your own
448 # code.
449 warning_categories=
450
451 # By default, display warnings according to 'opt_warning_types'. Set
452 # 'warning_func' to ':' to elide all warnings, or func_fatal_error to
453 # treat the next displayed warning as a fatal error.
454 warning_func=func_warn_and_continue
455
456 # Set to 'all' to display all warnings, 'none' to suppress all
457 # warnings, or a space delimited list of some subset of
458 # 'warning_categories' to display only the listed warnings.
459 opt_warning_types=all
460
461
462 ## -------------------- ##
463 ## Resource management. ##
464 ## -------------------- ##
465
466 # This section contains definitions for functions that each ensure a
467 # particular resource (a file, or a non-empty configuration variable for
468 # example) is available, and if appropriate to extract default values
469 # from pertinent package files. Call them using their associated
470 # 'require_*' variable to ensure that they are executed, at most, once.
471 #
472 # It's entirely deliberate that calling these functions can set
473 # variables that don't obey the namespace limitations obeyed by the rest
474 # of this file, in order that that they be as useful as possible to
475 # callers.
476
477
478 # require_term_colors
479 # -------------------
480 # Allow display of bold text on terminals that support it.
481 require_term_colors=func_require_term_colors
482 func_require_term_colors ()
483 {
484 $debug_cmd
485
486 test -t 1 && {
487 # COLORTERM and USE_ANSI_COLORS environment variables take
488 # precedence, because most terminfo databases neglect to describe
489 # whether color sequences are supported.
490 test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"}
491
492 if test 1 = "$USE_ANSI_COLORS"; then
493 # Standard ANSI escape sequences
494 tc_reset=''
495 tc_bold=''; tc_standout=''
496 tc_red=''; tc_green=''
497 tc_blue=''; tc_cyan=''
498 else
499 # Otherwise trust the terminfo database after all.
500 test -n "`tput sgr0 2>/dev/null`" && {
501 tc_reset=`tput sgr0`
502 test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold`
503 tc_standout=$tc_bold
504 test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso`
505 test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1`
506 test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2`
507 test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4`
508 test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5`
509 }
510 fi
511 }
512
513 require_term_colors=:
514 }
515
516
517 ## ----------------- ##
518 ## Function library. ##
519 ## ----------------- ##
520
521 # This section contains a variety of useful functions to call in your
522 # scripts. Take note of the portable wrappers for features provided by
523 # some modern shells, which will fall back to slower equivalents on
524 # less featureful shells.
525
526
527 # func_append VAR VALUE
528 # ---------------------
529 # Append VALUE onto the existing contents of VAR.
530
531 # We should try to minimise forks, especially on Windows where they are
532 # unreasonably slow, so skip the feature probes when bash or zsh are
533 # being used:
534 if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
535 : ${_G_HAVE_ARITH_OP="yes"}
536 : ${_G_HAVE_XSI_OPS="yes"}
537 # The += operator was introduced in bash 3.1
538 case $BASH_VERSION in
539 [12].* | 3.0 | 3.0*) ;;
540 *)
541 : ${_G_HAVE_PLUSEQ_OP="yes"}
542 ;;
543 esac
544 fi
545
546 # _G_HAVE_PLUSEQ_OP
547 # Can be empty, in which case the shell is probed, "yes" if += is
548 # useable or anything else if it does not work.
549 test -z "$_G_HAVE_PLUSEQ_OP" \
550 && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
551 && _G_HAVE_PLUSEQ_OP=yes
552
553 if test yes = "$_G_HAVE_PLUSEQ_OP"
554 then
555 # This is an XSI compatible shell, allowing a faster implementation...
556 eval 'func_append ()
557 {
558 $debug_cmd
559
560 eval "$1+=\$2"
561 }'
562 else
563 # ...otherwise fall back to using expr, which is often a shell builtin.
564 func_append ()
565 {
566 $debug_cmd
567
568 eval "$1=\$$1\$2"
569 }
570 fi
571
572
573 # func_append_quoted VAR VALUE
574 # ----------------------------
575 # Quote VALUE and append to the end of shell variable VAR, separated
576 # by a space.
577 if test yes = "$_G_HAVE_PLUSEQ_OP"; then
578 eval 'func_append_quoted ()
579 {
580 $debug_cmd
581
582 func_quote_for_eval "$2"
583 eval "$1+=\\ \$func_quote_for_eval_result"
584 }'
585 else
586 func_append_quoted ()
587 {
588 $debug_cmd
589
590 func_quote_for_eval "$2"
591 eval "$1=\$$1\\ \$func_quote_for_eval_result"
592 }
593 fi
594
595
596 # func_append_uniq VAR VALUE
597 # --------------------------
598 # Append unique VALUE onto the existing contents of VAR, assuming
599 # entries are delimited by the first character of VALUE. For example:
600 #
601 # func_append_uniq options " --another-option option-argument"
602 #
603 # will only append to $options if " --another-option option-argument "
604 # is not already present somewhere in $options already (note spaces at
605 # each end implied by leading space in second argument).
606 func_append_uniq ()
607 {
608 $debug_cmd
609
610 eval _G_current_value='`$ECHO $'$1'`'
611 _G_delim=`expr "$2" : '\(.\)'`
612
613 case $_G_delim$_G_current_value$_G_delim in
614 *"$2$_G_delim"*) ;;
615 *) func_append "$@" ;;
616 esac
617 }
618
619
620 # func_arith TERM...
621 # ------------------
622 # Set func_arith_result to the result of evaluating TERMs.
623 test -z "$_G_HAVE_ARITH_OP" \
624 && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \
625 && _G_HAVE_ARITH_OP=yes
626
627 if test yes = "$_G_HAVE_ARITH_OP"; then
628 eval 'func_arith ()
629 {
630 $debug_cmd
631
632 func_arith_result=$(( $* ))
633 }'
634 else
635 func_arith ()
636 {
637 $debug_cmd
638
639 func_arith_result=`expr "$@"`
640 }
641 fi
642
643
644 # func_basename FILE
645 # ------------------
646 # Set func_basename_result to FILE with everything up to and including
647 # the last / stripped.
648 if test yes = "$_G_HAVE_XSI_OPS"; then
649 # If this shell supports suffix pattern removal, then use it to avoid
650 # forking. Hide the definitions single quotes in case the shell chokes
651 # on unsupported syntax...
652 _b='func_basename_result=${1##*/}'
653 _d='case $1 in
654 */*) func_dirname_result=${1%/*}$2 ;;
655 * ) func_dirname_result=$3 ;;
656 esac'
657
658 else
659 # ...otherwise fall back to using sed.
660 _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`'
661 _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"`
662 if test "X$func_dirname_result" = "X$1"; then
663 func_dirname_result=$3
664 else
665 func_append func_dirname_result "$2"
666 fi'
667 fi
668
669 eval 'func_basename ()
670 {
671 $debug_cmd
672
673 '"$_b"'
674 }'
675
676
677 # func_dirname FILE APPEND NONDIR_REPLACEMENT
678 # -------------------------------------------
163679 # Compute the dirname of FILE. If nonempty, add APPEND to the result,
164680 # otherwise set result to NONDIR_REPLACEMENT.
165 func_dirname ()
166 {
167 func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
168 if test "X$func_dirname_result" = "X${1}"; then
169 func_dirname_result="${3}"
170 else
171 func_dirname_result="$func_dirname_result${2}"
172 fi
173 } # func_dirname may be replaced by extended shell implementation
174
175
176 # func_basename file
177 func_basename ()
178 {
179 func_basename_result=`$ECHO "${1}" | $SED "$basename"`
180 } # func_basename may be replaced by extended shell implementation
181
182
183 # func_dirname_and_basename file append nondir_replacement
184 # perform func_basename and func_dirname in a single function
681 eval 'func_dirname ()
682 {
683 $debug_cmd
684
685 '"$_d"'
686 }'
687
688
689 # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT
690 # --------------------------------------------------------
691 # Perform func_basename and func_dirname in a single function
185692 # call:
186693 # dirname: Compute the dirname of FILE. If nonempty,
187694 # add APPEND to the result, otherwise set result
189696 # value returned in "$func_dirname_result"
190697 # basename: Compute filename of FILE.
191698 # value retuned in "$func_basename_result"
192 # Implementation must be kept synchronized with func_dirname
193 # and func_basename. For efficiency, we do not delegate to
194 # those functions but instead duplicate the functionality here.
195 func_dirname_and_basename ()
196 {
197 # Extract subdirectory from the argument.
198 func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
199 if test "X$func_dirname_result" = "X${1}"; then
200 func_dirname_result="${3}"
699 # For efficiency, we do not delegate to the functions above but instead
700 # duplicate the functionality here.
701 eval 'func_dirname_and_basename ()
702 {
703 $debug_cmd
704
705 '"$_b"'
706 '"$_d"'
707 }'
708
709
710 # func_echo ARG...
711 # ----------------
712 # Echo program name prefixed message.
713 func_echo ()
714 {
715 $debug_cmd
716
717 _G_message=$*
718
719 func_echo_IFS=$IFS
720 IFS=$nl
721 for _G_line in $_G_message; do
722 IFS=$func_echo_IFS
723 $ECHO "$progname: $_G_line"
724 done
725 IFS=$func_echo_IFS
726 }
727
728
729 # func_echo_all ARG...
730 # --------------------
731 # Invoke $ECHO with all args, space-separated.
732 func_echo_all ()
733 {
734 $ECHO "$*"
735 }
736
737
738 # func_echo_infix_1 INFIX ARG...
739 # ------------------------------
740 # Echo program name, followed by INFIX on the first line, with any
741 # additional lines not showing INFIX.
742 func_echo_infix_1 ()
743 {
744 $debug_cmd
745
746 $require_term_colors
747
748 _G_infix=$1; shift
749 _G_indent=$_G_infix
750 _G_prefix="$progname: $_G_infix: "
751 _G_message=$*
752
753 # Strip color escape sequences before counting printable length
754 for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan"
755 do
756 test -n "$_G_tc" && {
757 _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"`
758 _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"`
759 }
760 done
761 _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes
762
763 func_echo_infix_1_IFS=$IFS
764 IFS=$nl
765 for _G_line in $_G_message; do
766 IFS=$func_echo_infix_1_IFS
767 $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2
768 _G_prefix=$_G_indent
769 done
770 IFS=$func_echo_infix_1_IFS
771 }
772
773
774 # func_error ARG...
775 # -----------------
776 # Echo program name prefixed message to standard error.
777 func_error ()
778 {
779 $debug_cmd
780
781 $require_term_colors
782
783 func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2
784 }
785
786
787 # func_fatal_error ARG...
788 # -----------------------
789 # Echo program name prefixed message to standard error, and exit.
790 func_fatal_error ()
791 {
792 $debug_cmd
793
794 func_error "$*"
795 exit $EXIT_FAILURE
796 }
797
798
799 # func_grep EXPRESSION FILENAME
800 # -----------------------------
801 # Check whether EXPRESSION matches any line of FILENAME, without output.
802 func_grep ()
803 {
804 $debug_cmd
805
806 $GREP "$1" "$2" >/dev/null 2>&1
807 }
808
809
810 # func_len STRING
811 # ---------------
812 # Set func_len_result to the length of STRING. STRING may not
813 # start with a hyphen.
814 test -z "$_G_HAVE_XSI_OPS" \
815 && (eval 'x=a/b/c;
816 test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
817 && _G_HAVE_XSI_OPS=yes
818
819 if test yes = "$_G_HAVE_XSI_OPS"; then
820 eval 'func_len ()
821 {
822 $debug_cmd
823
824 func_len_result=${#1}
825 }'
826 else
827 func_len ()
828 {
829 $debug_cmd
830
831 func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
832 }
833 fi
834
835
836 # func_mkdir_p DIRECTORY-PATH
837 # ---------------------------
838 # Make sure the entire path to DIRECTORY-PATH is available.
839 func_mkdir_p ()
840 {
841 $debug_cmd
842
843 _G_directory_path=$1
844 _G_dir_list=
845
846 if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then
847
848 # Protect directory names starting with '-'
849 case $_G_directory_path in
850 -*) _G_directory_path=./$_G_directory_path ;;
851 esac
852
853 # While some portion of DIR does not yet exist...
854 while test ! -d "$_G_directory_path"; do
855 # ...make a list in topmost first order. Use a colon delimited
856 # list incase some portion of path contains whitespace.
857 _G_dir_list=$_G_directory_path:$_G_dir_list
858
859 # If the last portion added has no slash in it, the list is done
860 case $_G_directory_path in */*) ;; *) break ;; esac
861
862 # ...otherwise throw away the child directory and loop
863 _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"`
864 done
865 _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'`
866
867 func_mkdir_p_IFS=$IFS; IFS=:
868 for _G_dir in $_G_dir_list; do
869 IFS=$func_mkdir_p_IFS
870 # mkdir can fail with a 'File exist' error if two processes
871 # try to create one of the directories concurrently. Don't
872 # stop in that case!
873 $MKDIR "$_G_dir" 2>/dev/null || :
874 done
875 IFS=$func_mkdir_p_IFS
876
877 # Bail out if we (or some other process) failed to create a directory.
878 test -d "$_G_directory_path" || \
879 func_fatal_error "Failed to create '$1'"
880 fi
881 }
882
883
884 # func_mktempdir [BASENAME]
885 # -------------------------
886 # Make a temporary directory that won't clash with other running
887 # libtool processes, and avoids race conditions if possible. If
888 # given, BASENAME is the basename for that directory.
889 func_mktempdir ()
890 {
891 $debug_cmd
892
893 _G_template=${TMPDIR-/tmp}/${1-$progname}
894
895 if test : = "$opt_dry_run"; then
896 # Return a directory name, but don't create it in dry-run mode
897 _G_tmpdir=$_G_template-$$
201898 else
202 func_dirname_result="$func_dirname_result${2}"
899
900 # If mktemp works, use that first and foremost
901 _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null`
902
903 if test ! -d "$_G_tmpdir"; then
904 # Failing that, at least try and use $RANDOM to avoid a race
905 _G_tmpdir=$_G_template-${RANDOM-0}$$
906
907 func_mktempdir_umask=`umask`
908 umask 0077
909 $MKDIR "$_G_tmpdir"
910 umask $func_mktempdir_umask
911 fi
912
913 # If we're not in dry-run mode, bomb out on failure
914 test -d "$_G_tmpdir" || \
915 func_fatal_error "cannot create temporary directory '$_G_tmpdir'"
203916 fi
204 func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
205 } # func_dirname_and_basename may be replaced by extended shell implementation
206
207
208 # func_stripname prefix suffix name
209 # strip PREFIX and SUFFIX off of NAME.
210 # PREFIX and SUFFIX must not contain globbing or regex special
211 # characters, hashes, percent signs, but SUFFIX may contain a leading
212 # dot (in which case that matches only a dot).
213 # func_strip_suffix prefix name
214 func_stripname ()
215 {
216 case ${2} in
217 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
218 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
219 esac
220 } # func_stripname may be replaced by extended shell implementation
221
222
223 # These SED scripts presuppose an absolute path with a trailing slash.
224 pathcar='s,^/\([^/]*\).*$,\1,'
225 pathcdr='s,^/[^/]*,,'
226 removedotparts=':dotsl
227 s@/\./@/@g
228 t dotsl
229 s,/\.$,/,'
230 collapseslashes='s@/\{1,\}@/@g'
231 finalslash='s,/*$,/,'
917
918 $ECHO "$_G_tmpdir"
919 }
920
232921
233922 # func_normal_abspath PATH
923 # ------------------------
234924 # Remove doubled-up and trailing slashes, "." path components,
235925 # and cancel out any ".." path components in PATH after making
236926 # it an absolute path.
237 # value returned in "$func_normal_abspath_result"
238927 func_normal_abspath ()
239928 {
240 # Start from root dir and reassemble the path.
241 func_normal_abspath_result=
242 func_normal_abspath_tpath=$1
243 func_normal_abspath_altnamespace=
244 case $func_normal_abspath_tpath in
245 "")
246 # Empty path, that just means $cwd.
247 func_stripname '' '/' "`pwd`"
248 func_normal_abspath_result=$func_stripname_result
249 return
250 ;;
251 # The next three entries are used to spot a run of precisely
252 # two leading slashes without using negated character classes;
253 # we take advantage of case's first-match behaviour.
254 ///*)
255 # Unusual form of absolute path, do nothing.
256 ;;
257 //*)
258 # Not necessarily an ordinary path; POSIX reserves leading '//'
259 # and for example Cygwin uses it to access remote file shares
260 # over CIFS/SMB, so we conserve a leading double slash if found.
261 func_normal_abspath_altnamespace=/
262 ;;
263 /*)
264 # Absolute path, do nothing.
265 ;;
266 *)
267 # Relative path, prepend $cwd.
268 func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
269 ;;
270 esac
271 # Cancel out all the simple stuff to save iterations. We also want
272 # the path to end with a slash for ease of parsing, so make sure
273 # there is one (and only one) here.
274 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
275 -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
276 while :; do
277 # Processed it all yet?
278 if test "$func_normal_abspath_tpath" = / ; then
279 # If we ascended to the root using ".." the result may be empty now.
280 if test -z "$func_normal_abspath_result" ; then
281 func_normal_abspath_result=/
282 fi
283 break
284 fi
285 func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
286 -e "$pathcar"`
929 $debug_cmd
930
931 # These SED scripts presuppose an absolute path with a trailing slash.
932 _G_pathcar='s|^/\([^/]*\).*$|\1|'
933 _G_pathcdr='s|^/[^/]*||'
934 _G_removedotparts=':dotsl
935 s|/\./|/|g
936 t dotsl
937 s|/\.$|/|'
938 _G_collapseslashes='s|/\{1,\}|/|g'
939 _G_finalslash='s|/*$|/|'
940
941 # Start from root dir and reassemble the path.
942 func_normal_abspath_result=
943 func_normal_abspath_tpath=$1
944 func_normal_abspath_altnamespace=
945 case $func_normal_abspath_tpath in
946 "")
947 # Empty path, that just means $cwd.
948 func_stripname '' '/' "`pwd`"
949 func_normal_abspath_result=$func_stripname_result
950 return
951 ;;
952 # The next three entries are used to spot a run of precisely
953 # two leading slashes without using negated character classes;
954 # we take advantage of case's first-match behaviour.
955 ///*)
956 # Unusual form of absolute path, do nothing.
957 ;;
958 //*)
959 # Not necessarily an ordinary path; POSIX reserves leading '//'
960 # and for example Cygwin uses it to access remote file shares
961 # over CIFS/SMB, so we conserve a leading double slash if found.
962 func_normal_abspath_altnamespace=/
963 ;;
964 /*)
965 # Absolute path, do nothing.
966 ;;
967 *)
968 # Relative path, prepend $cwd.
969 func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
970 ;;
971 esac
972
973 # Cancel out all the simple stuff to save iterations. We also want
974 # the path to end with a slash for ease of parsing, so make sure
975 # there is one (and only one) here.
287976 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
288 -e "$pathcdr"`
289 # Figure out what to do with it
290 case $func_normal_abspath_tcomponent in
291 "")
292 # Trailing empty path component, ignore it.
293 ;;
294 ..)
295 # Parent dir; strip last assembled component from result.
296 func_dirname "$func_normal_abspath_result"
297 func_normal_abspath_result=$func_dirname_result
298 ;;
299 *)
300 # Actual path component, append it.
301 func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
302 ;;
303 esac
304 done
305 # Restore leading double-slash if one was found on entry.
306 func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
307 }
308
309 # func_relative_path SRCDIR DSTDIR
310 # generates a relative path from SRCDIR to DSTDIR, with a trailing
311 # slash if non-empty, suitable for immediately appending a filename
312 # without needing to append a separator.
313 # value returned in "$func_relative_path_result"
314 func_relative_path ()
315 {
316 func_relative_path_result=
317 func_normal_abspath "$1"
318 func_relative_path_tlibdir=$func_normal_abspath_result
319 func_normal_abspath "$2"
320 func_relative_path_tbindir=$func_normal_abspath_result
321
322 # Ascend the tree starting from libdir
323 while :; do
324 # check if we have found a prefix of bindir
325 case $func_relative_path_tbindir in
326 $func_relative_path_tlibdir)
327 # found an exact match
328 func_relative_path_tcancelled=
329 break
330 ;;
331 $func_relative_path_tlibdir*)
332 # found a matching prefix
333 func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
334 func_relative_path_tcancelled=$func_stripname_result
335 if test -z "$func_relative_path_result"; then
336 func_relative_path_result=.
977 -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"`
978 while :; do
979 # Processed it all yet?
980 if test / = "$func_normal_abspath_tpath"; then
981 # If we ascended to the root using ".." the result may be empty now.
982 if test -z "$func_normal_abspath_result"; then
983 func_normal_abspath_result=/
337984 fi
338985 break
339 ;;
340 *)
341 func_dirname $func_relative_path_tlibdir
342 func_relative_path_tlibdir=${func_dirname_result}
343 if test "x$func_relative_path_tlibdir" = x ; then
344 # Have to descend all the way to the root!
345 func_relative_path_result=../$func_relative_path_result
346 func_relative_path_tcancelled=$func_relative_path_tbindir
347 break
348 fi
349 func_relative_path_result=../$func_relative_path_result
350 ;;
351 esac
352 done
353
354 # Now calculate path; take care to avoid doubling-up slashes.
355 func_stripname '' '/' "$func_relative_path_result"
356 func_relative_path_result=$func_stripname_result
357 func_stripname '/' '/' "$func_relative_path_tcancelled"
358 if test "x$func_stripname_result" != x ; then
359 func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
360 fi
361
362 # Normalisation. If bindir is libdir, return empty string,
363 # else relative path ending with a slash; either way, target
364 # file name can be directly appended.
365 if test ! -z "$func_relative_path_result"; then
366 func_stripname './' '' "$func_relative_path_result/"
367 func_relative_path_result=$func_stripname_result
368 fi
369 }
370
371 # The name of this program:
372 func_dirname_and_basename "$progpath"
373 progname=$func_basename_result
374
375 # Make sure we have an absolute path for reexecution:
376 case $progpath in
377 [\\/]*|[A-Za-z]:\\*) ;;
378 *[\\/]*)
379 progdir=$func_dirname_result
380 progdir=`cd "$progdir" && pwd`
381 progpath="$progdir/$progname"
382 ;;
383 *)
384 save_IFS="$IFS"
385 IFS=${PATH_SEPARATOR-:}
386 for progdir in $PATH; do
387 IFS="$save_IFS"
388 test -x "$progdir/$progname" && break
389 done
390 IFS="$save_IFS"
391 test -n "$progdir" || progdir=`pwd`
392 progpath="$progdir/$progname"
393 ;;
394 esac
395
396 # Sed substitution that helps us do robust quoting. It backslashifies
397 # metacharacters that are still active within double-quoted strings.
398 Xsed="${SED}"' -e 1s/^X//'
399 sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
400
401 # Same as above, but do not quote variable references.
402 double_quote_subst='s/\(["`\\]\)/\\\1/g'
403
404 # Sed substitution that turns a string into a regex matching for the
405 # string literally.
406 sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
407
408 # Sed substitution that converts a w32 file name or path
409 # which contains forward slashes, into one that contains
410 # (escaped) backslashes. A very naive implementation.
411 lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
412
413 # Re-`\' parameter expansions in output of double_quote_subst that were
414 # `\'-ed in input to the same. If an odd number of `\' preceded a '$'
415 # in input to double_quote_subst, that '$' was protected from expansion.
416 # Since each input `\' is now two `\'s, look for any number of runs of
417 # four `\'s followed by two `\'s and then a '$'. `\' that '$'.
418 bs='\\'
419 bs2='\\\\'
420 bs4='\\\\\\\\'
421 dollar='\$'
422 sed_double_backslash="\
423 s/$bs4/&\\
424 /g
425 s/^$bs2$dollar/$bs&/
426 s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
427 s/\n//g"
428
429 # Standard options:
430 opt_dry_run=false
431 opt_help=false
432 opt_quiet=false
433 opt_verbose=false
434 opt_warning=:
435
436 # func_echo arg...
437 # Echo program name prefixed message, along with the current mode
438 # name if it has been set yet.
439 func_echo ()
440 {
441 $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
442 }
443
444 # func_verbose arg...
445 # Echo program name prefixed message in verbose mode only.
446 func_verbose ()
447 {
448 $opt_verbose && func_echo ${1+"$@"}
986 fi
987 func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
988 -e "$_G_pathcar"`
989 func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
990 -e "$_G_pathcdr"`
991 # Figure out what to do with it
992 case $func_normal_abspath_tcomponent in
993 "")
994 # Trailing empty path component, ignore it.
995 ;;
996 ..)
997 # Parent dir; strip last assembled component from result.
998 func_dirname "$func_normal_abspath_result"
999 func_normal_abspath_result=$func_dirname_result
1000 ;;
1001 *)
1002 # Actual path component, append it.
1003 func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent"
1004 ;;
1005 esac
1006 done
1007 # Restore leading double-slash if one was found on entry.
1008 func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
1009 }
1010
1011
1012 # func_notquiet ARG...
1013 # --------------------
1014 # Echo program name prefixed message only when not in quiet mode.
1015 func_notquiet ()
1016 {
1017 $debug_cmd
1018
1019 $opt_quiet || func_echo ${1+"$@"}
4491020
4501021 # A bug in bash halts the script if the last line of a function
4511022 # fails when set -e is in force, so we need another command to
4531024 :
4541025 }
4551026
456 # func_echo_all arg...
457 # Invoke $ECHO with all args, space-separated.
458 func_echo_all ()
459 {
460 $ECHO "$*"
461 }
462
463 # func_error arg...
464 # Echo program name prefixed message to standard error.
465 func_error ()
466 {
467 $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
468 }
469
470 # func_warning arg...
471 # Echo program name prefixed warning message to standard error.
472 func_warning ()
473 {
474 $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
475
476 # bash bug again:
1027
1028 # func_relative_path SRCDIR DSTDIR
1029 # --------------------------------
1030 # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR.
1031 func_relative_path ()
1032 {
1033 $debug_cmd
1034
1035 func_relative_path_result=
1036 func_normal_abspath "$1"
1037 func_relative_path_tlibdir=$func_normal_abspath_result
1038 func_normal_abspath "$2"
1039 func_relative_path_tbindir=$func_normal_abspath_result
1040
1041 # Ascend the tree starting from libdir
1042 while :; do
1043 # check if we have found a prefix of bindir
1044 case $func_relative_path_tbindir in
1045 $func_relative_path_tlibdir)
1046 # found an exact match
1047 func_relative_path_tcancelled=
1048 break
1049 ;;
1050 $func_relative_path_tlibdir*)
1051 # found a matching prefix
1052 func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
1053 func_relative_path_tcancelled=$func_stripname_result
1054 if test -z "$func_relative_path_result"; then
1055 func_relative_path_result=.
1056 fi
1057 break
1058 ;;
1059 *)
1060 func_dirname $func_relative_path_tlibdir
1061 func_relative_path_tlibdir=$func_dirname_result
1062 if test -z "$func_relative_path_tlibdir"; then
1063 # Have to descend all the way to the root!
1064 func_relative_path_result=../$func_relative_path_result
1065 func_relative_path_tcancelled=$func_relative_path_tbindir
1066 break
1067 fi
1068 func_relative_path_result=../$func_relative_path_result
1069 ;;
1070 esac
1071 done
1072
1073 # Now calculate path; take care to avoid doubling-up slashes.
1074 func_stripname '' '/' "$func_relative_path_result"
1075 func_relative_path_result=$func_stripname_result
1076 func_stripname '/' '/' "$func_relative_path_tcancelled"
1077 if test -n "$func_stripname_result"; then
1078 func_append func_relative_path_result "/$func_stripname_result"
1079 fi
1080
1081 # Normalisation. If bindir is libdir, return '.' else relative path.
1082 if test -n "$func_relative_path_result"; then
1083 func_stripname './' '' "$func_relative_path_result"
1084 func_relative_path_result=$func_stripname_result
1085 fi
1086
1087 test -n "$func_relative_path_result" || func_relative_path_result=.
1088
4771089 :
4781090 }
4791091
480 # func_fatal_error arg...
481 # Echo program name prefixed message to standard error, and exit.
482 func_fatal_error ()
483 {
484 func_error ${1+"$@"}
485 exit $EXIT_FAILURE
486 }
487
488 # func_fatal_help arg...
489 # Echo program name prefixed message to standard error, followed by
490 # a help hint, and exit.
491 func_fatal_help ()
492 {
493 func_error ${1+"$@"}
494 func_fatal_error "$help"
495 }
496 help="Try \`$progname --help' for more information." ## default
497
498
499 # func_grep expression filename
500 # Check whether EXPRESSION matches any line of FILENAME, without output.
501 func_grep ()
502 {
503 $GREP "$1" "$2" >/dev/null 2>&1
504 }
505
506
507 # func_mkdir_p directory-path
508 # Make sure the entire path to DIRECTORY-PATH is available.
509 func_mkdir_p ()
510 {
511 my_directory_path="$1"
512 my_dir_list=
513
514 if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
515
516 # Protect directory names starting with `-'
517 case $my_directory_path in
518 -*) my_directory_path="./$my_directory_path" ;;
1092
1093 # func_quote_for_eval ARG...
1094 # --------------------------
1095 # Aesthetically quote ARGs to be evaled later.
1096 # This function returns two values:
1097 # i) func_quote_for_eval_result
1098 # double-quoted, suitable for a subsequent eval
1099 # ii) func_quote_for_eval_unquoted_result
1100 # has all characters that are still active within double
1101 # quotes backslashified.
1102 func_quote_for_eval ()
1103 {
1104 $debug_cmd
1105
1106 func_quote_for_eval_unquoted_result=
1107 func_quote_for_eval_result=
1108 while test 0 -lt $#; do
1109 case $1 in
1110 *[\\\`\"\$]*)
1111 _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
1112 *)
1113 _G_unquoted_arg=$1 ;;
5191114 esac
520
521 # While some portion of DIR does not yet exist...
522 while test ! -d "$my_directory_path"; do
523 # ...make a list in topmost first order. Use a colon delimited
524 # list incase some portion of path contains whitespace.
525 my_dir_list="$my_directory_path:$my_dir_list"
526
527 # If the last portion added has no slash in it, the list is done
528 case $my_directory_path in */*) ;; *) break ;; esac
529
530 # ...otherwise throw away the child directory and loop
531 my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
532 done
533 my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
534
535 save_mkdir_p_IFS="$IFS"; IFS=':'
536 for my_dir in $my_dir_list; do
537 IFS="$save_mkdir_p_IFS"
538 # mkdir can fail with a `File exist' error if two processes
539 # try to create one of the directories concurrently. Don't
540 # stop in that case!
541 $MKDIR "$my_dir" 2>/dev/null || :
542 done
543 IFS="$save_mkdir_p_IFS"
544
545 # Bail out if we (or some other process) failed to create a directory.
546 test -d "$my_directory_path" || \
547 func_fatal_error "Failed to create \`$1'"
548 fi
549 }
550
551
552 # func_mktempdir [string]
553 # Make a temporary directory that won't clash with other running
554 # libtool processes, and avoids race conditions if possible. If
555 # given, STRING is the basename for that directory.
556 func_mktempdir ()
557 {
558 my_template="${TMPDIR-/tmp}/${1-$progname}"
559
560 if test "$opt_dry_run" = ":"; then
561 # Return a directory name, but don't create it in dry-run mode
562 my_tmpdir="${my_template}-$$"
563 else
564
565 # If mktemp works, use that first and foremost
566 my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
567
568 if test ! -d "$my_tmpdir"; then
569 # Failing that, at least try and use $RANDOM to avoid a race
570 my_tmpdir="${my_template}-${RANDOM-0}$$"
571
572 save_mktempdir_umask=`umask`
573 umask 0077
574 $MKDIR "$my_tmpdir"
575 umask $save_mktempdir_umask
1115 if test -n "$func_quote_for_eval_unquoted_result"; then
1116 func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
1117 else
1118 func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
5761119 fi
5771120
578 # If we're not in dry-run mode, bomb out on failure
579 test -d "$my_tmpdir" || \
580 func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
581 fi
582
583 $ECHO "$my_tmpdir"
584 }
585
586
587 # func_quote_for_eval arg
588 # Aesthetically quote ARG to be evaled later.
589 # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
590 # is double-quoted, suitable for a subsequent eval, whereas
591 # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
592 # which are still active within double quotes backslashified.
593 func_quote_for_eval ()
594 {
595 case $1 in
596 *[\\\`\"\$]*)
597 func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
598 *)
599 func_quote_for_eval_unquoted_result="$1" ;;
600 esac
601
602 case $func_quote_for_eval_unquoted_result in
603 # Double-quote args containing shell metacharacters to delay
604 # word splitting, command substitution and and variable
605 # expansion for a subsequent eval.
606 # Many Bourne shells cannot handle close brackets correctly
607 # in scan sets, so we specify it separately.
608 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
609 func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
610 ;;
611 *)
612 func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
613 esac
614 }
615
616
617 # func_quote_for_expand arg
1121 case $_G_unquoted_arg in
1122 # Double-quote args containing shell metacharacters to delay
1123 # word splitting, command substitution and variable expansion
1124 # for a subsequent eval.
1125 # Many Bourne shells cannot handle close brackets correctly
1126 # in scan sets, so we specify it separately.
1127 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1128 _G_quoted_arg=\"$_G_unquoted_arg\"
1129 ;;
1130 *)
1131 _G_quoted_arg=$_G_unquoted_arg
1132 ;;
1133 esac
1134
1135 if test -n "$func_quote_for_eval_result"; then
1136 func_append func_quote_for_eval_result " $_G_quoted_arg"
1137 else
1138 func_append func_quote_for_eval_result "$_G_quoted_arg"
1139 fi
1140 shift
1141 done
1142 }
1143
1144
1145 # func_quote_for_expand ARG
1146 # -------------------------
6181147 # Aesthetically quote ARG to be evaled later; same as above,
6191148 # but do not quote variable references.
6201149 func_quote_for_expand ()
6211150 {
1151 $debug_cmd
1152
6221153 case $1 in
6231154 *[\\\`\"]*)
624 my_arg=`$ECHO "$1" | $SED \
625 -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
1155 _G_arg=`$ECHO "$1" | $SED \
1156 -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
6261157 *)
627 my_arg="$1" ;;
1158 _G_arg=$1 ;;
6281159 esac
6291160
630 case $my_arg in
1161 case $_G_arg in
6311162 # Double-quote args containing shell metacharacters to delay
6321163 # word splitting and command substitution for a subsequent eval.
6331164 # Many Bourne shells cannot handle close brackets correctly
6341165 # in scan sets, so we specify it separately.
6351166 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
636 my_arg="\"$my_arg\""
1167 _G_arg=\"$_G_arg\"
6371168 ;;
6381169 esac
6391170
640 func_quote_for_expand_result="$my_arg"
641 }
642
643
644 # func_show_eval cmd [fail_exp]
645 # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
1171 func_quote_for_expand_result=$_G_arg
1172 }
1173
1174
1175 # func_stripname PREFIX SUFFIX NAME
1176 # ---------------------------------
1177 # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result.
1178 # PREFIX and SUFFIX must not contain globbing or regex special
1179 # characters, hashes, percent signs, but SUFFIX may contain a leading
1180 # dot (in which case that matches only a dot).
1181 if test yes = "$_G_HAVE_XSI_OPS"; then
1182 eval 'func_stripname ()
1183 {
1184 $debug_cmd
1185
1186 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
1187 # positional parameters, so assign one to ordinary variable first.
1188 func_stripname_result=$3
1189 func_stripname_result=${func_stripname_result#"$1"}
1190 func_stripname_result=${func_stripname_result%"$2"}
1191 }'
1192 else
1193 func_stripname ()
1194 {
1195 $debug_cmd
1196
1197 case $2 in
1198 .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;;
1199 *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;;
1200 esac
1201 }
1202 fi
1203
1204
1205 # func_show_eval CMD [FAIL_EXP]
1206 # -----------------------------
1207 # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
6461208 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
6471209 # is given, then evaluate it.
6481210 func_show_eval ()
6491211 {
650 my_cmd="$1"
651 my_fail_exp="${2-:}"
652
653 ${opt_silent-false} || {
654 func_quote_for_expand "$my_cmd"
655 eval "func_echo $func_quote_for_expand_result"
1212 $debug_cmd
1213
1214 _G_cmd=$1
1215 _G_fail_exp=${2-':'}
1216
1217 func_quote_for_expand "$_G_cmd"
1218 eval "func_notquiet $func_quote_for_expand_result"
1219
1220 $opt_dry_run || {
1221 eval "$_G_cmd"
1222 _G_status=$?
1223 if test 0 -ne "$_G_status"; then
1224 eval "(exit $_G_status); $_G_fail_exp"
1225 fi
6561226 }
657
658 if ${opt_dry_run-false}; then :; else
659 eval "$my_cmd"
660 my_status=$?
661 if test "$my_status" -eq 0; then :; else
662 eval "(exit $my_status); $my_fail_exp"
663 fi
664 fi
665 }
666
667
668 # func_show_eval_locale cmd [fail_exp]
669 # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
1227 }
1228
1229
1230 # func_show_eval_locale CMD [FAIL_EXP]
1231 # ------------------------------------
1232 # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is
6701233 # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
6711234 # is given, then evaluate it. Use the saved locale for evaluation.
6721235 func_show_eval_locale ()
6731236 {
674 my_cmd="$1"
675 my_fail_exp="${2-:}"
676
677 ${opt_silent-false} || {
678 func_quote_for_expand "$my_cmd"
1237 $debug_cmd
1238
1239 _G_cmd=$1
1240 _G_fail_exp=${2-':'}
1241
1242 $opt_quiet || {
1243 func_quote_for_expand "$_G_cmd"
6791244 eval "func_echo $func_quote_for_expand_result"
6801245 }
6811246
682 if ${opt_dry_run-false}; then :; else
683 eval "$lt_user_locale
684 $my_cmd"
685 my_status=$?
686 eval "$lt_safe_locale"
687 if test "$my_status" -eq 0; then :; else
688 eval "(exit $my_status); $my_fail_exp"
1247 $opt_dry_run || {
1248 eval "$_G_user_locale
1249 $_G_cmd"
1250 _G_status=$?
1251 eval "$_G_safe_locale"
1252 if test 0 -ne "$_G_status"; then
1253 eval "(exit $_G_status); $_G_fail_exp"
6891254 fi
690 fi
691 }
1255 }
1256 }
1257
6921258
6931259 # func_tr_sh
1260 # ----------
6941261 # Turn $1 into a string suitable for a shell variable name.
6951262 # Result is stored in $func_tr_sh_result. All characters
6961263 # not in the set a-zA-Z0-9_ are replaced with '_'. Further,
6971264 # if $1 begins with a digit, a '_' is prepended as well.
6981265 func_tr_sh ()
6991266 {
700 case $1 in
701 [0-9]* | *[!a-zA-Z0-9_]*)
702 func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
703 ;;
704 * )
705 func_tr_sh_result=$1
706 ;;
707 esac
708 }
709
710
711 # func_version
712 # Echo version message to standard output and exit.
713 func_version ()
714 {
715 $opt_debug
716
717 $SED -n '/(C)/!b go
718 :more
719 /\./!{
720 N
721 s/\n# / /
722 b more
723 }
724 :go
725 /^# '$PROGRAM' (GNU /,/# warranty; / {
726 s/^# //
727 s/^# *$//
728 s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
729 p
730 }' < "$progpath"
731 exit $?
732 }
733
734 # func_usage
735 # Echo short help message to standard output and exit.
736 func_usage ()
737 {
738 $opt_debug
739
740 $SED -n '/^# Usage:/,/^# *.*--help/ {
741 s/^# //
742 s/^# *$//
743 s/\$progname/'$progname'/
744 p
745 }' < "$progpath"
746 echo
747 $ECHO "run \`$progname --help | more' for full usage"
748 exit $?
749 }
750
751 # func_help [NOEXIT]
752 # Echo long help message to standard output and exit,
753 # unless 'noexit' is passed as argument.
1267 $debug_cmd
1268
1269 case $1 in
1270 [0-9]* | *[!a-zA-Z0-9_]*)
1271 func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'`
1272 ;;
1273 * )
1274 func_tr_sh_result=$1
1275 ;;
1276 esac
1277 }
1278
1279
1280 # func_verbose ARG...
1281 # -------------------
1282 # Echo program name prefixed message in verbose mode only.
1283 func_verbose ()
1284 {
1285 $debug_cmd
1286
1287 $opt_verbose && func_echo "$*"
1288
1289 :
1290 }
1291
1292
1293 # func_warn_and_continue ARG...
1294 # -----------------------------
1295 # Echo program name prefixed warning message to standard error.
1296 func_warn_and_continue ()
1297 {
1298 $debug_cmd
1299
1300 $require_term_colors
1301
1302 func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2
1303 }
1304
1305
1306 # func_warning CATEGORY ARG...
1307 # ----------------------------
1308 # Echo program name prefixed warning message to standard error. Warning
1309 # messages can be filtered according to CATEGORY, where this function
1310 # elides messages where CATEGORY is not listed in the global variable
1311 # 'opt_warning_types'.
1312 func_warning ()
1313 {
1314 $debug_cmd
1315
1316 # CATEGORY must be in the warning_categories list!
1317 case " $warning_categories " in
1318 *" $1 "*) ;;
1319 *) func_internal_error "invalid warning category '$1'" ;;
1320 esac
1321
1322 _G_category=$1
1323 shift
1324
1325 case " $opt_warning_types " in
1326 *" $_G_category "*) $warning_func ${1+"$@"} ;;
1327 esac
1328 }
1329
1330
1331 # func_sort_ver VER1 VER2
1332 # -----------------------
1333 # 'sort -V' is not generally available.
1334 # Note this deviates from the version comparison in automake
1335 # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
1336 # but this should suffice as we won't be specifying old
1337 # version formats or redundant trailing .0 in bootstrap.conf.
1338 # If we did want full compatibility then we should probably
1339 # use m4_version_compare from autoconf.
1340 func_sort_ver ()
1341 {
1342 $debug_cmd
1343
1344 printf '%s\n%s\n' "$1" "$2" \
1345 | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n
1346 }
1347
1348 # func_lt_ver PREV CURR
1349 # ---------------------
1350 # Return true if PREV and CURR are in the correct order according to
1351 # func_sort_ver, otherwise false. Use it like this:
1352 #
1353 # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..."
1354 func_lt_ver ()
1355 {
1356 $debug_cmd
1357
1358 test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q`
1359 }
1360
1361
1362 # Local variables:
1363 # mode: shell-script
1364 # sh-indentation: 2
1365 # eval: (add-hook 'before-save-hook 'time-stamp)
1366 # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
1367 # time-stamp-time-zone: "UTC"
1368 # End:
1369 #! /bin/sh
1370
1371 # Set a version string for this script.
1372 scriptversion=2014-01-07.03; # UTC
1373
1374 # A portable, pluggable option parser for Bourne shell.
1375 # Written by Gary V. Vaughan, 2010
1376
1377 # Copyright (C) 2010-2015 Free Software Foundation, Inc.
1378 # This is free software; see the source for copying conditions. There is NO
1379 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1380
1381 # This program is free software: you can redistribute it and/or modify
1382 # it under the terms of the GNU General Public License as published by
1383 # the Free Software Foundation, either version 3 of the License, or
1384 # (at your option) any later version.
1385
1386 # This program is distributed in the hope that it will be useful,
1387 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1388 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1389 # GNU General Public License for more details.
1390
1391 # You should have received a copy of the GNU General Public License
1392 # along with this program. If not, see <http://www.gnu.org/licenses/>.
1393
1394 # Please report bugs or propose patches to gary@gnu.org.
1395
1396
1397 ## ------ ##
1398 ## Usage. ##
1399 ## ------ ##
1400
1401 # This file is a library for parsing options in your shell scripts along
1402 # with assorted other useful supporting features that you can make use
1403 # of too.
1404 #
1405 # For the simplest scripts you might need only:
1406 #
1407 # #!/bin/sh
1408 # . relative/path/to/funclib.sh
1409 # . relative/path/to/options-parser
1410 # scriptversion=1.0
1411 # func_options ${1+"$@"}
1412 # eval set dummy "$func_options_result"; shift
1413 # ...rest of your script...
1414 #
1415 # In order for the '--version' option to work, you will need to have a
1416 # suitably formatted comment like the one at the top of this file
1417 # starting with '# Written by ' and ending with '# warranty; '.
1418 #
1419 # For '-h' and '--help' to work, you will also need a one line
1420 # description of your script's purpose in a comment directly above the
1421 # '# Written by ' line, like the one at the top of this file.
1422 #
1423 # The default options also support '--debug', which will turn on shell
1424 # execution tracing (see the comment above debug_cmd below for another
1425 # use), and '--verbose' and the func_verbose function to allow your script
1426 # to display verbose messages only when your user has specified
1427 # '--verbose'.
1428 #
1429 # After sourcing this file, you can plug processing for additional
1430 # options by amending the variables from the 'Configuration' section
1431 # below, and following the instructions in the 'Option parsing'
1432 # section further down.
1433
1434 ## -------------- ##
1435 ## Configuration. ##
1436 ## -------------- ##
1437
1438 # You should override these variables in your script after sourcing this
1439 # file so that they reflect the customisations you have added to the
1440 # option parser.
1441
1442 # The usage line for option parsing errors and the start of '-h' and
1443 # '--help' output messages. You can embed shell variables for delayed
1444 # expansion at the time the message is displayed, but you will need to
1445 # quote other shell meta-characters carefully to prevent them being
1446 # expanded when the contents are evaled.
1447 usage='$progpath [OPTION]...'
1448
1449 # Short help message in response to '-h' and '--help'. Add to this or
1450 # override it after sourcing this library to reflect the full set of
1451 # options your script accepts.
1452 usage_message="\
1453 --debug enable verbose shell tracing
1454 -W, --warnings=CATEGORY
1455 report the warnings falling in CATEGORY [all]
1456 -v, --verbose verbosely report processing
1457 --version print version information and exit
1458 -h, --help print short or long help message and exit
1459 "
1460
1461 # Additional text appended to 'usage_message' in response to '--help'.
1462 long_help_message="
1463 Warning categories include:
1464 'all' show all warnings
1465 'none' turn off all the warnings
1466 'error' warnings are treated as fatal errors"
1467
1468 # Help message printed before fatal option parsing errors.
1469 fatal_help="Try '\$progname --help' for more information."
1470
1471
1472
1473 ## ------------------------- ##
1474 ## Hook function management. ##
1475 ## ------------------------- ##
1476
1477 # This section contains functions for adding, removing, and running hooks
1478 # to the main code. A hook is just a named list of of function, that can
1479 # be run in order later on.
1480
1481 # func_hookable FUNC_NAME
1482 # -----------------------
1483 # Declare that FUNC_NAME will run hooks added with
1484 # 'func_add_hook FUNC_NAME ...'.
1485 func_hookable ()
1486 {
1487 $debug_cmd
1488
1489 func_append hookable_fns " $1"
1490 }
1491
1492
1493 # func_add_hook FUNC_NAME HOOK_FUNC
1494 # ---------------------------------
1495 # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must
1496 # first have been declared "hookable" by a call to 'func_hookable'.
1497 func_add_hook ()
1498 {
1499 $debug_cmd
1500
1501 case " $hookable_fns " in
1502 *" $1 "*) ;;
1503 *) func_fatal_error "'$1' does not accept hook functions." ;;
1504 esac
1505
1506 eval func_append ${1}_hooks '" $2"'
1507 }
1508
1509
1510 # func_remove_hook FUNC_NAME HOOK_FUNC
1511 # ------------------------------------
1512 # Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
1513 func_remove_hook ()
1514 {
1515 $debug_cmd
1516
1517 eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
1518 }
1519
1520
1521 # func_run_hooks FUNC_NAME [ARG]...
1522 # ---------------------------------
1523 # Run all hook functions registered to FUNC_NAME.
1524 # It is assumed that the list of hook functions contains nothing more
1525 # than a whitespace-delimited list of legal shell function names, and
1526 # no effort is wasted trying to catch shell meta-characters or preserve
1527 # whitespace.
1528 func_run_hooks ()
1529 {
1530 $debug_cmd
1531
1532 case " $hookable_fns " in
1533 *" $1 "*) ;;
1534 *) func_fatal_error "'$1' does not support hook funcions.n" ;;
1535 esac
1536
1537 eval _G_hook_fns=\$$1_hooks; shift
1538
1539 for _G_hook in $_G_hook_fns; do
1540 eval $_G_hook '"$@"'
1541
1542 # store returned options list back into positional
1543 # parameters for next 'cmd' execution.
1544 eval _G_hook_result=\$${_G_hook}_result
1545 eval set dummy "$_G_hook_result"; shift
1546 done
1547
1548 func_quote_for_eval ${1+"$@"}
1549 func_run_hooks_result=$func_quote_for_eval_result
1550 }
1551
1552
1553
1554 ## --------------- ##
1555 ## Option parsing. ##
1556 ## --------------- ##
1557
1558 # In order to add your own option parsing hooks, you must accept the
1559 # full positional parameter list in your hook function, remove any
1560 # options that you action, and then pass back the remaining unprocessed
1561 # options in '<hooked_function_name>_result', escaped suitably for
1562 # 'eval'. Like this:
1563 #
1564 # my_options_prep ()
1565 # {
1566 # $debug_cmd
1567 #
1568 # # Extend the existing usage message.
1569 # usage_message=$usage_message'
1570 # -s, --silent don'\''t print informational messages
1571 # '
1572 #
1573 # func_quote_for_eval ${1+"$@"}
1574 # my_options_prep_result=$func_quote_for_eval_result
1575 # }
1576 # func_add_hook func_options_prep my_options_prep
1577 #
1578 #
1579 # my_silent_option ()
1580 # {
1581 # $debug_cmd
1582 #
1583 # # Note that for efficiency, we parse as many options as we can
1584 # # recognise in a loop before passing the remainder back to the
1585 # # caller on the first unrecognised argument we encounter.
1586 # while test $# -gt 0; do
1587 # opt=$1; shift
1588 # case $opt in
1589 # --silent|-s) opt_silent=: ;;
1590 # # Separate non-argument short options:
1591 # -s*) func_split_short_opt "$_G_opt"
1592 # set dummy "$func_split_short_opt_name" \
1593 # "-$func_split_short_opt_arg" ${1+"$@"}
1594 # shift
1595 # ;;
1596 # *) set dummy "$_G_opt" "$*"; shift; break ;;
1597 # esac
1598 # done
1599 #
1600 # func_quote_for_eval ${1+"$@"}
1601 # my_silent_option_result=$func_quote_for_eval_result
1602 # }
1603 # func_add_hook func_parse_options my_silent_option
1604 #
1605 #
1606 # my_option_validation ()
1607 # {
1608 # $debug_cmd
1609 #
1610 # $opt_silent && $opt_verbose && func_fatal_help "\
1611 # '--silent' and '--verbose' options are mutually exclusive."
1612 #
1613 # func_quote_for_eval ${1+"$@"}
1614 # my_option_validation_result=$func_quote_for_eval_result
1615 # }
1616 # func_add_hook func_validate_options my_option_validation
1617 #
1618 # You'll alse need to manually amend $usage_message to reflect the extra
1619 # options you parse. It's preferable to append if you can, so that
1620 # multiple option parsing hooks can be added safely.
1621
1622
1623 # func_options [ARG]...
1624 # ---------------------
1625 # All the functions called inside func_options are hookable. See the
1626 # individual implementations for details.
1627 func_hookable func_options
1628 func_options ()
1629 {
1630 $debug_cmd
1631
1632 func_options_prep ${1+"$@"}
1633 eval func_parse_options \
1634 ${func_options_prep_result+"$func_options_prep_result"}
1635 eval func_validate_options \
1636 ${func_parse_options_result+"$func_parse_options_result"}
1637
1638 eval func_run_hooks func_options \
1639 ${func_validate_options_result+"$func_validate_options_result"}
1640
1641 # save modified positional parameters for caller
1642 func_options_result=$func_run_hooks_result
1643 }
1644
1645
1646 # func_options_prep [ARG]...
1647 # --------------------------
1648 # All initialisations required before starting the option parse loop.
1649 # Note that when calling hook functions, we pass through the list of
1650 # positional parameters. If a hook function modifies that list, and
1651 # needs to propogate that back to rest of this script, then the complete
1652 # modified list must be put in 'func_run_hooks_result' before
1653 # returning.
1654 func_hookable func_options_prep
1655 func_options_prep ()
1656 {
1657 $debug_cmd
1658
1659 # Option defaults:
1660 opt_verbose=false
1661 opt_warning_types=
1662
1663 func_run_hooks func_options_prep ${1+"$@"}
1664
1665 # save modified positional parameters for caller
1666 func_options_prep_result=$func_run_hooks_result
1667 }
1668
1669
1670 # func_parse_options [ARG]...
1671 # ---------------------------
1672 # The main option parsing loop.
1673 func_hookable func_parse_options
1674 func_parse_options ()
1675 {
1676 $debug_cmd
1677
1678 func_parse_options_result=
1679
1680 # this just eases exit handling
1681 while test $# -gt 0; do
1682 # Defer to hook functions for initial option parsing, so they
1683 # get priority in the event of reusing an option name.
1684 func_run_hooks func_parse_options ${1+"$@"}
1685
1686 # Adjust func_parse_options positional parameters to match
1687 eval set dummy "$func_run_hooks_result"; shift
1688
1689 # Break out of the loop if we already parsed every option.
1690 test $# -gt 0 || break
1691
1692 _G_opt=$1
1693 shift
1694 case $_G_opt in
1695 --debug|-x) debug_cmd='set -x'
1696 func_echo "enabling shell trace mode"
1697 $debug_cmd
1698 ;;
1699
1700 --no-warnings|--no-warning|--no-warn)
1701 set dummy --warnings none ${1+"$@"}
1702 shift
1703 ;;
1704
1705 --warnings|--warning|-W)
1706 test $# = 0 && func_missing_arg $_G_opt && break
1707 case " $warning_categories $1" in
1708 *" $1 "*)
1709 # trailing space prevents matching last $1 above
1710 func_append_uniq opt_warning_types " $1"
1711 ;;
1712 *all)
1713 opt_warning_types=$warning_categories
1714 ;;
1715 *none)
1716 opt_warning_types=none
1717 warning_func=:
1718 ;;
1719 *error)
1720 opt_warning_types=$warning_categories
1721 warning_func=func_fatal_error
1722 ;;
1723 *)
1724 func_fatal_error \
1725 "unsupported warning category: '$1'"
1726 ;;
1727 esac
1728 shift
1729 ;;
1730
1731 --verbose|-v) opt_verbose=: ;;
1732 --version) func_version ;;
1733 -\?|-h) func_usage ;;
1734 --help) func_help ;;
1735
1736 # Separate optargs to long options (plugins may need this):
1737 --*=*) func_split_equals "$_G_opt"
1738 set dummy "$func_split_equals_lhs" \
1739 "$func_split_equals_rhs" ${1+"$@"}
1740 shift
1741 ;;
1742
1743 # Separate optargs to short options:
1744 -W*)
1745 func_split_short_opt "$_G_opt"
1746 set dummy "$func_split_short_opt_name" \
1747 "$func_split_short_opt_arg" ${1+"$@"}
1748 shift
1749 ;;
1750
1751 # Separate non-argument short options:
1752 -\?*|-h*|-v*|-x*)
1753 func_split_short_opt "$_G_opt"
1754 set dummy "$func_split_short_opt_name" \
1755 "-$func_split_short_opt_arg" ${1+"$@"}
1756 shift
1757 ;;
1758
1759 --) break ;;
1760 -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
1761 *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
1762 esac
1763 done
1764
1765 # save modified positional parameters for caller
1766 func_quote_for_eval ${1+"$@"}
1767 func_parse_options_result=$func_quote_for_eval_result
1768 }
1769
1770
1771 # func_validate_options [ARG]...
1772 # ------------------------------
1773 # Perform any sanity checks on option settings and/or unconsumed
1774 # arguments.
1775 func_hookable func_validate_options
1776 func_validate_options ()
1777 {
1778 $debug_cmd
1779
1780 # Display all warnings if -W was not given.
1781 test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
1782
1783 func_run_hooks func_validate_options ${1+"$@"}
1784
1785 # Bail if the options were screwed!
1786 $exit_cmd $EXIT_FAILURE
1787
1788 # save modified positional parameters for caller
1789 func_validate_options_result=$func_run_hooks_result
1790 }
1791
1792
1793
1794 ## ----------------- ##
1795 ## Helper functions. ##
1796 ## ----------------- ##
1797
1798 # This section contains the helper functions used by the rest of the
1799 # hookable option parser framework in ascii-betical order.
1800
1801
1802 # func_fatal_help ARG...
1803 # ----------------------
1804 # Echo program name prefixed message to standard error, followed by
1805 # a help hint, and exit.
1806 func_fatal_help ()
1807 {
1808 $debug_cmd
1809
1810 eval \$ECHO \""Usage: $usage"\"
1811 eval \$ECHO \""$fatal_help"\"
1812 func_error ${1+"$@"}
1813 exit $EXIT_FAILURE
1814 }
1815
1816
1817 # func_help
1818 # ---------
1819 # Echo long help message to standard output and exit.
7541820 func_help ()
7551821 {
756 $opt_debug
757
758 $SED -n '/^# Usage:/,/# Report bugs to/ {
759 :print
760 s/^# //
761 s/^# *$//
762 s*\$progname*'$progname'*
763 s*\$host*'"$host"'*
764 s*\$SHELL*'"$SHELL"'*
765 s*\$LTCC*'"$LTCC"'*
766 s*\$LTCFLAGS*'"$LTCFLAGS"'*
767 s*\$LD*'"$LD"'*
768 s/\$with_gnu_ld/'"$with_gnu_ld"'/
769 s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/
770 s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
771 p
772 d
773 }
774 /^# .* home page:/b print
775 /^# General help using/b print
776 ' < "$progpath"
777 ret=$?
778 if test -z "$1"; then
779 exit $ret
780 fi
781 }
782
783 # func_missing_arg argname
1822 $debug_cmd
1823
1824 func_usage_message
1825 $ECHO "$long_help_message"
1826 exit 0
1827 }
1828
1829
1830 # func_missing_arg ARGNAME
1831 # ------------------------
7841832 # Echo program name prefixed message to standard error and set global
7851833 # exit_cmd.
7861834 func_missing_arg ()
7871835 {
788 $opt_debug
789
790 func_error "missing argument for $1."
1836 $debug_cmd
1837
1838 func_error "Missing argument for '$1'."
7911839 exit_cmd=exit
7921840 }
7931841
7941842
795 # func_split_short_opt shortopt
1843 # func_split_equals STRING
1844 # ------------------------
1845 # Set func_split_equals_lhs and func_split_equals_rhs shell variables after
1846 # splitting STRING at the '=' sign.
1847 test -z "$_G_HAVE_XSI_OPS" \
1848 && (eval 'x=a/b/c;
1849 test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
1850 && _G_HAVE_XSI_OPS=yes
1851
1852 if test yes = "$_G_HAVE_XSI_OPS"
1853 then
1854 # This is an XSI compatible shell, allowing a faster implementation...
1855 eval 'func_split_equals ()
1856 {
1857 $debug_cmd
1858
1859 func_split_equals_lhs=${1%%=*}
1860 func_split_equals_rhs=${1#*=}
1861 test "x$func_split_equals_lhs" = "x$1" \
1862 && func_split_equals_rhs=
1863 }'
1864 else
1865 # ...otherwise fall back to using expr, which is often a shell builtin.
1866 func_split_equals ()
1867 {
1868 $debug_cmd
1869
1870 func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'`
1871 func_split_equals_rhs=
1872 test "x$func_split_equals_lhs" = "x$1" \
1873 || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'`
1874 }
1875 fi #func_split_equals
1876
1877
1878 # func_split_short_opt SHORTOPT
1879 # -----------------------------
7961880 # Set func_split_short_opt_name and func_split_short_opt_arg shell
7971881 # variables after splitting SHORTOPT after the 2nd character.
798 func_split_short_opt ()
799 {
800 my_sed_short_opt='1s/^\(..\).*$/\1/;q'
801 my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
802
803 func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
804 func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
805 } # func_split_short_opt may be replaced by extended shell implementation
806
807
808 # func_split_long_opt longopt
809 # Set func_split_long_opt_name and func_split_long_opt_arg shell
810 # variables after splitting LONGOPT at the `=' sign.
811 func_split_long_opt ()
812 {
813 my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
814 my_sed_long_arg='1s/^--[^=]*=//'
815
816 func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
817 func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
818 } # func_split_long_opt may be replaced by extended shell implementation
819
820 exit_cmd=:
821
822
823
824
825
826 magic="%%%MAGIC variable%%%"
827 magic_exe="%%%MAGIC EXE variable%%%"
828
829 # Global variables.
830 nonopt=
831 preserve_args=
832 lo2o="s/\\.lo\$/.${objext}/"
833 o2lo="s/\\.${objext}\$/.lo/"
834 extracted_archives=
835 extracted_serial=0
836
837 # If this variable is set in any of the actions, the command in it
838 # will be execed at the end. This prevents here-documents from being
839 # left over by shells.
840 exec_cmd=
841
842 # func_append var value
843 # Append VALUE to the end of shell variable VAR.
844 func_append ()
845 {
846 eval "${1}=\$${1}\${2}"
847 } # func_append may be replaced by extended shell implementation
848
849 # func_append_quoted var value
850 # Quote VALUE and append to the end of shell variable VAR, separated
851 # by a space.
852 func_append_quoted ()
853 {
854 func_quote_for_eval "${2}"
855 eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
856 } # func_append_quoted may be replaced by extended shell implementation
857
858
859 # func_arith arithmetic-term...
860 func_arith ()
861 {
862 func_arith_result=`expr "${@}"`
863 } # func_arith may be replaced by extended shell implementation
864
865
866 # func_len string
867 # STRING may not start with a hyphen.
868 func_len ()
869 {
870 func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
871 } # func_len may be replaced by extended shell implementation
872
873
874 # func_lo2o object
875 func_lo2o ()
876 {
877 func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
878 } # func_lo2o may be replaced by extended shell implementation
879
880
881 # func_xform libobj-or-source
882 func_xform ()
883 {
884 func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
885 } # func_xform may be replaced by extended shell implementation
886
887
888 # func_fatal_configuration arg...
1882 if test yes = "$_G_HAVE_XSI_OPS"
1883 then
1884 # This is an XSI compatible shell, allowing a faster implementation...
1885 eval 'func_split_short_opt ()
1886 {
1887 $debug_cmd
1888
1889 func_split_short_opt_arg=${1#??}
1890 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
1891 }'
1892 else
1893 # ...otherwise fall back to using expr, which is often a shell builtin.
1894 func_split_short_opt ()
1895 {
1896 $debug_cmd
1897
1898 func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'`
1899 func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'`
1900 }
1901 fi #func_split_short_opt
1902
1903
1904 # func_usage
1905 # ----------
1906 # Echo short help message to standard output and exit.
1907 func_usage ()
1908 {
1909 $debug_cmd
1910
1911 func_usage_message
1912 $ECHO "Run '$progname --help |${PAGER-more}' for full usage"
1913 exit 0
1914 }
1915
1916
1917 # func_usage_message
1918 # ------------------
1919 # Echo short help message to standard output.
1920 func_usage_message ()
1921 {
1922 $debug_cmd
1923
1924 eval \$ECHO \""Usage: $usage"\"
1925 echo
1926 $SED -n 's|^# ||
1927 /^Written by/{
1928 x;p;x
1929 }
1930 h
1931 /^Written by/q' < "$progpath"
1932 echo
1933 eval \$ECHO \""$usage_message"\"
1934 }
1935
1936
1937 # func_version
1938 # ------------
1939 # Echo version message to standard output and exit.
1940 func_version ()
1941 {
1942 $debug_cmd
1943
1944 printf '%s\n' "$progname $scriptversion"
1945 $SED -n '
1946 /(C)/!b go
1947 :more
1948 /\./!{
1949 N
1950 s|\n# | |
1951 b more
1952 }
1953 :go
1954 /^# Written by /,/# warranty; / {
1955 s|^# ||
1956 s|^# *$||
1957 s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
1958 p
1959 }
1960 /^# Written by / {
1961 s|^# ||
1962 p
1963 }
1964 /^warranty; /q' < "$progpath"
1965
1966 exit $?
1967 }
1968
1969
1970 # Local variables:
1971 # mode: shell-script
1972 # sh-indentation: 2
1973 # eval: (add-hook 'before-save-hook 'time-stamp)
1974 # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
1975 # time-stamp-time-zone: "UTC"
1976 # End:
1977
1978 # Set a version string.
1979 scriptversion='(GNU libtool) 2.4.6'
1980
1981
1982 # func_echo ARG...
1983 # ----------------
1984 # Libtool also displays the current mode in messages, so override
1985 # funclib.sh func_echo with this custom definition.
1986 func_echo ()
1987 {
1988 $debug_cmd
1989
1990 _G_message=$*
1991
1992 func_echo_IFS=$IFS
1993 IFS=$nl
1994 for _G_line in $_G_message; do
1995 IFS=$func_echo_IFS
1996 $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line"
1997 done
1998 IFS=$func_echo_IFS
1999 }
2000
2001
2002 # func_warning ARG...
2003 # -------------------
2004 # Libtool warnings are not categorized, so override funclib.sh
2005 # func_warning with this simpler definition.
2006 func_warning ()
2007 {
2008 $debug_cmd
2009
2010 $warning_func ${1+"$@"}
2011 }
2012
2013
2014 ## ---------------- ##
2015 ## Options parsing. ##
2016 ## ---------------- ##
2017
2018 # Hook in the functions to make sure our own options are parsed during
2019 # the option parsing loop.
2020
2021 usage='$progpath [OPTION]... [MODE-ARG]...'
2022
2023 # Short help message in response to '-h'.
2024 usage_message="Options:
2025 --config show all configuration variables
2026 --debug enable verbose shell tracing
2027 -n, --dry-run display commands without modifying any files
2028 --features display basic configuration information and exit
2029 --mode=MODE use operation mode MODE
2030 --no-warnings equivalent to '-Wnone'
2031 --preserve-dup-deps don't remove duplicate dependency libraries
2032 --quiet, --silent don't print informational messages
2033 --tag=TAG use configuration variables from tag TAG
2034 -v, --verbose print more informational messages than default
2035 --version print version information
2036 -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all]
2037 -h, --help, --help-all print short, long, or detailed help message
2038 "
2039
2040 # Additional text appended to 'usage_message' in response to '--help'.
2041 func_help ()
2042 {
2043 $debug_cmd
2044
2045 func_usage_message
2046 $ECHO "$long_help_message
2047
2048 MODE must be one of the following:
2049
2050 clean remove files from the build directory
2051 compile compile a source file into a libtool object
2052 execute automatically set library path, then run a program
2053 finish complete the installation of libtool libraries
2054 install install libraries or executables
2055 link create a library or an executable
2056 uninstall remove libraries from an installed directory
2057
2058 MODE-ARGS vary depending on the MODE. When passed as first option,
2059 '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that.
2060 Try '$progname --help --mode=MODE' for a more detailed description of MODE.
2061
2062 When reporting a bug, please describe a test case to reproduce it and
2063 include the following information:
2064
2065 host-triplet: $host
2066 shell: $SHELL
2067 compiler: $LTCC
2068 compiler flags: $LTCFLAGS
2069 linker: $LD (gnu? $with_gnu_ld)
2070 version: $progname (GNU libtool) 2.4.6
2071 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
2072 autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
2073
2074 Report bugs to <bug-libtool@gnu.org>.
2075 GNU libtool home page: <http://www.gnu.org/software/libtool/>.
2076 General help using GNU software: <http://www.gnu.org/gethelp/>."
2077 exit 0
2078 }
2079
2080
2081 # func_lo2o OBJECT-NAME
2082 # ---------------------
2083 # Transform OBJECT-NAME from a '.lo' suffix to the platform specific
2084 # object suffix.
2085
2086 lo2o=s/\\.lo\$/.$objext/
2087 o2lo=s/\\.$objext\$/.lo/
2088
2089 if test yes = "$_G_HAVE_XSI_OPS"; then
2090 eval 'func_lo2o ()
2091 {
2092 case $1 in
2093 *.lo) func_lo2o_result=${1%.lo}.$objext ;;
2094 * ) func_lo2o_result=$1 ;;
2095 esac
2096 }'
2097
2098 # func_xform LIBOBJ-OR-SOURCE
2099 # ---------------------------
2100 # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise)
2101 # suffix to a '.lo' libtool-object suffix.
2102 eval 'func_xform ()
2103 {
2104 func_xform_result=${1%.*}.lo
2105 }'
2106 else
2107 # ...otherwise fall back to using sed.
2108 func_lo2o ()
2109 {
2110 func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"`
2111 }
2112
2113 func_xform ()
2114 {
2115 func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'`
2116 }
2117 fi
2118
2119
2120 # func_fatal_configuration ARG...
2121 # -------------------------------
8892122 # Echo program name prefixed message to standard error, followed by
8902123 # a configuration failure hint, and exit.
8912124 func_fatal_configuration ()
8922125 {
893 func_error ${1+"$@"}
894 func_error "See the $PACKAGE documentation for more information."
895 func_fatal_error "Fatal configuration error."
2126 func__fatal_error ${1+"$@"} \
2127 "See the $PACKAGE documentation for more information." \
2128 "Fatal configuration error."
8962129 }
8972130
8982131
8992132 # func_config
2133 # -----------
9002134 # Display the configuration for all the tags in this script.
9012135 func_config ()
9022136 {
9142148 exit $?
9152149 }
9162150
2151
9172152 # func_features
2153 # -------------
9182154 # Display the features supported by this script.
9192155 func_features ()
9202156 {
9212157 echo "host: $host"
922 if test "$build_libtool_libs" = yes; then
2158 if test yes = "$build_libtool_libs"; then
9232159 echo "enable shared libraries"
9242160 else
9252161 echo "disable shared libraries"
9262162 fi
927 if test "$build_old_libs" = yes; then
2163 if test yes = "$build_old_libs"; then
9282164 echo "enable static libraries"
9292165 else
9302166 echo "disable static libraries"
9332169 exit $?
9342170 }
9352171
936 # func_enable_tag tagname
2172
2173 # func_enable_tag TAGNAME
2174 # -----------------------
9372175 # Verify that TAGNAME is valid, and either flag an error and exit, or
9382176 # enable the TAGNAME tag. We also add TAGNAME to the global $taglist
9392177 # variable here.
9402178 func_enable_tag ()
9412179 {
942 # Global variable:
943 tagname="$1"
944
945 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
946 re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
947 sed_extractcf="/$re_begincf/,/$re_endcf/p"
948
949 # Validate tagname.
950 case $tagname in
951 *[!-_A-Za-z0-9,/]*)
952 func_fatal_error "invalid tag name: $tagname"
953 ;;
954 esac
955
956 # Don't test for the "default" C tag, as we know it's
957 # there but not specially marked.
958 case $tagname in
959 CC) ;;
2180 # Global variable:
2181 tagname=$1
2182
2183 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
2184 re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
2185 sed_extractcf=/$re_begincf/,/$re_endcf/p
2186
2187 # Validate tagname.
2188 case $tagname in
2189 *[!-_A-Za-z0-9,/]*)
2190 func_fatal_error "invalid tag name: $tagname"
2191 ;;
2192 esac
2193
2194 # Don't test for the "default" C tag, as we know it's
2195 # there but not specially marked.
2196 case $tagname in
2197 CC) ;;
9602198 *)
961 if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
962 taglist="$taglist $tagname"
963
964 # Evaluate the configuration. Be careful to quote the path
965 # and the sed script, to avoid splitting on whitespace, but
966 # also don't use non-portable quotes within backquotes within
967 # quotes we have to do it in 2 steps:
968 extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
969 eval "$extractedcf"
970 else
971 func_error "ignoring unknown tag $tagname"
972 fi
973 ;;
974 esac
975 }
2199 if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
2200 taglist="$taglist $tagname"
2201
2202 # Evaluate the configuration. Be careful to quote the path
2203 # and the sed script, to avoid splitting on whitespace, but
2204 # also don't use non-portable quotes within backquotes within
2205 # quotes we have to do it in 2 steps:
2206 extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
2207 eval "$extractedcf"
2208 else
2209 func_error "ignoring unknown tag $tagname"
2210 fi
2211 ;;
2212 esac
2213 }
2214
9762215
9772216 # func_check_version_match
2217 # ------------------------
9782218 # Ensure that we are using m4 macros, and libtool script from the same
9792219 # release of libtool.
9802220 func_check_version_match ()
9812221 {
982 if test "$package_revision" != "$macro_revision"; then
983 if test "$VERSION" != "$macro_version"; then
984 if test -z "$macro_version"; then
985 cat >&2 <<_LT_EOF
2222 if test "$package_revision" != "$macro_revision"; then
2223 if test "$VERSION" != "$macro_version"; then
2224 if test -z "$macro_version"; then
2225 cat >&2 <<_LT_EOF
9862226 $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
9872227 $progname: definition of this LT_INIT comes from an older release.
9882228 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
9892229 $progname: and run autoconf again.
9902230 _LT_EOF
991 else
992 cat >&2 <<_LT_EOF
2231 else
2232 cat >&2 <<_LT_EOF
9932233 $progname: Version mismatch error. This is $PACKAGE $VERSION, but the
9942234 $progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
9952235 $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
9962236 $progname: and run autoconf again.
9972237 _LT_EOF
998 fi
999 else
1000 cat >&2 <<_LT_EOF
2238 fi
2239 else
2240 cat >&2 <<_LT_EOF
10012241 $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
10022242 $progname: but the definition of this LT_INIT comes from revision $macro_revision.
10032243 $progname: You should recreate aclocal.m4 with macros from revision $package_revision
10042244 $progname: of $PACKAGE $VERSION and run autoconf again.
10052245 _LT_EOF
2246 fi
2247
2248 exit $EXIT_MISMATCH
10062249 fi
1007
1008 exit $EXIT_MISMATCH
1009 fi
1010 }
1011
1012
1013 # Shorthand for --mode=foo, only valid as the first argument
1014 case $1 in
1015 clean|clea|cle|cl)
1016 shift; set dummy --mode clean ${1+"$@"}; shift
1017 ;;
1018 compile|compil|compi|comp|com|co|c)
1019 shift; set dummy --mode compile ${1+"$@"}; shift
1020 ;;
1021 execute|execut|execu|exec|exe|ex|e)
1022 shift; set dummy --mode execute ${1+"$@"}; shift
1023 ;;
1024 finish|finis|fini|fin|fi|f)
1025 shift; set dummy --mode finish ${1+"$@"}; shift
1026 ;;
1027 install|instal|insta|inst|ins|in|i)
1028 shift; set dummy --mode install ${1+"$@"}; shift
1029 ;;
1030 link|lin|li|l)
1031 shift; set dummy --mode link ${1+"$@"}; shift
1032 ;;
1033 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
1034 shift; set dummy --mode uninstall ${1+"$@"}; shift
1035 ;;
1036 esac
1037
1038
1039
1040 # Option defaults:
1041 opt_debug=:
1042 opt_dry_run=false
1043 opt_config=false
1044 opt_preserve_dup_deps=false
1045 opt_features=false
1046 opt_finish=false
1047 opt_help=false
1048 opt_help_all=false
1049 opt_silent=:
1050 opt_warning=:
1051 opt_verbose=:
1052 opt_silent=false
1053 opt_verbose=false
1054
1055
1056 # Parse options once, thoroughly. This comes as soon as possible in the
1057 # script to make things like `--version' happen as quickly as we can.
1058 {
1059 # this just eases exit handling
1060 while test $# -gt 0; do
1061 opt="$1"
1062 shift
1063 case $opt in
1064 --debug|-x) opt_debug='set -x'
1065 func_echo "enabling shell trace mode"
1066 $opt_debug
1067 ;;
1068 --dry-run|--dryrun|-n)
1069 opt_dry_run=:
1070 ;;
1071 --config)
1072 opt_config=:
1073 func_config
1074 ;;
1075 --dlopen|-dlopen)
1076 optarg="$1"
1077 opt_dlopen="${opt_dlopen+$opt_dlopen
1078 }$optarg"
1079 shift
1080 ;;
1081 --preserve-dup-deps)
1082 opt_preserve_dup_deps=:
1083 ;;
1084 --features)
1085 opt_features=:
1086 func_features
1087 ;;
1088 --finish)
1089 opt_finish=:
1090 set dummy --mode finish ${1+"$@"}; shift
1091 ;;
1092 --help)
1093 opt_help=:
1094 ;;
1095 --help-all)
1096 opt_help_all=:
1097 opt_help=': help-all'
1098 ;;
1099 --mode)
1100 test $# = 0 && func_missing_arg $opt && break
1101 optarg="$1"
1102 opt_mode="$optarg"
1103 case $optarg in
1104 # Valid mode arguments:
1105 clean|compile|execute|finish|install|link|relink|uninstall) ;;
1106
1107 # Catch anything else as an error
1108 *) func_error "invalid argument for $opt"
1109 exit_cmd=exit
1110 break
1111 ;;
1112 esac
1113 shift
1114 ;;
1115 --no-silent|--no-quiet)
1116 opt_silent=false
1117 func_append preserve_args " $opt"
1118 ;;
1119 --no-warning|--no-warn)
1120 opt_warning=false
1121 func_append preserve_args " $opt"
1122 ;;
1123 --no-verbose)
1124 opt_verbose=false
1125 func_append preserve_args " $opt"
1126 ;;
1127 --silent|--quiet)
1128 opt_silent=:
1129 func_append preserve_args " $opt"
1130 opt_verbose=false
1131 ;;
1132 --verbose|-v)
1133 opt_verbose=:
1134 func_append preserve_args " $opt"
1135 opt_silent=false
1136 ;;
1137 --tag)
1138 test $# = 0 && func_missing_arg $opt && break
1139 optarg="$1"
1140 opt_tag="$optarg"
1141 func_append preserve_args " $opt $optarg"
1142 func_enable_tag "$optarg"
1143 shift
1144 ;;
1145
1146 -\?|-h) func_usage ;;
1147 --help) func_help ;;
1148 --version) func_version ;;
1149
1150 # Separate optargs to long options:
1151 --*=*)
1152 func_split_long_opt "$opt"
1153 set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
1154 shift
1155 ;;
1156
1157 # Separate non-argument short options:
1158 -\?*|-h*|-n*|-v*)
1159 func_split_short_opt "$opt"
1160 set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
1161 shift
1162 ;;
1163
1164 --) break ;;
1165 -*) func_fatal_help "unrecognized option \`$opt'" ;;
1166 *) set dummy "$opt" ${1+"$@"}; shift; break ;;
2250 }
2251
2252
2253 # libtool_options_prep [ARG]...
2254 # -----------------------------
2255 # Preparation for options parsed by libtool.
2256 libtool_options_prep ()
2257 {
2258 $debug_mode
2259
2260 # Option defaults:
2261 opt_config=false
2262 opt_dlopen=
2263 opt_dry_run=false
2264 opt_help=false
2265 opt_mode=
2266 opt_preserve_dup_deps=false
2267 opt_quiet=false
2268
2269 nonopt=
2270 preserve_args=
2271
2272 # Shorthand for --mode=foo, only valid as the first argument
2273 case $1 in
2274 clean|clea|cle|cl)
2275 shift; set dummy --mode clean ${1+"$@"}; shift
2276 ;;
2277 compile|compil|compi|comp|com|co|c)
2278 shift; set dummy --mode compile ${1+"$@"}; shift
2279 ;;
2280 execute|execut|execu|exec|exe|ex|e)
2281 shift; set dummy --mode execute ${1+"$@"}; shift
2282 ;;
2283 finish|finis|fini|fin|fi|f)
2284 shift; set dummy --mode finish ${1+"$@"}; shift
2285 ;;
2286 install|instal|insta|inst|ins|in|i)
2287 shift; set dummy --mode install ${1+"$@"}; shift
2288 ;;
2289 link|lin|li|l)
2290 shift; set dummy --mode link ${1+"$@"}; shift
2291 ;;
2292 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
2293 shift; set dummy --mode uninstall ${1+"$@"}; shift
2294 ;;
11672295 esac
1168 done
1169
1170 # Validate options:
1171
1172 # save first non-option argument
1173 if test "$#" -gt 0; then
1174 nonopt="$opt"
1175 shift
1176 fi
1177
1178 # preserve --debug
1179 test "$opt_debug" = : || func_append preserve_args " --debug"
1180
1181 case $host in
1182 *cygwin* | *mingw* | *pw32* | *cegcc*)
1183 # don't eliminate duplications in $postdeps and $predeps
1184 opt_duplicate_compiler_generated_deps=:
1185 ;;
1186 *)
1187 opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
1188 ;;
1189 esac
1190
1191 $opt_help || {
1192 # Sanity checks first:
1193 func_check_version_match
1194
1195 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
1196 func_fatal_configuration "not configured to build any kind of library"
2296
2297 # Pass back the list of options.
2298 func_quote_for_eval ${1+"$@"}
2299 libtool_options_prep_result=$func_quote_for_eval_result
2300 }
2301 func_add_hook func_options_prep libtool_options_prep
2302
2303
2304 # libtool_parse_options [ARG]...
2305 # ---------------------------------
2306 # Provide handling for libtool specific options.
2307 libtool_parse_options ()
2308 {
2309 $debug_cmd
2310
2311 # Perform our own loop to consume as many options as possible in
2312 # each iteration.
2313 while test $# -gt 0; do
2314 _G_opt=$1
2315 shift
2316 case $_G_opt in
2317 --dry-run|--dryrun|-n)
2318 opt_dry_run=:
2319 ;;
2320
2321 --config) func_config ;;
2322
2323 --dlopen|-dlopen)
2324 opt_dlopen="${opt_dlopen+$opt_dlopen
2325 }$1"
2326 shift
2327 ;;
2328
2329 --preserve-dup-deps)
2330 opt_preserve_dup_deps=: ;;
2331
2332 --features) func_features ;;
2333
2334 --finish) set dummy --mode finish ${1+"$@"}; shift ;;
2335
2336 --help) opt_help=: ;;
2337
2338 --help-all) opt_help=': help-all' ;;
2339
2340 --mode) test $# = 0 && func_missing_arg $_G_opt && break
2341 opt_mode=$1
2342 case $1 in
2343 # Valid mode arguments:
2344 clean|compile|execute|finish|install|link|relink|uninstall) ;;
2345
2346 # Catch anything else as an error
2347 *) func_error "invalid argument for $_G_opt"
2348 exit_cmd=exit
2349 break
2350 ;;
2351 esac
2352 shift
2353 ;;
2354
2355 --no-silent|--no-quiet)
2356 opt_quiet=false
2357 func_append preserve_args " $_G_opt"
2358 ;;
2359
2360 --no-warnings|--no-warning|--no-warn)
2361 opt_warning=false
2362 func_append preserve_args " $_G_opt"
2363 ;;
2364
2365 --no-verbose)
2366 opt_verbose=false
2367 func_append preserve_args " $_G_opt"
2368 ;;
2369
2370 --silent|--quiet)
2371 opt_quiet=:
2372 opt_verbose=false
2373 func_append preserve_args " $_G_opt"
2374 ;;
2375
2376 --tag) test $# = 0 && func_missing_arg $_G_opt && break
2377 opt_tag=$1
2378 func_append preserve_args " $_G_opt $1"
2379 func_enable_tag "$1"
2380 shift
2381 ;;
2382
2383 --verbose|-v) opt_quiet=false
2384 opt_verbose=:
2385 func_append preserve_args " $_G_opt"
2386 ;;
2387
2388 # An option not handled by this hook function:
2389 *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
2390 esac
2391 done
2392
2393
2394 # save modified positional parameters for caller
2395 func_quote_for_eval ${1+"$@"}
2396 libtool_parse_options_result=$func_quote_for_eval_result
2397 }
2398 func_add_hook func_parse_options libtool_parse_options
2399
2400
2401
2402 # libtool_validate_options [ARG]...
2403 # ---------------------------------
2404 # Perform any sanity checks on option settings and/or unconsumed
2405 # arguments.
2406 libtool_validate_options ()
2407 {
2408 # save first non-option argument
2409 if test 0 -lt $#; then
2410 nonopt=$1
2411 shift
11972412 fi
11982413
1199 # Darwin sucks
1200 eval std_shrext=\"$shrext_cmds\"
1201
1202 # Only execute mode is allowed to have -dlopen flags.
1203 if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
1204 func_error "unrecognized option \`-dlopen'"
1205 $ECHO "$help" 1>&2
1206 exit $EXIT_FAILURE
1207 fi
1208
1209 # Change the help message to a mode-specific one.
1210 generic_help="$help"
1211 help="Try \`$progname --help --mode=$opt_mode' for more information."
1212 }
1213
1214
1215 # Bail if the options were screwed
1216 $exit_cmd $EXIT_FAILURE
1217 }
1218
2414 # preserve --debug
2415 test : = "$debug_cmd" || func_append preserve_args " --debug"
2416
2417 case $host in
2418 # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
2419 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
2420 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
2421 # don't eliminate duplications in $postdeps and $predeps
2422 opt_duplicate_compiler_generated_deps=:
2423 ;;
2424 *)
2425 opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
2426 ;;
2427 esac
2428
2429 $opt_help || {
2430 # Sanity checks first:
2431 func_check_version_match
2432
2433 test yes != "$build_libtool_libs" \
2434 && test yes != "$build_old_libs" \
2435 && func_fatal_configuration "not configured to build any kind of library"
2436
2437 # Darwin sucks
2438 eval std_shrext=\"$shrext_cmds\"
2439
2440 # Only execute mode is allowed to have -dlopen flags.
2441 if test -n "$opt_dlopen" && test execute != "$opt_mode"; then
2442 func_error "unrecognized option '-dlopen'"
2443 $ECHO "$help" 1>&2
2444 exit $EXIT_FAILURE
2445 fi
2446
2447 # Change the help message to a mode-specific one.
2448 generic_help=$help
2449 help="Try '$progname --help --mode=$opt_mode' for more information."
2450 }
2451
2452 # Pass back the unparsed argument list
2453 func_quote_for_eval ${1+"$@"}
2454 libtool_validate_options_result=$func_quote_for_eval_result
2455 }
2456 func_add_hook func_validate_options libtool_validate_options
2457
2458
2459 # Process options as early as possible so that --help and --version
2460 # can return quickly.
2461 func_options ${1+"$@"}
2462 eval set dummy "$func_options_result"; shift
12192463
12202464
12212465
12232467 ## Main. ##
12242468 ## ----------- ##
12252469
2470 magic='%%%MAGIC variable%%%'
2471 magic_exe='%%%MAGIC EXE variable%%%'
2472
2473 # Global variables.
2474 extracted_archives=
2475 extracted_serial=0
2476
2477 # If this variable is set in any of the actions, the command in it
2478 # will be execed at the end. This prevents here-documents from being
2479 # left over by shells.
2480 exec_cmd=
2481
2482
2483 # A function that is used when there is no print builtin or printf.
2484 func_fallback_echo ()
2485 {
2486 eval 'cat <<_LTECHO_EOF
2487 $1
2488 _LTECHO_EOF'
2489 }
2490
2491 # func_generated_by_libtool
2492 # True iff stdin has been generated by Libtool. This function is only
2493 # a basic sanity check; it will hardly flush out determined imposters.
2494 func_generated_by_libtool_p ()
2495 {
2496 $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
2497 }
2498
12262499 # func_lalib_p file
1227 # True iff FILE is a libtool `.la' library or `.lo' object file.
2500 # True iff FILE is a libtool '.la' library or '.lo' object file.
12282501 # This function is only a basic sanity check; it will hardly flush out
12292502 # determined imposters.
12302503 func_lalib_p ()
12312504 {
12322505 test -f "$1" &&
1233 $SED -e 4q "$1" 2>/dev/null \
1234 | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
2506 $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p
12352507 }
12362508
12372509 # func_lalib_unsafe_p file
1238 # True iff FILE is a libtool `.la' library or `.lo' object file.
2510 # True iff FILE is a libtool '.la' library or '.lo' object file.
12392511 # This function implements the same check as func_lalib_p without
12402512 # resorting to external programs. To this end, it redirects stdin and
12412513 # closes it afterwards, without saving the original file descriptor.
12422514 # As a safety measure, use it only where a negative result would be
1243 # fatal anyway. Works if `file' does not exist.
2515 # fatal anyway. Works if 'file' does not exist.
12442516 func_lalib_unsafe_p ()
12452517 {
12462518 lalib_p=no
12482520 for lalib_p_l in 1 2 3 4
12492521 do
12502522 read lalib_p_line
1251 case "$lalib_p_line" in
2523 case $lalib_p_line in
12522524 \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
12532525 esac
12542526 done
12552527 exec 0<&5 5<&-
12562528 fi
1257 test "$lalib_p" = yes
2529 test yes = "$lalib_p"
12582530 }
12592531
12602532 # func_ltwrapper_script_p file
12632535 # determined imposters.
12642536 func_ltwrapper_script_p ()
12652537 {
1266 func_lalib_p "$1"
2538 test -f "$1" &&
2539 $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p
12672540 }
12682541
12692542 # func_ltwrapper_executable_p file
12882561 {
12892562 func_dirname_and_basename "$1" "" "."
12902563 func_stripname '' '.exe' "$func_basename_result"
1291 func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
2564 func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper
12922565 }
12932566
12942567 # func_ltwrapper_p file
13072580 # FAIL_CMD may read-access the current command in variable CMD!
13082581 func_execute_cmds ()
13092582 {
1310 $opt_debug
2583 $debug_cmd
2584
13112585 save_ifs=$IFS; IFS='~'
13122586 for cmd in $1; do
2587 IFS=$sp$nl
2588 eval cmd=\"$cmd\"
13132589 IFS=$save_ifs
1314 eval cmd=\"$cmd\"
13152590 func_show_eval "$cmd" "${2-:}"
13162591 done
13172592 IFS=$save_ifs
13232598 # Note that it is not necessary on cygwin/mingw to append a dot to
13242599 # FILE even if both FILE and FILE.exe exist: automatic-append-.exe
13252600 # behavior happens only for exec(3), not for open(2)! Also, sourcing
1326 # `FILE.' does not work on cygwin managed mounts.
2601 # 'FILE.' does not work on cygwin managed mounts.
13272602 func_source ()
13282603 {
1329 $opt_debug
2604 $debug_cmd
2605
13302606 case $1 in
13312607 */* | *\\*) . "$1" ;;
13322608 *) . "./$1" ;;
13532629 # store the result into func_replace_sysroot_result.
13542630 func_replace_sysroot ()
13552631 {
1356 case "$lt_sysroot:$1" in
2632 case $lt_sysroot:$1 in
13572633 ?*:"$lt_sysroot"*)
13582634 func_stripname "$lt_sysroot" '' "$1"
1359 func_replace_sysroot_result="=$func_stripname_result"
2635 func_replace_sysroot_result='='$func_stripname_result
13602636 ;;
13612637 *)
13622638 # Including no sysroot.
13732649 # arg is usually of the form 'gcc ...'
13742650 func_infer_tag ()
13752651 {
1376 $opt_debug
2652 $debug_cmd
2653
13772654 if test -n "$available_tags" && test -z "$tagname"; then
13782655 CC_quoted=
13792656 for arg in $CC; do
13922669 for z in $available_tags; do
13932670 if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
13942671 # Evaluate the configuration.
1395 eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
2672 eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
13962673 CC_quoted=
13972674 for arg in $CC; do
13982675 # Double-quote args containing other shell metacharacters.
14172694 # line option must be used.
14182695 if test -z "$tagname"; then
14192696 func_echo "unable to infer tagged configuration"
1420 func_fatal_error "specify a tag with \`--tag'"
2697 func_fatal_error "specify a tag with '--tag'"
14212698 # else
14222699 # func_verbose "using $tagname tagged configuration"
14232700 fi
14332710 # but don't create it if we're doing a dry run.
14342711 func_write_libtool_object ()
14352712 {
1436 write_libobj=${1}
1437 if test "$build_libtool_libs" = yes; then
1438 write_lobj=\'${2}\'
2713 write_libobj=$1
2714 if test yes = "$build_libtool_libs"; then
2715 write_lobj=\'$2\'
14392716 else
14402717 write_lobj=none
14412718 fi
14422719
1443 if test "$build_old_libs" = yes; then
1444 write_oldobj=\'${3}\'
2720 if test yes = "$build_old_libs"; then
2721 write_oldobj=\'$3\'
14452722 else
14462723 write_oldobj=none
14472724 fi
14492726 $opt_dry_run || {
14502727 cat >${write_libobj}T <<EOF
14512728 # $write_libobj - a libtool object file
1452 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
2729 # Generated by $PROGRAM (GNU $PACKAGE) $VERSION
14532730 #
14542731 # Please DO NOT delete this file!
14552732 # It is necessary for linking the library.
14612738 non_pic_object=$write_oldobj
14622739
14632740 EOF
1464 $MV "${write_libobj}T" "${write_libobj}"
2741 $MV "${write_libobj}T" "$write_libobj"
14652742 }
14662743 }
14672744
14812758 # be empty on error (or when ARG is empty)
14822759 func_convert_core_file_wine_to_w32 ()
14832760 {
1484 $opt_debug
1485 func_convert_core_file_wine_to_w32_result="$1"
2761 $debug_cmd
2762
2763 func_convert_core_file_wine_to_w32_result=$1
14862764 if test -n "$1"; then
14872765 # Unfortunately, winepath does not exit with a non-zero error code, so we
14882766 # are forced to check the contents of stdout. On the other hand, if the
14902768 # *an error message* to stdout. So we must check for both error code of
14912769 # zero AND non-empty stdout, which explains the odd construction:
14922770 func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
1493 if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
2771 if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then
14942772 func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
1495 $SED -e "$lt_sed_naive_backslashify"`
2773 $SED -e "$sed_naive_backslashify"`
14962774 else
14972775 func_convert_core_file_wine_to_w32_result=
14982776 fi
15132791 # are convertible, then the result may be empty.
15142792 func_convert_core_path_wine_to_w32 ()
15152793 {
1516 $opt_debug
2794 $debug_cmd
2795
15172796 # unfortunately, winepath doesn't convert paths, only file names
1518 func_convert_core_path_wine_to_w32_result=""
2797 func_convert_core_path_wine_to_w32_result=
15192798 if test -n "$1"; then
15202799 oldIFS=$IFS
15212800 IFS=:
15222801 for func_convert_core_path_wine_to_w32_f in $1; do
15232802 IFS=$oldIFS
15242803 func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
1525 if test -n "$func_convert_core_file_wine_to_w32_result" ; then
2804 if test -n "$func_convert_core_file_wine_to_w32_result"; then
15262805 if test -z "$func_convert_core_path_wine_to_w32_result"; then
1527 func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
2806 func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result
15282807 else
15292808 func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
15302809 fi
15532832 # environment variable; do not put it in $PATH.
15542833 func_cygpath ()
15552834 {
1556 $opt_debug
2835 $debug_cmd
2836
15572837 if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
15582838 func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
15592839 if test "$?" -ne 0; then
15622842 fi
15632843 else
15642844 func_cygpath_result=
1565 func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
2845 func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'"
15662846 fi
15672847 }
15682848 #end: func_cygpath
15732853 # result in func_convert_core_msys_to_w32_result.
15742854 func_convert_core_msys_to_w32 ()
15752855 {
1576 $opt_debug
2856 $debug_cmd
2857
15772858 # awkward: cmd appends spaces to result
15782859 func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
1579 $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
2860 $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
15802861 }
15812862 #end: func_convert_core_msys_to_w32
15822863
15872868 # func_to_host_file_result to ARG1).
15882869 func_convert_file_check ()
15892870 {
1590 $opt_debug
1591 if test -z "$2" && test -n "$1" ; then
2871 $debug_cmd
2872
2873 if test -z "$2" && test -n "$1"; then
15922874 func_error "Could not determine host file name corresponding to"
1593 func_error " \`$1'"
2875 func_error " '$1'"
15942876 func_error "Continuing, but uninstalled executables may not work."
15952877 # Fallback:
1596 func_to_host_file_result="$1"
2878 func_to_host_file_result=$1
15972879 fi
15982880 }
15992881 # end func_convert_file_check
16052887 # func_to_host_file_result to a simplistic fallback value (see below).
16062888 func_convert_path_check ()
16072889 {
1608 $opt_debug
2890 $debug_cmd
2891
16092892 if test -z "$4" && test -n "$3"; then
16102893 func_error "Could not determine the host path corresponding to"
1611 func_error " \`$3'"
2894 func_error " '$3'"
16122895 func_error "Continuing, but uninstalled executables may not work."
16132896 # Fallback. This is a deliberately simplistic "conversion" and
16142897 # should not be "improved". See libtool.info.
16172900 func_to_host_path_result=`echo "$3" |
16182901 $SED -e "$lt_replace_pathsep_chars"`
16192902 else
1620 func_to_host_path_result="$3"
2903 func_to_host_path_result=$3
16212904 fi
16222905 fi
16232906 }
16292912 # and appending REPL if ORIG matches BACKPAT.
16302913 func_convert_path_front_back_pathsep ()
16312914 {
1632 $opt_debug
2915 $debug_cmd
2916
16332917 case $4 in
1634 $1 ) func_to_host_path_result="$3$func_to_host_path_result"
2918 $1 ) func_to_host_path_result=$3$func_to_host_path_result
16352919 ;;
16362920 esac
16372921 case $4 in
16452929 ##################################################
16462930 # $build to $host FILE NAME CONVERSION FUNCTIONS #
16472931 ##################################################
1648 # invoked via `$to_host_file_cmd ARG'
2932 # invoked via '$to_host_file_cmd ARG'
16492933 #
16502934 # In each case, ARG is the path to be converted from $build to $host format.
16512935 # Result will be available in $func_to_host_file_result.
16562940 # in func_to_host_file_result.
16572941 func_to_host_file ()
16582942 {
1659 $opt_debug
2943 $debug_cmd
2944
16602945 $to_host_file_cmd "$1"
16612946 }
16622947 # end func_to_host_file
16682953 # in (the comma separated) LAZY, no conversion takes place.
16692954 func_to_tool_file ()
16702955 {
1671 $opt_debug
2956 $debug_cmd
2957
16722958 case ,$2, in
16732959 *,"$to_tool_file_cmd",*)
16742960 func_to_tool_file_result=$1
16862972 # Copy ARG to func_to_host_file_result.
16872973 func_convert_file_noop ()
16882974 {
1689 func_to_host_file_result="$1"
2975 func_to_host_file_result=$1
16902976 }
16912977 # end func_convert_file_noop
16922978
16972983 # func_to_host_file_result.
16982984 func_convert_file_msys_to_w32 ()
16992985 {
1700 $opt_debug
1701 func_to_host_file_result="$1"
2986 $debug_cmd
2987
2988 func_to_host_file_result=$1
17022989 if test -n "$1"; then
17032990 func_convert_core_msys_to_w32 "$1"
1704 func_to_host_file_result="$func_convert_core_msys_to_w32_result"
2991 func_to_host_file_result=$func_convert_core_msys_to_w32_result
17052992 fi
17062993 func_convert_file_check "$1" "$func_to_host_file_result"
17072994 }
17133000 # func_to_host_file_result.
17143001 func_convert_file_cygwin_to_w32 ()
17153002 {
1716 $opt_debug
1717 func_to_host_file_result="$1"
3003 $debug_cmd
3004
3005 func_to_host_file_result=$1
17183006 if test -n "$1"; then
17193007 # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
17203008 # LT_CYGPATH in this case.
17303018 # and a working winepath. Returns result in func_to_host_file_result.
17313019 func_convert_file_nix_to_w32 ()
17323020 {
1733 $opt_debug
1734 func_to_host_file_result="$1"
3021 $debug_cmd
3022
3023 func_to_host_file_result=$1
17353024 if test -n "$1"; then
17363025 func_convert_core_file_wine_to_w32 "$1"
1737 func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
3026 func_to_host_file_result=$func_convert_core_file_wine_to_w32_result
17383027 fi
17393028 func_convert_file_check "$1" "$func_to_host_file_result"
17403029 }
17463035 # Returns result in func_to_host_file_result.
17473036 func_convert_file_msys_to_cygwin ()
17483037 {
1749 $opt_debug
1750 func_to_host_file_result="$1"
3038 $debug_cmd
3039
3040 func_to_host_file_result=$1
17513041 if test -n "$1"; then
17523042 func_convert_core_msys_to_w32 "$1"
17533043 func_cygpath -u "$func_convert_core_msys_to_w32_result"
1754 func_to_host_file_result="$func_cygpath_result"
3044 func_to_host_file_result=$func_cygpath_result
17553045 fi
17563046 func_convert_file_check "$1" "$func_to_host_file_result"
17573047 }
17643054 # in func_to_host_file_result.
17653055 func_convert_file_nix_to_cygwin ()
17663056 {
1767 $opt_debug
1768 func_to_host_file_result="$1"
3057 $debug_cmd
3058
3059 func_to_host_file_result=$1
17693060 if test -n "$1"; then
17703061 # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
17713062 func_convert_core_file_wine_to_w32 "$1"
17723063 func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
1773 func_to_host_file_result="$func_cygpath_result"
3064 func_to_host_file_result=$func_cygpath_result
17743065 fi
17753066 func_convert_file_check "$1" "$func_to_host_file_result"
17763067 }
17803071 #############################################
17813072 # $build to $host PATH CONVERSION FUNCTIONS #
17823073 #############################################
1783 # invoked via `$to_host_path_cmd ARG'
3074 # invoked via '$to_host_path_cmd ARG'
17843075 #
17853076 # In each case, ARG is the path to be converted from $build to $host format.
17863077 # The result will be available in $func_to_host_path_result.
18043095 to_host_path_cmd=
18053096 func_init_to_host_path_cmd ()
18063097 {
1807 $opt_debug
3098 $debug_cmd
3099
18083100 if test -z "$to_host_path_cmd"; then
18093101 func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
1810 to_host_path_cmd="func_convert_path_${func_stripname_result}"
3102 to_host_path_cmd=func_convert_path_$func_stripname_result
18113103 fi
18123104 }
18133105
18173109 # in func_to_host_path_result.
18183110 func_to_host_path ()
18193111 {
1820 $opt_debug
3112 $debug_cmd
3113
18213114 func_init_to_host_path_cmd
18223115 $to_host_path_cmd "$1"
18233116 }
18283121 # Copy ARG to func_to_host_path_result.
18293122 func_convert_path_noop ()
18303123 {
1831 func_to_host_path_result="$1"
3124 func_to_host_path_result=$1
18323125 }
18333126 # end func_convert_path_noop
18343127
18393132 # func_to_host_path_result.
18403133 func_convert_path_msys_to_w32 ()
18413134 {
1842 $opt_debug
1843 func_to_host_path_result="$1"
3135 $debug_cmd
3136
3137 func_to_host_path_result=$1
18443138 if test -n "$1"; then
18453139 # Remove leading and trailing path separator characters from ARG. MSYS
18463140 # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
18483142 func_stripname : : "$1"
18493143 func_to_host_path_tmp1=$func_stripname_result
18503144 func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
1851 func_to_host_path_result="$func_convert_core_msys_to_w32_result"
3145 func_to_host_path_result=$func_convert_core_msys_to_w32_result
18523146 func_convert_path_check : ";" \
18533147 "$func_to_host_path_tmp1" "$func_to_host_path_result"
18543148 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
18623156 # func_to_host_file_result.
18633157 func_convert_path_cygwin_to_w32 ()
18643158 {
1865 $opt_debug
1866 func_to_host_path_result="$1"
3159 $debug_cmd
3160
3161 func_to_host_path_result=$1
18673162 if test -n "$1"; then
18683163 # See func_convert_path_msys_to_w32:
18693164 func_stripname : : "$1"
18823177 # a working winepath. Returns result in func_to_host_file_result.
18833178 func_convert_path_nix_to_w32 ()
18843179 {
1885 $opt_debug
1886 func_to_host_path_result="$1"
3180 $debug_cmd
3181
3182 func_to_host_path_result=$1
18873183 if test -n "$1"; then
18883184 # See func_convert_path_msys_to_w32:
18893185 func_stripname : : "$1"
18903186 func_to_host_path_tmp1=$func_stripname_result
18913187 func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
1892 func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
3188 func_to_host_path_result=$func_convert_core_path_wine_to_w32_result
18933189 func_convert_path_check : ";" \
18943190 "$func_to_host_path_tmp1" "$func_to_host_path_result"
18953191 func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
19033199 # Returns result in func_to_host_file_result.
19043200 func_convert_path_msys_to_cygwin ()
19053201 {
1906 $opt_debug
1907 func_to_host_path_result="$1"
3202 $debug_cmd
3203
3204 func_to_host_path_result=$1
19083205 if test -n "$1"; then
19093206 # See func_convert_path_msys_to_w32:
19103207 func_stripname : : "$1"
19113208 func_to_host_path_tmp1=$func_stripname_result
19123209 func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
19133210 func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
1914 func_to_host_path_result="$func_cygpath_result"
3211 func_to_host_path_result=$func_cygpath_result
19153212 func_convert_path_check : : \
19163213 "$func_to_host_path_tmp1" "$func_to_host_path_result"
19173214 func_convert_path_front_back_pathsep ":*" "*:" : "$1"
19263223 # func_to_host_file_result.
19273224 func_convert_path_nix_to_cygwin ()
19283225 {
1929 $opt_debug
1930 func_to_host_path_result="$1"
3226 $debug_cmd
3227
3228 func_to_host_path_result=$1
19313229 if test -n "$1"; then
19323230 # Remove leading and trailing path separator characters from
19333231 # ARG. msys behavior is inconsistent here, cygpath turns them
19363234 func_to_host_path_tmp1=$func_stripname_result
19373235 func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
19383236 func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
1939 func_to_host_path_result="$func_cygpath_result"
3237 func_to_host_path_result=$func_cygpath_result
19403238 func_convert_path_check : : \
19413239 "$func_to_host_path_tmp1" "$func_to_host_path_result"
19423240 func_convert_path_front_back_pathsep ":*" "*:" : "$1"
19453243 # end func_convert_path_nix_to_cygwin
19463244
19473245
3246 # func_dll_def_p FILE
3247 # True iff FILE is a Windows DLL '.def' file.
3248 # Keep in sync with _LT_DLL_DEF_P in libtool.m4
3249 func_dll_def_p ()
3250 {
3251 $debug_cmd
3252
3253 func_dll_def_p_tmp=`$SED -n \
3254 -e 's/^[ ]*//' \
3255 -e '/^\(;.*\)*$/d' \
3256 -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \
3257 -e q \
3258 "$1"`
3259 test DEF = "$func_dll_def_p_tmp"
3260 }
3261
3262
19483263 # func_mode_compile arg...
19493264 func_mode_compile ()
19503265 {
1951 $opt_debug
3266 $debug_cmd
3267
19523268 # Get the compilation command and the source file.
19533269 base_compile=
1954 srcfile="$nonopt" # always keep a non-empty value in "srcfile"
3270 srcfile=$nonopt # always keep a non-empty value in "srcfile"
19553271 suppress_opt=yes
19563272 suppress_output=
19573273 arg_mode=normal
19643280 case $arg_mode in
19653281 arg )
19663282 # do not "continue". Instead, add this to base_compile
1967 lastarg="$arg"
3283 lastarg=$arg
19683284 arg_mode=normal
19693285 ;;
19703286
19713287 target )
1972 libobj="$arg"
3288 libobj=$arg
19733289 arg_mode=normal
19743290 continue
19753291 ;;
19793295 case $arg in
19803296 -o)
19813297 test -n "$libobj" && \
1982 func_fatal_error "you cannot specify \`-o' more than once"
3298 func_fatal_error "you cannot specify '-o' more than once"
19833299 arg_mode=target
19843300 continue
19853301 ;;
20083324 func_stripname '-Wc,' '' "$arg"
20093325 args=$func_stripname_result
20103326 lastarg=
2011 save_ifs="$IFS"; IFS=','
3327 save_ifs=$IFS; IFS=,
20123328 for arg in $args; do
2013 IFS="$save_ifs"
3329 IFS=$save_ifs
20143330 func_append_quoted lastarg "$arg"
20153331 done
2016 IFS="$save_ifs"
3332 IFS=$save_ifs
20173333 func_stripname ' ' '' "$lastarg"
20183334 lastarg=$func_stripname_result
20193335
20263342 # Accept the current argument as the source file.
20273343 # The previous "srcfile" becomes the current argument.
20283344 #
2029 lastarg="$srcfile"
2030 srcfile="$arg"
3345 lastarg=$srcfile
3346 srcfile=$arg
20313347 ;;
20323348 esac # case $arg
20333349 ;;
20423358 func_fatal_error "you must specify an argument for -Xcompile"
20433359 ;;
20443360 target)
2045 func_fatal_error "you must specify a target with \`-o'"
3361 func_fatal_error "you must specify a target with '-o'"
20463362 ;;
20473363 *)
20483364 # Get the name of the library object.
20493365 test -z "$libobj" && {
20503366 func_basename "$srcfile"
2051 libobj="$func_basename_result"
3367 libobj=$func_basename_result
20523368 }
20533369 ;;
20543370 esac
20683384 case $libobj in
20693385 *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
20703386 *)
2071 func_fatal_error "cannot determine name of library object from \`$libobj'"
3387 func_fatal_error "cannot determine name of library object from '$libobj'"
20723388 ;;
20733389 esac
20743390
20773393 for arg in $later; do
20783394 case $arg in
20793395 -shared)
2080 test "$build_libtool_libs" != yes && \
2081 func_fatal_configuration "can not build a shared library"
3396 test yes = "$build_libtool_libs" \
3397 || func_fatal_configuration "cannot build a shared library"
20823398 build_old_libs=no
20833399 continue
20843400 ;;
21043420 func_quote_for_eval "$libobj"
21053421 test "X$libobj" != "X$func_quote_for_eval_result" \
21063422 && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
2107 && func_warning "libobj name \`$libobj' may not contain shell special characters."
3423 && func_warning "libobj name '$libobj' may not contain shell special characters."
21083424 func_dirname_and_basename "$obj" "/" ""
2109 objname="$func_basename_result"
2110 xdir="$func_dirname_result"
2111 lobj=${xdir}$objdir/$objname
3425 objname=$func_basename_result
3426 xdir=$func_dirname_result
3427 lobj=$xdir$objdir/$objname
21123428
21133429 test -z "$base_compile" && \
21143430 func_fatal_help "you must specify a compilation command"
21153431
21163432 # Delete any leftover library objects.
2117 if test "$build_old_libs" = yes; then
3433 if test yes = "$build_old_libs"; then
21183434 removelist="$obj $lobj $libobj ${libobj}T"
21193435 else
21203436 removelist="$lobj $libobj ${libobj}T"
21263442 pic_mode=default
21273443 ;;
21283444 esac
2129 if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
3445 if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then
21303446 # non-PIC code in shared libraries is not supported
21313447 pic_mode=default
21323448 fi
21333449
21343450 # Calculate the filename of the output object if compiler does
21353451 # not support -o with -c
2136 if test "$compiler_c_o" = no; then
2137 output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
2138 lockfile="$output_obj.lock"
3452 if test no = "$compiler_c_o"; then
3453 output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext
3454 lockfile=$output_obj.lock
21393455 else
21403456 output_obj=
21413457 need_locks=no
21443460
21453461 # Lock this critical section if it is needed
21463462 # We use this script file to make the link, it avoids creating a new file
2147 if test "$need_locks" = yes; then
3463 if test yes = "$need_locks"; then
21483464 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
21493465 func_echo "Waiting for $lockfile to be removed"
21503466 sleep 2
21513467 done
2152 elif test "$need_locks" = warn; then
3468 elif test warn = "$need_locks"; then
21533469 if test -f "$lockfile"; then
21543470 $ECHO "\
21553471 *** ERROR, $lockfile exists and contains:
21573473
21583474 This indicates that another process is trying to use the same
21593475 temporary object file, and libtool could not work around it because
2160 your compiler does not support \`-c' and \`-o' together. If you
3476 your compiler does not support '-c' and '-o' together. If you
21613477 repeat this compilation, it may succeed, by chance, but you had better
21623478 avoid parallel builds (make -j) in this platform, or get a better
21633479 compiler."
21793495 qsrcfile=$func_quote_for_eval_result
21803496
21813497 # Only build a PIC object if we are building libtool libraries.
2182 if test "$build_libtool_libs" = yes; then
3498 if test yes = "$build_libtool_libs"; then
21833499 # Without this assignment, base_compile gets emptied.
21843500 fbsd_hideous_sh_bug=$base_compile
21853501
2186 if test "$pic_mode" != no; then
3502 if test no != "$pic_mode"; then
21873503 command="$base_compile $qsrcfile $pic_flag"
21883504 else
21893505 # Don't build PIC code
22003516 func_show_eval_locale "$command" \
22013517 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
22023518
2203 if test "$need_locks" = warn &&
3519 if test warn = "$need_locks" &&
22043520 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
22053521 $ECHO "\
22063522 *** ERROR, $lockfile contains:
22113527
22123528 This indicates that another process is trying to use the same
22133529 temporary object file, and libtool could not work around it because
2214 your compiler does not support \`-c' and \`-o' together. If you
3530 your compiler does not support '-c' and '-o' together. If you
22153531 repeat this compilation, it may succeed, by chance, but you had better
22163532 avoid parallel builds (make -j) in this platform, or get a better
22173533 compiler."
22273543 fi
22283544
22293545 # Allow error messages only from the first compilation.
2230 if test "$suppress_opt" = yes; then
3546 if test yes = "$suppress_opt"; then
22313547 suppress_output=' >/dev/null 2>&1'
22323548 fi
22333549 fi
22343550
22353551 # Only build a position-dependent object if we build old libraries.
2236 if test "$build_old_libs" = yes; then
2237 if test "$pic_mode" != yes; then
3552 if test yes = "$build_old_libs"; then
3553 if test yes != "$pic_mode"; then
22383554 # Don't build PIC code
22393555 command="$base_compile $qsrcfile$pie_flag"
22403556 else
22413557 command="$base_compile $qsrcfile $pic_flag"
22423558 fi
2243 if test "$compiler_c_o" = yes; then
3559 if test yes = "$compiler_c_o"; then
22443560 func_append command " -o $obj"
22453561 fi
22463562
22493565 func_show_eval_locale "$command" \
22503566 '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
22513567
2252 if test "$need_locks" = warn &&
3568 if test warn = "$need_locks" &&
22533569 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
22543570 $ECHO "\
22553571 *** ERROR, $lockfile contains:
22603576
22613577 This indicates that another process is trying to use the same
22623578 temporary object file, and libtool could not work around it because
2263 your compiler does not support \`-c' and \`-o' together. If you
3579 your compiler does not support '-c' and '-o' together. If you
22643580 repeat this compilation, it may succeed, by chance, but you had better
22653581 avoid parallel builds (make -j) in this platform, or get a better
22663582 compiler."
22803596 func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
22813597
22823598 # Unlock the critical section if it was locked
2283 if test "$need_locks" != no; then
3599 if test no != "$need_locks"; then
22843600 removelist=$lockfile
22853601 $RM "$lockfile"
22863602 fi
22903606 }
22913607
22923608 $opt_help || {
2293 test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
3609 test compile = "$opt_mode" && func_mode_compile ${1+"$@"}
22943610 }
22953611
22963612 func_mode_help ()
23103626 Remove files from the build directory.
23113627
23123628 RM is the name of the program to use to delete files associated with each FILE
2313 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
3629 (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
23143630 to RM.
23153631
23163632 If FILE is a libtool library, object or program, all the files associated
23293645 -no-suppress do not suppress compiler output for multiple passes
23303646 -prefer-pic try to build PIC objects only
23313647 -prefer-non-pic try to build non-PIC objects only
2332 -shared do not build a \`.o' file suitable for static linking
2333 -static only build a \`.o' file suitable for static linking
3648 -shared do not build a '.o' file suitable for static linking
3649 -static only build a '.o' file suitable for static linking
23343650 -Wc,FLAG pass FLAG directly to the compiler
23353651
2336 COMPILE-COMMAND is a command to be used in creating a \`standard' object file
3652 COMPILE-COMMAND is a command to be used in creating a 'standard' object file
23373653 from the given SOURCEFILE.
23383654
23393655 The output file name is determined by removing the directory component from
2340 SOURCEFILE, then substituting the C source code suffix \`.c' with the
2341 library object suffix, \`.lo'."
3656 SOURCEFILE, then substituting the C source code suffix '.c' with the
3657 library object suffix, '.lo'."
23423658 ;;
23433659
23443660 execute)
23513667
23523668 -dlopen FILE add the directory containing FILE to the library path
23533669
2354 This mode sets the library path environment variable according to \`-dlopen'
3670 This mode sets the library path environment variable according to '-dlopen'
23553671 flags.
23563672
23573673 If any of the ARGS are libtool executable wrappers, then they are translated
23703686 Each LIBDIR is a directory that contains libtool libraries.
23713687
23723688 The commands that this mode executes may require superuser privileges. Use
2373 the \`--dry-run' option if you just want to see what would be executed."
3689 the '--dry-run' option if you just want to see what would be executed."
23743690 ;;
23753691
23763692 install)
23803696 Install executables or libraries.
23813697
23823698 INSTALL-COMMAND is the installation command. The first component should be
2383 either the \`install' or \`cp' program.
3699 either the 'install' or 'cp' program.
23843700
23853701 The following components of INSTALL-COMMAND are treated specially:
23863702
24063722 -avoid-version do not add a version suffix if possible
24073723 -bindir BINDIR specify path to binaries directory (for systems where
24083724 libraries must be found in the PATH setting at runtime)
2409 -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
3725 -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime
24103726 -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
24113727 -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
24123728 -export-symbols SYMFILE
24203736 -no-install link a not-installable executable
24213737 -no-undefined declare that a library does not refer to external symbols
24223738 -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
2423 -objectlist FILE Use a list of object files found in FILE to specify objects
3739 -objectlist FILE use a list of object files found in FILE to specify objects
3740 -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes)
24243741 -precious-files-regex REGEX
24253742 don't remove output files matching REGEX
24263743 -release RELEASE specify package release information
24403757 -Xlinker FLAG pass linker-specific FLAG directly to the linker
24413758 -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC)
24423759
2443 All other options (arguments beginning with \`-') are ignored.
2444
2445 Every other argument is treated as a filename. Files ending in \`.la' are
3760 All other options (arguments beginning with '-') are ignored.
3761
3762 Every other argument is treated as a filename. Files ending in '.la' are
24463763 treated as uninstalled libtool libraries, other files are standard or library
24473764 object files.
24483765
2449 If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
2450 only library objects (\`.lo' files) may be specified, and \`-rpath' is
3766 If the OUTPUT-FILE ends in '.la', then a libtool library is created,
3767 only library objects ('.lo' files) may be specified, and '-rpath' is
24513768 required, except when creating a convenience library.
24523769
2453 If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
2454 using \`ar' and \`ranlib', or on Windows using \`lib'.
2455
2456 If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
3770 If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created
3771 using 'ar' and 'ranlib', or on Windows using 'lib'.
3772
3773 If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file
24573774 is created, otherwise an executable program is created."
24583775 ;;
24593776
24643781 Remove libraries from an installation directory.
24653782
24663783 RM is the name of the program to use to delete files associated with each FILE
2467 (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
3784 (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed
24683785 to RM.
24693786
24703787 If FILE is a libtool library, all the files associated with it are deleted.
24723789 ;;
24733790
24743791 *)
2475 func_fatal_help "invalid operation mode \`$opt_mode'"
3792 func_fatal_help "invalid operation mode '$opt_mode'"
24763793 ;;
24773794 esac
24783795
24793796 echo
2480 $ECHO "Try \`$progname --help' for more information about other modes."
3797 $ECHO "Try '$progname --help' for more information about other modes."
24813798 }
24823799
24833800 # Now that we've collected a possible --mode arg, show help if necessary
24843801 if $opt_help; then
2485 if test "$opt_help" = :; then
3802 if test : = "$opt_help"; then
24863803 func_mode_help
24873804 else
24883805 {
24903807 for opt_mode in compile link execute install finish uninstall clean; do
24913808 func_mode_help
24923809 done
2493 } | sed -n '1p; 2,$s/^Usage:/ or: /p'
3810 } | $SED -n '1p; 2,$s/^Usage:/ or: /p'
24943811 {
24953812 func_help noexit
24963813 for opt_mode in compile link execute install finish uninstall clean; do
24983815 func_mode_help
24993816 done
25003817 } |
2501 sed '1d
3818 $SED '1d
25023819 /^When reporting/,/^Report/{
25033820 H
25043821 d
25153832 # func_mode_execute arg...
25163833 func_mode_execute ()
25173834 {
2518 $opt_debug
3835 $debug_cmd
3836
25193837 # The first argument is the command name.
2520 cmd="$nonopt"
3838 cmd=$nonopt
25213839 test -z "$cmd" && \
25223840 func_fatal_help "you must specify a COMMAND"
25233841
25243842 # Handle -dlopen flags immediately.
25253843 for file in $opt_dlopen; do
25263844 test -f "$file" \
2527 || func_fatal_help "\`$file' is not a file"
3845 || func_fatal_help "'$file' is not a file"
25283846
25293847 dir=
25303848 case $file in
25343852
25353853 # Check to see that this really is a libtool archive.
25363854 func_lalib_unsafe_p "$file" \
2537 || func_fatal_help "\`$lib' is not a valid libtool archive"
3855 || func_fatal_help "'$lib' is not a valid libtool archive"
25383856
25393857 # Read the libtool library.
25403858 dlname=
25453863 if test -z "$dlname"; then
25463864 # Warn if it was a shared library.
25473865 test -n "$library_names" && \
2548 func_warning "\`$file' was not linked with \`-export-dynamic'"
3866 func_warning "'$file' was not linked with '-export-dynamic'"
25493867 continue
25503868 fi
25513869
25523870 func_dirname "$file" "" "."
2553 dir="$func_dirname_result"
3871 dir=$func_dirname_result
25543872
25553873 if test -f "$dir/$objdir/$dlname"; then
25563874 func_append dir "/$objdir"
25573875 else
25583876 if test ! -f "$dir/$dlname"; then
2559 func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
3877 func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'"
25603878 fi
25613879 fi
25623880 ;;
25643882 *.lo)
25653883 # Just add the directory containing the .lo file.
25663884 func_dirname "$file" "" "."
2567 dir="$func_dirname_result"
3885 dir=$func_dirname_result
25683886 ;;
25693887
25703888 *)
2571 func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
3889 func_warning "'-dlopen' is ignored for non-libtool libraries and objects"
25723890 continue
25733891 ;;
25743892 esac
25753893
25763894 # Get the absolute pathname.
25773895 absdir=`cd "$dir" && pwd`
2578 test -n "$absdir" && dir="$absdir"
3896 test -n "$absdir" && dir=$absdir
25793897
25803898 # Now add the directory to shlibpath_var.
25813899 if eval "test -z \"\$$shlibpath_var\""; then
25873905
25883906 # This variable tells wrapper scripts just to set shlibpath_var
25893907 # rather than running their programs.
2590 libtool_execute_magic="$magic"
3908 libtool_execute_magic=$magic
25913909
25923910 # Check if any of the arguments is a wrapper script.
25933911 args=
26003918 if func_ltwrapper_script_p "$file"; then
26013919 func_source "$file"
26023920 # Transform arg to wrapped name.
2603 file="$progdir/$program"
3921 file=$progdir/$program
26043922 elif func_ltwrapper_executable_p "$file"; then
26053923 func_ltwrapper_scriptname "$file"
26063924 func_source "$func_ltwrapper_scriptname_result"
26073925 # Transform arg to wrapped name.
2608 file="$progdir/$program"
3926 file=$progdir/$program
26093927 fi
26103928 ;;
26113929 esac
26133931 func_append_quoted args "$file"
26143932 done
26153933
2616 if test "X$opt_dry_run" = Xfalse; then
3934 if $opt_dry_run; then
3935 # Display what would be done.
3936 if test -n "$shlibpath_var"; then
3937 eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
3938 echo "export $shlibpath_var"
3939 fi
3940 $ECHO "$cmd$args"
3941 exit $EXIT_SUCCESS
3942 else
26173943 if test -n "$shlibpath_var"; then
26183944 # Export the shlibpath_var.
26193945 eval "export $shlibpath_var"
26303956 done
26313957
26323958 # Now prepare to actually exec the command.
2633 exec_cmd="\$cmd$args"
2634 else
2635 # Display what would be done.
2636 if test -n "$shlibpath_var"; then
2637 eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
2638 echo "export $shlibpath_var"
2639 fi
2640 $ECHO "$cmd$args"
2641 exit $EXIT_SUCCESS
3959 exec_cmd=\$cmd$args
26423960 fi
26433961 }
26443962
2645 test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
3963 test execute = "$opt_mode" && func_mode_execute ${1+"$@"}
26463964
26473965
26483966 # func_mode_finish arg...
26493967 func_mode_finish ()
26503968 {
2651 $opt_debug
3969 $debug_cmd
3970
26523971 libs=
26533972 libdirs=
26543973 admincmds=
26623981 if func_lalib_unsafe_p "$opt"; then
26633982 func_append libs " $opt"
26643983 else
2665 func_warning "\`$opt' is not a valid libtool archive"
3984 func_warning "'$opt' is not a valid libtool archive"
26663985 fi
26673986
26683987 else
2669 func_fatal_error "invalid argument \`$opt'"
3988 func_fatal_error "invalid argument '$opt'"
26703989 fi
26713990 done
26723991
26814000 # Remove sysroot references
26824001 if $opt_dry_run; then
26834002 for lib in $libs; do
2684 echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
4003 echo "removing references to $lt_sysroot and '=' prefixes from $lib"
26854004 done
26864005 else
26874006 tmpdir=`func_mktempdir`
26884007 for lib in $libs; do
2689 sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
4008 $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
26904009 > $tmpdir/tmp-la
26914010 mv -f $tmpdir/tmp-la $lib
26924011 done
27114030 fi
27124031
27134032 # Exit here if they wanted silent mode.
2714 $opt_silent && exit $EXIT_SUCCESS
4033 $opt_quiet && exit $EXIT_SUCCESS
27154034
27164035 if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
27174036 echo "----------------------------------------------------------------------"
27224041 echo
27234042 echo "If you ever happen to want to link against installed libraries"
27244043 echo "in a given directory, LIBDIR, you must either use libtool, and"
2725 echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
4044 echo "specify the full pathname of the library, or use the '-LLIBDIR'"
27264045 echo "flag during linking and do at least one of the following:"
27274046 if test -n "$shlibpath_var"; then
2728 echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
4047 echo " - add LIBDIR to the '$shlibpath_var' environment variable"
27294048 echo " during execution"
27304049 fi
27314050 if test -n "$runpath_var"; then
2732 echo " - add LIBDIR to the \`$runpath_var' environment variable"
4051 echo " - add LIBDIR to the '$runpath_var' environment variable"
27334052 echo " during linking"
27344053 fi
27354054 if test -n "$hardcode_libdir_flag_spec"; then
27364055 libdir=LIBDIR
27374056 eval flag=\"$hardcode_libdir_flag_spec\"
27384057
2739 $ECHO " - use the \`$flag' linker flag"
4058 $ECHO " - use the '$flag' linker flag"
27404059 fi
27414060 if test -n "$admincmds"; then
27424061 $ECHO " - have your system administrator run these commands:$admincmds"
27434062 fi
27444063 if test -f /etc/ld.so.conf; then
2745 echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
4064 echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'"
27464065 fi
27474066 echo
27484067
27614080 exit $EXIT_SUCCESS
27624081 }
27634082
2764 test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
4083 test finish = "$opt_mode" && func_mode_finish ${1+"$@"}
27654084
27664085
27674086 # func_mode_install arg...
27684087 func_mode_install ()
27694088 {
2770 $opt_debug
4089 $debug_cmd
4090
27714091 # There may be an optional sh(1) argument at the beginning of
27724092 # install_prog (especially on Windows NT).
2773 if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
4093 if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" ||
27744094 # Allow the use of GNU shtool's install command.
2775 case $nonopt in *shtool*) :;; *) false;; esac; then
4095 case $nonopt in *shtool*) :;; *) false;; esac
4096 then
27764097 # Aesthetically quote it.
27774098 func_quote_for_eval "$nonopt"
27784099 install_prog="$func_quote_for_eval_result "
27994120 opts=
28004121 prev=
28014122 install_type=
2802 isdir=no
4123 isdir=false
28034124 stripme=
28044125 no_mode=:
28054126 for arg
28124133 fi
28134134
28144135 case $arg in
2815 -d) isdir=yes ;;
4136 -d) isdir=: ;;
28164137 -f)
28174138 if $install_cp; then :; else
28184139 prev=$arg
28304151 *)
28314152 # If the previous option needed an argument, then skip it.
28324153 if test -n "$prev"; then
2833 if test "x$prev" = x-m && test -n "$install_override_mode"; then
4154 if test X-m = "X$prev" && test -n "$install_override_mode"; then
28344155 arg2=$install_override_mode
28354156 no_mode=false
28364157 fi
28554176 func_fatal_help "you must specify an install program"
28564177
28574178 test -n "$prev" && \
2858 func_fatal_help "the \`$prev' option requires an argument"
4179 func_fatal_help "the '$prev' option requires an argument"
28594180
28604181 if test -n "$install_override_mode" && $no_mode; then
28614182 if $install_cp; then :; else
28774198 dest=$func_stripname_result
28784199
28794200 # Check to see that the destination is a directory.
2880 test -d "$dest" && isdir=yes
2881 if test "$isdir" = yes; then
2882 destdir="$dest"
4201 test -d "$dest" && isdir=:
4202 if $isdir; then
4203 destdir=$dest
28834204 destname=
28844205 else
28854206 func_dirname_and_basename "$dest" "" "."
2886 destdir="$func_dirname_result"
2887 destname="$func_basename_result"
4207 destdir=$func_dirname_result
4208 destname=$func_basename_result
28884209
28894210 # Not a directory, so check to see that there is only one file specified.
28904211 set dummy $files; shift
28914212 test "$#" -gt 1 && \
2892 func_fatal_help "\`$dest' is not a directory"
4213 func_fatal_help "'$dest' is not a directory"
28934214 fi
28944215 case $destdir in
28954216 [\\/]* | [A-Za-z]:[\\/]*) ;;
28984219 case $file in
28994220 *.lo) ;;
29004221 *)
2901 func_fatal_help "\`$destdir' must be an absolute directory name"
4222 func_fatal_help "'$destdir' must be an absolute directory name"
29024223 ;;
29034224 esac
29044225 done
29074228
29084229 # This variable tells wrapper scripts just to set variables rather
29094230 # than running their programs.
2910 libtool_install_magic="$magic"
4231 libtool_install_magic=$magic
29114232
29124233 staticlibs=
29134234 future_libdirs=
29274248
29284249 # Check to see that this really is a libtool archive.
29294250 func_lalib_unsafe_p "$file" \
2930 || func_fatal_help "\`$file' is not a valid libtool archive"
4251 || func_fatal_help "'$file' is not a valid libtool archive"
29314252
29324253 library_names=
29334254 old_library=
29494270 fi
29504271
29514272 func_dirname "$file" "/" ""
2952 dir="$func_dirname_result"
4273 dir=$func_dirname_result
29534274 func_append dir "$objdir"
29544275
29554276 if test -n "$relink_command"; then
29634284 # are installed into $libdir/../bin (currently, that works fine)
29644285 # but it's something to keep an eye on.
29654286 test "$inst_prefix_dir" = "$destdir" && \
2966 func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
4287 func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir"
29674288
29684289 if test -n "$inst_prefix_dir"; then
29694290 # Stick the inst_prefix_dir data into the link command.
29724293 relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
29734294 fi
29744295
2975 func_warning "relinking \`$file'"
4296 func_warning "relinking '$file'"
29764297 func_show_eval "$relink_command" \
2977 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
4298 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"'
29784299 fi
29794300
29804301 # See the names of the shared library.
29814302 set dummy $library_names; shift
29824303 if test -n "$1"; then
2983 realname="$1"
4304 realname=$1
29844305 shift
29854306
2986 srcname="$realname"
2987 test -n "$relink_command" && srcname="$realname"T
4307 srcname=$realname
4308 test -n "$relink_command" && srcname=${realname}T
29884309
29894310 # Install the shared library and build the symlinks.
29904311 func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
29914312 'exit $?'
2992 tstripme="$stripme"
4313 tstripme=$stripme
29934314 case $host_os in
29944315 cygwin* | mingw* | pw32* | cegcc*)
29954316 case $realname in
29964317 *.dll.a)
2997 tstripme=""
4318 tstripme=
4319 ;;
4320 esac
4321 ;;
4322 os2*)
4323 case $realname in
4324 *_dll.a)
4325 tstripme=
29984326 ;;
29994327 esac
30004328 ;;
30054333
30064334 if test "$#" -gt 0; then
30074335 # Delete the old symlinks, and create new ones.
3008 # Try `ln -sf' first, because the `ln' binary might depend on
4336 # Try 'ln -sf' first, because the 'ln' binary might depend on
30094337 # the symlink we replace! Solaris /bin/ln does not understand -f,
30104338 # so we also need to try rm && ln -s.
30114339 for linkname
30164344 fi
30174345
30184346 # Do each command in the postinstall commands.
3019 lib="$destdir/$realname"
4347 lib=$destdir/$realname
30204348 func_execute_cmds "$postinstall_cmds" 'exit $?'
30214349 fi
30224350
30234351 # Install the pseudo-library for information purposes.
30244352 func_basename "$file"
3025 name="$func_basename_result"
3026 instname="$dir/$name"i
4353 name=$func_basename_result
4354 instname=$dir/${name}i
30274355 func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
30284356
30294357 # Maybe install the static library, too.
30354363
30364364 # Figure out destination file name, if it wasn't already specified.
30374365 if test -n "$destname"; then
3038 destfile="$destdir/$destname"
4366 destfile=$destdir/$destname
30394367 else
30404368 func_basename "$file"
3041 destfile="$func_basename_result"
3042 destfile="$destdir/$destfile"
4369 destfile=$func_basename_result
4370 destfile=$destdir/$destfile
30434371 fi
30444372
30454373 # Deduce the name of the destination old-style object file.
30494377 staticdest=$func_lo2o_result
30504378 ;;
30514379 *.$objext)
3052 staticdest="$destfile"
4380 staticdest=$destfile
30534381 destfile=
30544382 ;;
30554383 *)
3056 func_fatal_help "cannot copy a libtool object to \`$destfile'"
4384 func_fatal_help "cannot copy a libtool object to '$destfile'"
30574385 ;;
30584386 esac
30594387
30624390 func_show_eval "$install_prog $file $destfile" 'exit $?'
30634391
30644392 # Install the old object if enabled.
3065 if test "$build_old_libs" = yes; then
4393 if test yes = "$build_old_libs"; then
30664394 # Deduce the name of the old-style object file.
30674395 func_lo2o "$file"
30684396 staticobj=$func_lo2o_result
30744402 *)
30754403 # Figure out destination file name, if it wasn't already specified.
30764404 if test -n "$destname"; then
3077 destfile="$destdir/$destname"
4405 destfile=$destdir/$destname
30784406 else
30794407 func_basename "$file"
3080 destfile="$func_basename_result"
3081 destfile="$destdir/$destfile"
4408 destfile=$func_basename_result
4409 destfile=$destdir/$destfile
30824410 fi
30834411
30844412 # If the file is missing, and there is a .exe on the end, strip it
30854413 # because it is most likely a libtool script we actually want to
30864414 # install
3087 stripped_ext=""
4415 stripped_ext=
30884416 case $file in
30894417 *.exe)
30904418 if test ! -f "$file"; then
30914419 func_stripname '' '.exe' "$file"
30924420 file=$func_stripname_result
3093 stripped_ext=".exe"
4421 stripped_ext=.exe
30944422 fi
30954423 ;;
30964424 esac
31184446
31194447 # Check the variables that should have been set.
31204448 test -z "$generated_by_libtool_version" && \
3121 func_fatal_error "invalid libtool wrapper script \`$wrapper'"
3122
3123 finalize=yes
4449 func_fatal_error "invalid libtool wrapper script '$wrapper'"
4450
4451 finalize=:
31244452 for lib in $notinst_deplibs; do
31254453 # Check to see that each library is installed.
31264454 libdir=
31274455 if test -f "$lib"; then
31284456 func_source "$lib"
31294457 fi
3130 libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
4458 libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'`
31314459 if test -n "$libdir" && test ! -f "$libfile"; then
3132 func_warning "\`$lib' has not been installed in \`$libdir'"
3133 finalize=no
4460 func_warning "'$lib' has not been installed in '$libdir'"
4461 finalize=false
31344462 fi
31354463 done
31364464
31384466 func_source "$wrapper"
31394467
31404468 outputname=
3141 if test "$fast_install" = no && test -n "$relink_command"; then
4469 if test no = "$fast_install" && test -n "$relink_command"; then
31424470 $opt_dry_run || {
3143 if test "$finalize" = yes; then
4471 if $finalize; then
31444472 tmpdir=`func_mktempdir`
31454473 func_basename "$file$stripped_ext"
3146 file="$func_basename_result"
3147 outputname="$tmpdir/$file"
4474 file=$func_basename_result
4475 outputname=$tmpdir/$file
31484476 # Replace the output file specification.
31494477 relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
31504478
3151 $opt_silent || {
4479 $opt_quiet || {
31524480 func_quote_for_expand "$relink_command"
31534481 eval "func_echo $func_quote_for_expand_result"
31544482 }
31554483 if eval "$relink_command"; then :
31564484 else
3157 func_error "error: relink \`$file' with the above command before installing it"
4485 func_error "error: relink '$file' with the above command before installing it"
31584486 $opt_dry_run || ${RM}r "$tmpdir"
31594487 continue
31604488 fi
3161 file="$outputname"
4489 file=$outputname
31624490 else
3163 func_warning "cannot relink \`$file'"
4491 func_warning "cannot relink '$file'"
31644492 fi
31654493 }
31664494 else
31974525
31984526 for file in $staticlibs; do
31994527 func_basename "$file"
3200 name="$func_basename_result"
4528 name=$func_basename_result
32014529
32024530 # Set up the ranlib parameters.
3203 oldlib="$destdir/$name"
4531 oldlib=$destdir/$name
32044532 func_to_tool_file "$oldlib" func_convert_file_msys_to_w32
32054533 tool_oldlib=$func_to_tool_file_result
32064534
32154543 done
32164544
32174545 test -n "$future_libdirs" && \
3218 func_warning "remember to run \`$progname --finish$future_libdirs'"
4546 func_warning "remember to run '$progname --finish$future_libdirs'"
32194547
32204548 if test -n "$current_libdirs"; then
32214549 # Maybe just do a dry run.
32224550 $opt_dry_run && current_libdirs=" -n$current_libdirs"
3223 exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
4551 exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs'
32244552 else
32254553 exit $EXIT_SUCCESS
32264554 fi
32274555 }
32284556
3229 test "$opt_mode" = install && func_mode_install ${1+"$@"}
4557 test install = "$opt_mode" && func_mode_install ${1+"$@"}
32304558
32314559
32324560 # func_generate_dlsyms outputname originator pic_p
32344562 # a dlpreopen symbol table.
32354563 func_generate_dlsyms ()
32364564 {
3237 $opt_debug
3238 my_outputname="$1"
3239 my_originator="$2"
3240 my_pic_p="${3-no}"
3241 my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
4565 $debug_cmd
4566
4567 my_outputname=$1
4568 my_originator=$2
4569 my_pic_p=${3-false}
4570 my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'`
32424571 my_dlsyms=
32434572
3244 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4573 if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
32454574 if test -n "$NM" && test -n "$global_symbol_pipe"; then
3246 my_dlsyms="${my_outputname}S.c"
4575 my_dlsyms=${my_outputname}S.c
32474576 else
32484577 func_error "not configured to extract global symbols from dlpreopened files"
32494578 fi
32544583 "") ;;
32554584 *.c)
32564585 # Discover the nlist of each of the dlfiles.
3257 nlist="$output_objdir/${my_outputname}.nm"
4586 nlist=$output_objdir/$my_outputname.nm
32584587
32594588 func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
32604589
32624591 func_verbose "creating $output_objdir/$my_dlsyms"
32634592
32644593 $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
3265 /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
3266 /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
4594 /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */
4595 /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */
32674596
32684597 #ifdef __cplusplus
32694598 extern \"C\" {
32704599 #endif
32714600
3272 #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
4601 #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
32734602 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
32744603 #endif
32754604
32764605 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3277 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3278 /* DATA imports from DLLs on WIN32 con't be const, because runtime
4606 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4607 /* DATA imports from DLLs on WIN32 can't be const, because runtime
32794608 relocations are performed -- see ld's documentation on pseudo-relocs. */
32804609 # define LT_DLSYM_CONST
3281 #elif defined(__osf__)
4610 #elif defined __osf__
32824611 /* This system does not cope well with relocations in const data. */
32834612 # define LT_DLSYM_CONST
32844613 #else
32854614 # define LT_DLSYM_CONST const
32864615 #endif
32874616
4617 #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
4618
32884619 /* External symbol declarations for the compiler. */\
32894620 "
32904621
3291 if test "$dlself" = yes; then
3292 func_verbose "generating symbol list for \`$output'"
4622 if test yes = "$dlself"; then
4623 func_verbose "generating symbol list for '$output'"
32934624
32944625 $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
32954626
32974628 progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
32984629 for progfile in $progfiles; do
32994630 func_to_tool_file "$progfile" func_convert_file_msys_to_w32
3300 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
4631 func_verbose "extracting global C symbols from '$func_to_tool_file_result'"
33014632 $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
33024633 done
33034634
33174648
33184649 # Prepare the list of exported symbols
33194650 if test -z "$export_symbols"; then
3320 export_symbols="$output_objdir/$outputname.exp"
4651 export_symbols=$output_objdir/$outputname.exp
33214652 $opt_dry_run || {
33224653 $RM $export_symbols
3323 eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4654 eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
33244655 case $host in
33254656 *cygwin* | *mingw* | *cegcc* )
33264657 eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
33304661 }
33314662 else
33324663 $opt_dry_run || {
3333 eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4664 eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
33344665 eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
33354666 eval '$MV "$nlist"T "$nlist"'
33364667 case $host in
33444675 fi
33454676
33464677 for dlprefile in $dlprefiles; do
3347 func_verbose "extracting global C symbols from \`$dlprefile'"
4678 func_verbose "extracting global C symbols from '$dlprefile'"
33484679 func_basename "$dlprefile"
3349 name="$func_basename_result"
4680 name=$func_basename_result
33504681 case $host in
33514682 *cygwin* | *mingw* | *cegcc* )
33524683 # if an import library, we need to obtain dlname
33534684 if func_win32_import_lib_p "$dlprefile"; then
33544685 func_tr_sh "$dlprefile"
33554686 eval "curr_lafile=\$libfile_$func_tr_sh_result"
3356 dlprefile_dlbasename=""
4687 dlprefile_dlbasename=
33574688 if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
33584689 # Use subshell, to avoid clobbering current variable values
33594690 dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
3360 if test -n "$dlprefile_dlname" ; then
4691 if test -n "$dlprefile_dlname"; then
33614692 func_basename "$dlprefile_dlname"
3362 dlprefile_dlbasename="$func_basename_result"
4693 dlprefile_dlbasename=$func_basename_result
33634694 else
33644695 # no lafile. user explicitly requested -dlpreopen <import library>.
33654696 $sharedlib_from_linklib_cmd "$dlprefile"
33674698 fi
33684699 fi
33694700 $opt_dry_run || {
3370 if test -n "$dlprefile_dlbasename" ; then
4701 if test -n "$dlprefile_dlbasename"; then
33714702 eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
33724703 else
33734704 func_warning "Could not compute DLL name from $name"
34234754 echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
34244755 fi
34254756
4757 func_show_eval '$RM "${nlist}I"'
4758 if test -n "$global_symbol_to_import"; then
4759 eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I'
4760 fi
4761
34264762 echo >> "$output_objdir/$my_dlsyms" "\
34274763
34284764 /* The mapping between symbol names and symbols. */
34314767 void *address;
34324768 } lt_dlsymlist;
34334769 extern LT_DLSYM_CONST lt_dlsymlist
3434 lt_${my_prefix}_LTX_preloaded_symbols[];
4770 lt_${my_prefix}_LTX_preloaded_symbols[];\
4771 "
4772
4773 if test -s "$nlist"I; then
4774 echo >> "$output_objdir/$my_dlsyms" "\
4775 static void lt_syminit(void)
4776 {
4777 LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols;
4778 for (; symbol->name; ++symbol)
4779 {"
4780 $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms"
4781 echo >> "$output_objdir/$my_dlsyms" "\
4782 }
4783 }"
4784 fi
4785 echo >> "$output_objdir/$my_dlsyms" "\
34354786 LT_DLSYM_CONST lt_dlsymlist
34364787 lt_${my_prefix}_LTX_preloaded_symbols[] =
3437 {\
3438 { \"$my_originator\", (void *) 0 },"
4788 { {\"$my_originator\", (void *) 0},"
4789
4790 if test -s "$nlist"I; then
4791 echo >> "$output_objdir/$my_dlsyms" "\
4792 {\"@INIT@\", (void *) &lt_syminit},"
4793 fi
34394794
34404795 case $need_lib_prefix in
34414796 no)
34774832 *-*-hpux*)
34784833 pic_flag_for_symtable=" $pic_flag" ;;
34794834 *)
3480 if test "X$my_pic_p" != Xno; then
3481 pic_flag_for_symtable=" $pic_flag"
3482 fi
4835 $my_pic_p && pic_flag_for_symtable=" $pic_flag"
34834836 ;;
34844837 esac
34854838 ;;
34964849 func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
34974850
34984851 # Clean up the generated files.
3499 func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
4852 func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"'
35004853
35014854 # Transform the symbol file into the correct name.
3502 symfileobj="$output_objdir/${my_outputname}S.$objext"
4855 symfileobj=$output_objdir/${my_outputname}S.$objext
35034856 case $host in
35044857 *cygwin* | *mingw* | *cegcc* )
35054858 if test -f "$output_objdir/$my_outputname.def"; then
35174870 esac
35184871 ;;
35194872 *)
3520 func_fatal_error "unknown suffix for \`$my_dlsyms'"
4873 func_fatal_error "unknown suffix for '$my_dlsyms'"
35214874 ;;
35224875 esac
35234876 else
35294882 compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
35304883 finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
35314884 fi
4885 }
4886
4887 # func_cygming_gnu_implib_p ARG
4888 # This predicate returns with zero status (TRUE) if
4889 # ARG is a GNU/binutils-style import library. Returns
4890 # with nonzero status (FALSE) otherwise.
4891 func_cygming_gnu_implib_p ()
4892 {
4893 $debug_cmd
4894
4895 func_to_tool_file "$1" func_convert_file_msys_to_w32
4896 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
4897 test -n "$func_cygming_gnu_implib_tmp"
4898 }
4899
4900 # func_cygming_ms_implib_p ARG
4901 # This predicate returns with zero status (TRUE) if
4902 # ARG is an MS-style import library. Returns
4903 # with nonzero status (FALSE) otherwise.
4904 func_cygming_ms_implib_p ()
4905 {
4906 $debug_cmd
4907
4908 func_to_tool_file "$1" func_convert_file_msys_to_w32
4909 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
4910 test -n "$func_cygming_ms_implib_tmp"
35324911 }
35334912
35344913 # func_win32_libid arg
35404919 # Despite the name, also deal with 64 bit binaries.
35414920 func_win32_libid ()
35424921 {
3543 $opt_debug
3544 win32_libid_type="unknown"
4922 $debug_cmd
4923
4924 win32_libid_type=unknown
35454925 win32_fileres=`file -L $1 2>/dev/null`
35464926 case $win32_fileres in
35474927 *ar\ archive\ import\ library*) # definitely import
35514931 # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
35524932 if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
35534933 $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
3554 func_to_tool_file "$1" func_convert_file_msys_to_w32
3555 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
3556 $SED -n -e '
4934 case $nm_interface in
4935 "MS dumpbin")
4936 if func_cygming_ms_implib_p "$1" ||
4937 func_cygming_gnu_implib_p "$1"
4938 then
4939 win32_nmres=import
4940 else
4941 win32_nmres=
4942 fi
4943 ;;
4944 *)
4945 func_to_tool_file "$1" func_convert_file_msys_to_w32
4946 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
4947 $SED -n -e '
35574948 1,100{
35584949 / I /{
3559 s,.*,import,
4950 s|.*|import|
35604951 p
35614952 q
35624953 }
35634954 }'`
4955 ;;
4956 esac
35644957 case $win32_nmres in
35654958 import*) win32_libid_type="x86 archive import";;
35664959 *) win32_libid_type="x86 archive static";;
35924985 # $sharedlib_from_linklib_result
35934986 func_cygming_dll_for_implib ()
35944987 {
3595 $opt_debug
4988 $debug_cmd
4989
35964990 sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
35974991 }
35984992
36095003 # specified import library.
36105004 func_cygming_dll_for_implib_fallback_core ()
36115005 {
3612 $opt_debug
5006 $debug_cmd
5007
36135008 match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
36145009 $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
36155010 $SED '/^Contents of section '"$match_literal"':/{
36455040 /./p' |
36465041 # we now have a list, one entry per line, of the stringified
36475042 # contents of the appropriate section of all members of the
3648 # archive which possess that section. Heuristic: eliminate
3649 # all those which have a first or second character that is
5043 # archive that possess that section. Heuristic: eliminate
5044 # all those that have a first or second character that is
36505045 # a '.' (that is, objdump's representation of an unprintable
36515046 # character.) This should work for all archives with less than
36525047 # 0x302f exports -- but will fail for DLLs whose name actually
36555050 #
36565051 # Of those that remain, print the first one.
36575052 $SED -e '/^\./d;/^.\./d;q'
3658 }
3659
3660 # func_cygming_gnu_implib_p ARG
3661 # This predicate returns with zero status (TRUE) if
3662 # ARG is a GNU/binutils-style import library. Returns
3663 # with nonzero status (FALSE) otherwise.
3664 func_cygming_gnu_implib_p ()
3665 {
3666 $opt_debug
3667 func_to_tool_file "$1" func_convert_file_msys_to_w32
3668 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
3669 test -n "$func_cygming_gnu_implib_tmp"
3670 }
3671
3672 # func_cygming_ms_implib_p ARG
3673 # This predicate returns with zero status (TRUE) if
3674 # ARG is an MS-style import library. Returns
3675 # with nonzero status (FALSE) otherwise.
3676 func_cygming_ms_implib_p ()
3677 {
3678 $opt_debug
3679 func_to_tool_file "$1" func_convert_file_msys_to_w32
3680 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
3681 test -n "$func_cygming_ms_implib_tmp"
36825053 }
36835054
36845055 # func_cygming_dll_for_implib_fallback ARG
36945065 # $sharedlib_from_linklib_result
36955066 func_cygming_dll_for_implib_fallback ()
36965067 {
3697 $opt_debug
3698 if func_cygming_gnu_implib_p "$1" ; then
5068 $debug_cmd
5069
5070 if func_cygming_gnu_implib_p "$1"; then
36995071 # binutils import library
37005072 sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
3701 elif func_cygming_ms_implib_p "$1" ; then
5073 elif func_cygming_ms_implib_p "$1"; then
37025074 # ms-generated import library
37035075 sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
37045076 else
37055077 # unknown
3706 sharedlib_from_linklib_result=""
5078 sharedlib_from_linklib_result=
37075079 fi
37085080 }
37095081
37115083 # func_extract_an_archive dir oldlib
37125084 func_extract_an_archive ()
37135085 {
3714 $opt_debug
3715 f_ex_an_ar_dir="$1"; shift
3716 f_ex_an_ar_oldlib="$1"
3717 if test "$lock_old_archive_extraction" = yes; then
5086 $debug_cmd
5087
5088 f_ex_an_ar_dir=$1; shift
5089 f_ex_an_ar_oldlib=$1
5090 if test yes = "$lock_old_archive_extraction"; then
37185091 lockfile=$f_ex_an_ar_oldlib.lock
37195092 until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
37205093 func_echo "Waiting for $lockfile to be removed"
37235096 fi
37245097 func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
37255098 'stat=$?; rm -f "$lockfile"; exit $stat'
3726 if test "$lock_old_archive_extraction" = yes; then
5099 if test yes = "$lock_old_archive_extraction"; then
37275100 $opt_dry_run || rm -f "$lockfile"
37285101 fi
37295102 if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
37375110 # func_extract_archives gentop oldlib ...
37385111 func_extract_archives ()
37395112 {
3740 $opt_debug
3741 my_gentop="$1"; shift
5113 $debug_cmd
5114
5115 my_gentop=$1; shift
37425116 my_oldlibs=${1+"$@"}
3743 my_oldobjs=""
3744 my_xlib=""
3745 my_xabs=""
3746 my_xdir=""
5117 my_oldobjs=
5118 my_xlib=
5119 my_xabs=
5120 my_xdir=
37475121
37485122 for my_xlib in $my_oldlibs; do
37495123 # Extract the objects.
37505124 case $my_xlib in
3751 [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
5125 [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;;
37525126 *) my_xabs=`pwd`"/$my_xlib" ;;
37535127 esac
37545128 func_basename "$my_xlib"
3755 my_xlib="$func_basename_result"
5129 my_xlib=$func_basename_result
37565130 my_xlib_u=$my_xlib
37575131 while :; do
37585132 case " $extracted_archives " in
37645138 esac
37655139 done
37665140 extracted_archives="$extracted_archives $my_xlib_u"
3767 my_xdir="$my_gentop/$my_xlib_u"
5141 my_xdir=$my_gentop/$my_xlib_u
37685142
37695143 func_mkdir_p "$my_xdir"
37705144
37775151 cd $my_xdir || exit $?
37785152 darwin_archive=$my_xabs
37795153 darwin_curdir=`pwd`
3780 darwin_base_archive=`basename "$darwin_archive"`
5154 func_basename "$darwin_archive"
5155 darwin_base_archive=$func_basename_result
37815156 darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
37825157 if test -n "$darwin_arches"; then
37835158 darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
37845159 darwin_arch=
37855160 func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
3786 for darwin_arch in $darwin_arches ; do
3787 func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
3788 $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
3789 cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
3790 func_extract_an_archive "`pwd`" "${darwin_base_archive}"
5161 for darwin_arch in $darwin_arches; do
5162 func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch"
5163 $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive"
5164 cd "unfat-$$/$darwin_base_archive-$darwin_arch"
5165 func_extract_an_archive "`pwd`" "$darwin_base_archive"
37915166 cd "$darwin_curdir"
3792 $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
5167 $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive"
37935168 done # $darwin_arches
37945169 ## Okay now we've a bunch of thin objects, gotta fatten them up :)
3795 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
5170 darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u`
37965171 darwin_file=
37975172 darwin_files=
37985173 for darwin_file in $darwin_filelist; do
38145189 my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
38155190 done
38165191
3817 func_extract_archives_result="$my_oldobjs"
5192 func_extract_archives_result=$my_oldobjs
38185193 }
38195194
38205195
38295204 #
38305205 # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
38315206 # variable will take. If 'yes', then the emitted script
3832 # will assume that the directory in which it is stored is
5207 # will assume that the directory where it is stored is
38335208 # the $objdir directory. This is a cygwin/mingw-specific
38345209 # behavior.
38355210 func_emit_wrapper ()
38405215 #! $SHELL
38415216
38425217 # $output - temporary wrapper script for $objdir/$outputname
3843 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
5218 # Generated by $PROGRAM (GNU $PACKAGE) $VERSION
38445219 #
38455220 # The $output program cannot be directly executed until all the libtool
38465221 # libraries that it depends on are installed.
38975272
38985273 # Very basic option parsing. These options are (a) specific to
38995274 # the libtool wrapper, (b) are identical between the wrapper
3900 # /script/ and the wrapper /executable/ which is used only on
5275 # /script/ and the wrapper /executable/ that is used only on
39015276 # windows platforms, and (c) all begin with the string "--lt-"
3902 # (application programs are unlikely to have options which match
5277 # (application programs are unlikely to have options that match
39035278 # this pattern).
39045279 #
39055280 # There are only two supported options: --lt-debug and
39325307
39335308 # Print the debug banner immediately:
39345309 if test -n \"\$lt_option_debug\"; then
3935 echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
5310 echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2
39365311 fi
39375312 }
39385313
39435318 lt_dump_args_N=1;
39445319 for lt_arg
39455320 do
3946 \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
5321 \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\"
39475322 lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
39485323 done
39495324 }
39575332 *-*-mingw | *-*-os2* | *-cegcc*)
39585333 $ECHO "\
39595334 if test -n \"\$lt_option_debug\"; then
3960 \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
5335 \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2
39615336 func_lt_dump_args \${1+\"\$@\"} 1>&2
39625337 fi
39635338 exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
39675342 *)
39685343 $ECHO "\
39695344 if test -n \"\$lt_option_debug\"; then
3970 \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
5345 \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2
39715346 func_lt_dump_args \${1+\"\$@\"} 1>&2
39725347 fi
39735348 exec \"\$progdir/\$program\" \${1+\"\$@\"}
40425417 test -n \"\$absdir\" && thisdir=\"\$absdir\"
40435418 "
40445419
4045 if test "$fast_install" = yes; then
5420 if test yes = "$fast_install"; then
40465421 $ECHO "\
40475422 program=lt-'$outputname'$exeext
40485423 progdir=\"\$thisdir/$objdir\"
40495424
40505425 if test ! -f \"\$progdir/\$program\" ||
4051 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
5426 { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\
40525427 test \"X\$file\" != \"X\$progdir/\$program\"; }; then
40535428
40545429 file=\"\$\$-\$program\"
40655440 if test -n \"\$relink_command\"; then
40665441 if relink_command_output=\`eval \$relink_command 2>&1\`; then :
40675442 else
4068 $ECHO \"\$relink_command_output\" >&2
5443 \$ECHO \"\$relink_command_output\" >&2
40695444 $RM \"\$progdir/\$file\"
40705445 exit 1
40715446 fi
41005475 fi
41015476
41025477 # Export our shlibpath_var if we have one.
4103 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5478 if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
41045479 $ECHO "\
41055480 # Add our own library path to $shlibpath_var
41065481 $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
41205495 fi
41215496 else
41225497 # The program doesn't exist.
4123 \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
5498 \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2
41245499 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
41255500 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
41265501 exit 1
41395514 cat <<EOF
41405515
41415516 /* $cwrappersource - temporary wrapper executable for $objdir/$outputname
4142 Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
5517 Generated by $PROGRAM (GNU $PACKAGE) $VERSION
41435518
41445519 The $output program cannot be directly executed until all the libtool
41455520 libraries that it depends on are installed.
41745549 #include <fcntl.h>
41755550 #include <sys/stat.h>
41765551
5552 #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0)
5553
41775554 /* declarations of non-ANSI functions */
4178 #if defined(__MINGW32__)
5555 #if defined __MINGW32__
41795556 # ifdef __STRICT_ANSI__
41805557 int _putenv (const char *);
41815558 # endif
4182 #elif defined(__CYGWIN__)
5559 #elif defined __CYGWIN__
41835560 # ifdef __STRICT_ANSI__
41845561 char *realpath (const char *, char *);
41855562 int putenv (char *);
41865563 int setenv (const char *, const char *, int);
41875564 # endif
4188 /* #elif defined (other platforms) ... */
5565 /* #elif defined other_platform || defined ... */
41895566 #endif
41905567
41915568 /* portability defines, excluding path handling macros */
4192 #if defined(_MSC_VER)
5569 #if defined _MSC_VER
41935570 # define setmode _setmode
41945571 # define stat _stat
41955572 # define chmod _chmod
41965573 # define getcwd _getcwd
41975574 # define putenv _putenv
41985575 # define S_IXUSR _S_IEXEC
4199 # ifndef _INTPTR_T_DEFINED
4200 # define _INTPTR_T_DEFINED
4201 # define intptr_t int
4202 # endif
4203 #elif defined(__MINGW32__)
5576 #elif defined __MINGW32__
42045577 # define setmode _setmode
42055578 # define stat _stat
42065579 # define chmod _chmod
42075580 # define getcwd _getcwd
42085581 # define putenv _putenv
4209 #elif defined(__CYGWIN__)
5582 #elif defined __CYGWIN__
42105583 # define HAVE_SETENV
42115584 # define FOPEN_WB "wb"
4212 /* #elif defined (other platforms) ... */
5585 /* #elif defined other platforms ... */
42135586 #endif
42145587
4215 #if defined(PATH_MAX)
5588 #if defined PATH_MAX
42165589 # define LT_PATHMAX PATH_MAX
4217 #elif defined(MAXPATHLEN)
5590 #elif defined MAXPATHLEN
42185591 # define LT_PATHMAX MAXPATHLEN
42195592 #else
42205593 # define LT_PATHMAX 1024
42335606 # define PATH_SEPARATOR ':'
42345607 #endif
42355608
4236 #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
4237 defined (__OS2__)
5609 #if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \
5610 defined __OS2__
42385611 # define HAVE_DOS_BASED_FILE_SYSTEM
42395612 # define FOPEN_WB "wb"
42405613 # ifndef DIR_SEPARATOR_2
42675640
42685641 #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
42695642 #define XFREE(stale) do { \
4270 if (stale) { free ((void *) stale); stale = 0; } \
5643 if (stale) { free (stale); stale = 0; } \
42715644 } while (0)
42725645
4273 #if defined(LT_DEBUGWRAPPER)
5646 #if defined LT_DEBUGWRAPPER
42745647 static int lt_debug = 1;
42755648 #else
42765649 static int lt_debug = 0;
42995672 EOF
43005673
43015674 cat <<EOF
4302 volatile const char * MAGIC_EXE = "$magic_exe";
5675 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
5676 # define externally_visible volatile
5677 #else
5678 # define externally_visible __attribute__((externally_visible)) volatile
5679 #endif
5680 externally_visible const char * MAGIC_EXE = "$magic_exe";
43035681 const char * LIB_PATH_VARNAME = "$shlibpath_var";
43045682 EOF
43055683
4306 if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5684 if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
43075685 func_to_host_path "$temp_rpath"
43085686 cat <<EOF
43095687 const char * LIB_PATH_VALUE = "$func_to_host_path_result";
43275705 EOF
43285706 fi
43295707
4330 if test "$fast_install" = yes; then
5708 if test yes = "$fast_install"; then
43315709 cat <<EOF
43325710 const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
43335711 EOF
43565734 char *actual_cwrapper_name;
43575735 char *target_name;
43585736 char *lt_argv_zero;
4359 intptr_t rval = 127;
5737 int rval = 127;
43605738
43615739 int i;
43625740
43635741 program_name = (char *) xstrdup (base_name (argv[0]));
4364 newargz = XMALLOC (char *, argc + 1);
5742 newargz = XMALLOC (char *, (size_t) argc + 1);
43655743
43665744 /* very simple arg parsing; don't want to rely on getopt
43675745 * also, copy all non cwrapper options to newargz, except
43705748 newargc=0;
43715749 for (i = 1; i < argc; i++)
43725750 {
4373 if (strcmp (argv[i], dumpscript_opt) == 0)
5751 if (STREQ (argv[i], dumpscript_opt))
43745752 {
43755753 EOF
4376 case "$host" in
5754 case $host in
43775755 *mingw* | *cygwin* )
43785756 # make stdout use "unix" line endings
43795757 echo " setmode(1,_O_BINARY);"
43845762 lt_dump_script (stdout);
43855763 return 0;
43865764 }
4387 if (strcmp (argv[i], debug_opt) == 0)
5765 if (STREQ (argv[i], debug_opt))
43885766 {
43895767 lt_debug = 1;
43905768 continue;
43915769 }
4392 if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
5770 if (STREQ (argv[i], ltwrapper_option_prefix))
43935771 {
43945772 /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
43955773 namespace, but it is not one of the ones we know about and
44125790 EOF
44135791 cat <<EOF
44145792 /* The GNU banner must be the first non-error debug message */
4415 lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
5793 lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE) $VERSION\n");
44165794 EOF
44175795 cat <<"EOF"
44185796 lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
45235901 cat <<"EOF"
45245902 /* execv doesn't actually work on mingw as expected on unix */
45255903 newargz = prepare_spawn (newargz);
4526 rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
5904 rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
45275905 if (rval == -1)
45285906 {
45295907 /* failed to start process */
45685946 {
45695947 const char *base;
45705948
4571 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5949 #if defined HAVE_DOS_BASED_FILE_SYSTEM
45725950 /* Skip over the disk name in MSDOS pathnames. */
45735951 if (isalpha ((unsigned char) name[0]) && name[1] == ':')
45745952 name += 2;
46276005 const char *p_next;
46286006 /* static buffer for getcwd */
46296007 char tmp[LT_PATHMAX + 1];
4630 int tmp_len;
6008 size_t tmp_len;
46316009 char *concat_name;
46326010
46336011 lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
46376015 return NULL;
46386016
46396017 /* Absolute path? */
4640 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
6018 #if defined HAVE_DOS_BASED_FILE_SYSTEM
46416019 if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
46426020 {
46436021 concat_name = xstrdup (wrapper);
46556033 return concat_name;
46566034 XFREE (concat_name);
46576035 }
4658 #if defined (HAVE_DOS_BASED_FILE_SYSTEM)
6036 #if defined HAVE_DOS_BASED_FILE_SYSTEM
46596037 }
46606038 #endif
46616039
46786056 for (q = p; *q; q++)
46796057 if (IS_PATH_SEPARATOR (*q))
46806058 break;
4681 p_len = q - p;
6059 p_len = (size_t) (q - p);
46826060 p_next = (*q == '\0' ? q : q + 1);
46836061 if (p_len == 0)
46846062 {
47976175 if (patlen <= len)
47986176 {
47996177 str += len - patlen;
4800 if (strcmp (str, pat) == 0)
6178 if (STREQ (str, pat))
48016179 *str = '\0';
48026180 }
48036181 return str;
48626240 char *str = xstrdup (value);
48636241 setenv (name, str, 1);
48646242 #else
4865 int len = strlen (name) + 1 + strlen (value) + 1;
6243 size_t len = strlen (name) + 1 + strlen (value) + 1;
48666244 char *str = XMALLOC (char, len);
48676245 sprintf (str, "%s=%s", name, value);
48686246 if (putenv (str) != EXIT_SUCCESS)
48796257 char *new_value;
48806258 if (orig_value && *orig_value)
48816259 {
4882 int orig_value_len = strlen (orig_value);
4883 int add_len = strlen (add);
6260 size_t orig_value_len = strlen (orig_value);
6261 size_t add_len = strlen (add);
48846262 new_value = XMALLOC (char, add_len + orig_value_len + 1);
48856263 if (to_end)
48866264 {
49116289 {
49126290 char *new_value = lt_extend_str (getenv (name), value, 0);
49136291 /* some systems can't cope with a ':'-terminated path #' */
4914 int len = strlen (new_value);
4915 while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
6292 size_t len = strlen (new_value);
6293 while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
49166294 {
4917 new_value[len-1] = '\0';
6295 new_value[--len] = '\0';
49186296 }
49196297 lt_setenv (name, new_value);
49206298 XFREE (new_value);
50816459 # True if ARG is an import lib, as indicated by $file_magic_cmd
50826460 func_win32_import_lib_p ()
50836461 {
5084 $opt_debug
6462 $debug_cmd
6463
50856464 case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
50866465 *import*) : ;;
50876466 *) false ;;
50886467 esac
50896468 }
50906469
6470 # func_suncc_cstd_abi
6471 # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!!
6472 # Several compiler flags select an ABI that is incompatible with the
6473 # Cstd library. Avoid specifying it if any are in CXXFLAGS.
6474 func_suncc_cstd_abi ()
6475 {
6476 $debug_cmd
6477
6478 case " $compile_command " in
6479 *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*)
6480 suncc_use_cstd_abi=no
6481 ;;
6482 *)
6483 suncc_use_cstd_abi=yes
6484 ;;
6485 esac
6486 }
6487
50916488 # func_mode_link arg...
50926489 func_mode_link ()
50936490 {
5094 $opt_debug
6491 $debug_cmd
6492
50956493 case $host in
50966494 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
50976495 # It is impossible to link a dll without this setting, and
50986496 # we shouldn't force the makefile maintainer to figure out
5099 # which system we are compiling for in order to pass an extra
6497 # what system we are compiling for in order to pass an extra
51006498 # flag for every libtool invocation.
51016499 # allow_undefined=no
51026500
51036501 # FIXME: Unfortunately, there are problems with the above when trying
5104 # to make a dll which has undefined symbols, in which case not
6502 # to make a dll that has undefined symbols, in which case not
51056503 # even a static library is built. For now, we need to specify
51066504 # -no-undefined on the libtool link line when we can be certain
51076505 # that all symbols are satisfied, otherwise we get a static library.
51456543 module=no
51466544 no_install=no
51476545 objs=
6546 os2dllname=
51486547 non_pic_objects=
51496548 precious_files_regex=
51506549 prefer_static_libs=no
5151 preload=no
6550 preload=false
51526551 prev=
51536552 prevarg=
51546553 release=
51606559 vinfo=
51616560 vinfo_number=no
51626561 weak_libs=
5163 single_module="${wl}-single_module"
6562 single_module=$wl-single_module
51646563 func_infer_tag $base_compile
51656564
51666565 # We need to know -static, to get the right output filenames.
51686567 do
51696568 case $arg in
51706569 -shared)
5171 test "$build_libtool_libs" != yes && \
5172 func_fatal_configuration "can not build a shared library"
6570 test yes != "$build_libtool_libs" \
6571 && func_fatal_configuration "cannot build a shared library"
51736572 build_old_libs=no
51746573 break
51756574 ;;
51766575 -all-static | -static | -static-libtool-libs)
51776576 case $arg in
51786577 -all-static)
5179 if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
6578 if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then
51806579 func_warning "complete static linking is impossible in this configuration"
51816580 fi
51826581 if test -n "$link_static_flag"; then
52096608
52106609 # Go through the arguments, transforming them on the way.
52116610 while test "$#" -gt 0; do
5212 arg="$1"
6611 arg=$1
52136612 shift
52146613 func_quote_for_eval "$arg"
52156614 qarg=$func_quote_for_eval_unquoted_result
52266625
52276626 case $prev in
52286627 bindir)
5229 bindir="$arg"
6628 bindir=$arg
52306629 prev=
52316630 continue
52326631 ;;
52336632 dlfiles|dlprefiles)
5234 if test "$preload" = no; then
6633 $preload || {
52356634 # Add the symbol object into the linking commands.
52366635 func_append compile_command " @SYMFILE@"
52376636 func_append finalize_command " @SYMFILE@"
5238 preload=yes
5239 fi
6637 preload=:
6638 }
52406639 case $arg in
52416640 *.la | *.lo) ;; # We handle these cases below.
52426641 force)
5243 if test "$dlself" = no; then
6642 if test no = "$dlself"; then
52446643 dlself=needless
52456644 export_dynamic=yes
52466645 fi
52486647 continue
52496648 ;;
52506649 self)
5251 if test "$prev" = dlprefiles; then
6650 if test dlprefiles = "$prev"; then
52526651 dlself=yes
5253 elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
6652 elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then
52546653 dlself=yes
52556654 else
52566655 dlself=needless
52606659 continue
52616660 ;;
52626661 *)
5263 if test "$prev" = dlfiles; then
6662 if test dlfiles = "$prev"; then
52646663 func_append dlfiles " $arg"
52656664 else
52666665 func_append dlprefiles " $arg"
52716670 esac
52726671 ;;
52736672 expsyms)
5274 export_symbols="$arg"
6673 export_symbols=$arg
52756674 test -f "$arg" \
5276 || func_fatal_error "symbol file \`$arg' does not exist"
6675 || func_fatal_error "symbol file '$arg' does not exist"
52776676 prev=
52786677 continue
52796678 ;;
52806679 expsyms_regex)
5281 export_symbols_regex="$arg"
6680 export_symbols_regex=$arg
52826681 prev=
52836682 continue
52846683 ;;
52966695 continue
52976696 ;;
52986697 inst_prefix)
5299 inst_prefix_dir="$arg"
6698 inst_prefix_dir=$arg
6699 prev=
6700 continue
6701 ;;
6702 mllvm)
6703 # Clang does not use LLVM to link, so we can simply discard any
6704 # '-mllvm $arg' options when doing the link step.
53006705 prev=
53016706 continue
53026707 ;;
53206725
53216726 if test -z "$pic_object" ||
53226727 test -z "$non_pic_object" ||
5323 test "$pic_object" = none &&
5324 test "$non_pic_object" = none; then
5325 func_fatal_error "cannot find name of object for \`$arg'"
6728 test none = "$pic_object" &&
6729 test none = "$non_pic_object"; then
6730 func_fatal_error "cannot find name of object for '$arg'"
53266731 fi
53276732
53286733 # Extract subdirectory from the argument.
53296734 func_dirname "$arg" "/" ""
5330 xdir="$func_dirname_result"
5331
5332 if test "$pic_object" != none; then
6735 xdir=$func_dirname_result
6736
6737 if test none != "$pic_object"; then
53336738 # Prepend the subdirectory the object is found in.
5334 pic_object="$xdir$pic_object"
5335
5336 if test "$prev" = dlfiles; then
5337 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
6739 pic_object=$xdir$pic_object
6740
6741 if test dlfiles = "$prev"; then
6742 if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
53386743 func_append dlfiles " $pic_object"
53396744 prev=
53406745 continue
53456750 fi
53466751
53476752 # CHECK ME: I think I busted this. -Ossama
5348 if test "$prev" = dlprefiles; then
6753 if test dlprefiles = "$prev"; then
53496754 # Preload the old-style object.
53506755 func_append dlprefiles " $pic_object"
53516756 prev=
53536758
53546759 # A PIC object.
53556760 func_append libobjs " $pic_object"
5356 arg="$pic_object"
6761 arg=$pic_object
53576762 fi
53586763
53596764 # Non-PIC object.
5360 if test "$non_pic_object" != none; then
6765 if test none != "$non_pic_object"; then
53616766 # Prepend the subdirectory the object is found in.
5362 non_pic_object="$xdir$non_pic_object"
6767 non_pic_object=$xdir$non_pic_object
53636768
53646769 # A standard non-PIC object
53656770 func_append non_pic_objects " $non_pic_object"
5366 if test -z "$pic_object" || test "$pic_object" = none ; then
5367 arg="$non_pic_object"
6771 if test -z "$pic_object" || test none = "$pic_object"; then
6772 arg=$non_pic_object
53686773 fi
53696774 else
53706775 # If the PIC object exists, use it instead.
53716776 # $xdir was prepended to $pic_object above.
5372 non_pic_object="$pic_object"
6777 non_pic_object=$pic_object
53736778 func_append non_pic_objects " $non_pic_object"
53746779 fi
53756780 else
53776782 if $opt_dry_run; then
53786783 # Extract subdirectory from the argument.
53796784 func_dirname "$arg" "/" ""
5380 xdir="$func_dirname_result"
6785 xdir=$func_dirname_result
53816786
53826787 func_lo2o "$arg"
53836788 pic_object=$xdir$objdir/$func_lo2o_result
53856790 func_append libobjs " $pic_object"
53866791 func_append non_pic_objects " $non_pic_object"
53876792 else
5388 func_fatal_error "\`$arg' is not a valid libtool object"
6793 func_fatal_error "'$arg' is not a valid libtool object"
53896794 fi
53906795 fi
53916796 done
53926797 else
5393 func_fatal_error "link input file \`$arg' does not exist"
6798 func_fatal_error "link input file '$arg' does not exist"
53946799 fi
53956800 arg=$save_arg
53966801 prev=
53976802 continue
53986803 ;;
6804 os2dllname)
6805 os2dllname=$arg
6806 prev=
6807 continue
6808 ;;
53996809 precious_regex)
5400 precious_files_regex="$arg"
6810 precious_files_regex=$arg
54016811 prev=
54026812 continue
54036813 ;;
54046814 release)
5405 release="-$arg"
6815 release=-$arg
54066816 prev=
54076817 continue
54086818 ;;
54146824 func_fatal_error "only absolute run-paths are allowed"
54156825 ;;
54166826 esac
5417 if test "$prev" = rpath; then
6827 if test rpath = "$prev"; then
54186828 case "$rpath " in
54196829 *" $arg "*) ;;
54206830 *) func_append rpath " $arg" ;;
54296839 continue
54306840 ;;
54316841 shrext)
5432 shrext_cmds="$arg"
6842 shrext_cmds=$arg
54336843 prev=
54346844 continue
54356845 ;;
54696879 esac
54706880 fi # test -n "$prev"
54716881
5472 prevarg="$arg"
6882 prevarg=$arg
54736883
54746884 case $arg in
54756885 -all-static)
54836893
54846894 -allow-undefined)
54856895 # FIXME: remove this flag sometime in the future.
5486 func_fatal_error "\`-allow-undefined' must not be used because it is the default"
6896 func_fatal_error "'-allow-undefined' must not be used because it is the default"
54876897 ;;
54886898
54896899 -avoid-version)
55156925 if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
55166926 func_fatal_error "more than one -exported-symbols argument is not allowed"
55176927 fi
5518 if test "X$arg" = "X-export-symbols"; then
6928 if test X-export-symbols = "X$arg"; then
55196929 prev=expsyms
55206930 else
55216931 prev=expsyms_regex
55496959 func_stripname "-L" '' "$arg"
55506960 if test -z "$func_stripname_result"; then
55516961 if test "$#" -gt 0; then
5552 func_fatal_error "require no space between \`-L' and \`$1'"
6962 func_fatal_error "require no space between '-L' and '$1'"
55536963 else
5554 func_fatal_error "need path for \`-L' option"
6964 func_fatal_error "need path for '-L' option"
55556965 fi
55566966 fi
55576967 func_resolve_sysroot "$func_stripname_result"
55626972 *)
55636973 absdir=`cd "$dir" && pwd`
55646974 test -z "$absdir" && \
5565 func_fatal_error "cannot determine absolute directory name of \`$dir'"
5566 dir="$absdir"
6975 func_fatal_error "cannot determine absolute directory name of '$dir'"
6976 dir=$absdir
55676977 ;;
55686978 esac
55696979 case "$deplibs " in
55987008 ;;
55997009
56007010 -l*)
5601 if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
7011 if test X-lc = "X$arg" || test X-lm = "X$arg"; then
56027012 case $host in
56037013 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
56047014 # These systems don't actually have a C or math library (as such)
56067016 ;;
56077017 *-*-os2*)
56087018 # These systems don't actually have a C library (as such)
5609 test "X$arg" = "X-lc" && continue
7019 test X-lc = "X$arg" && continue
56107020 ;;
5611 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
7021 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
56127022 # Do not include libc due to us having libc/libc_r.
5613 test "X$arg" = "X-lc" && continue
7023 test X-lc = "X$arg" && continue
56147024 ;;
56157025 *-*-rhapsody* | *-*-darwin1.[012])
56167026 # Rhapsody C and math libraries are in the System framework
56197029 ;;
56207030 *-*-sco3.2v5* | *-*-sco5v6*)
56217031 # Causes problems with __ctype
5622 test "X$arg" = "X-lc" && continue
7032 test X-lc = "X$arg" && continue
56237033 ;;
56247034 *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
56257035 # Compiler inserts libc in the correct place for threads to work
5626 test "X$arg" = "X-lc" && continue
7036 test X-lc = "X$arg" && continue
56277037 ;;
56287038 esac
5629 elif test "X$arg" = "X-lc_r"; then
7039 elif test X-lc_r = "X$arg"; then
56307040 case $host in
5631 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
7041 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*)
56327042 # Do not include libc_r directly, use -pthread flag.
56337043 continue
56347044 ;;
56357045 esac
56367046 fi
56377047 func_append deplibs " $arg"
7048 continue
7049 ;;
7050
7051 -mllvm)
7052 prev=mllvm
56387053 continue
56397054 ;;
56407055
56677082 ;;
56687083
56697084 -multi_module)
5670 single_module="${wl}-multi_module"
7085 single_module=$wl-multi_module
56717086 continue
56727087 ;;
56737088
56817096 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
56827097 # The PATH hackery in wrapper scripts is required on Windows
56837098 # and Darwin in order for the loader to find any dlls it needs.
5684 func_warning "\`-no-install' is ignored for $host"
5685 func_warning "assuming \`-no-fast-install' instead"
7099 func_warning "'-no-install' is ignored for $host"
7100 func_warning "assuming '-no-fast-install' instead"
56867101 fast_install=no
56877102 ;;
56887103 *) no_install=yes ;;
56977112
56987113 -objectlist)
56997114 prev=objectlist
7115 continue
7116 ;;
7117
7118 -os2dllname)
7119 prev=os2dllname
57007120 continue
57017121 ;;
57027122
57877207 func_stripname '-Wc,' '' "$arg"
57887208 args=$func_stripname_result
57897209 arg=
5790 save_ifs="$IFS"; IFS=','
7210 save_ifs=$IFS; IFS=,
57917211 for flag in $args; do
5792 IFS="$save_ifs"
7212 IFS=$save_ifs
57937213 func_quote_for_eval "$flag"
57947214 func_append arg " $func_quote_for_eval_result"
57957215 func_append compiler_flags " $func_quote_for_eval_result"
57967216 done
5797 IFS="$save_ifs"
7217 IFS=$save_ifs
57987218 func_stripname ' ' '' "$arg"
57997219 arg=$func_stripname_result
58007220 ;;
58037223 func_stripname '-Wl,' '' "$arg"
58047224 args=$func_stripname_result
58057225 arg=
5806 save_ifs="$IFS"; IFS=','
7226 save_ifs=$IFS; IFS=,
58077227 for flag in $args; do
5808 IFS="$save_ifs"
7228 IFS=$save_ifs
58097229 func_quote_for_eval "$flag"
58107230 func_append arg " $wl$func_quote_for_eval_result"
58117231 func_append compiler_flags " $wl$func_quote_for_eval_result"
58127232 func_append linker_flags " $func_quote_for_eval_result"
58137233 done
5814 IFS="$save_ifs"
7234 IFS=$save_ifs
58157235 func_stripname ' ' '' "$arg"
58167236 arg=$func_stripname_result
58177237 ;;
58347254 # -msg_* for osf cc
58357255 -msg_*)
58367256 func_quote_for_eval "$arg"
5837 arg="$func_quote_for_eval_result"
7257 arg=$func_quote_for_eval_result
58387258 ;;
58397259
58407260 # Flags to be passed through unchanged, with rationale:
58467266 # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
58477267 # -F/path path to uninstalled frameworks, gcc on darwin
58487268 # -p, -pg, --coverage, -fprofile-* profiling flags for GCC
7269 # -fstack-protector* stack protector flags for GCC
58497270 # @file GCC response files
58507271 # -tp=* Portland pgcc target processor selection
58517272 # --sysroot=* for sysroot support
5852 # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
7273 # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
7274 # -stdlib=* select c++ std lib with clang
58537275 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
58547276 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
5855 -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
7277 -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
58567278 func_quote_for_eval "$arg"
5857 arg="$func_quote_for_eval_result"
7279 arg=$func_quote_for_eval_result
58587280 func_append compile_command " $arg"
58597281 func_append finalize_command " $arg"
58607282 func_append compiler_flags " $arg"
58617283 continue
58627284 ;;
58637285
7286 -Z*)
7287 if test os2 = "`expr $host : '.*\(os2\)'`"; then
7288 # OS/2 uses -Zxxx to specify OS/2-specific options
7289 compiler_flags="$compiler_flags $arg"
7290 func_append compile_command " $arg"
7291 func_append finalize_command " $arg"
7292 case $arg in
7293 -Zlinker | -Zstack)
7294 prev=xcompiler
7295 ;;
7296 esac
7297 continue
7298 else
7299 # Otherwise treat like 'Some other compiler flag' below
7300 func_quote_for_eval "$arg"
7301 arg=$func_quote_for_eval_result
7302 fi
7303 ;;
7304
58647305 # Some other compiler flag.
58657306 -* | +*)
58667307 func_quote_for_eval "$arg"
5867 arg="$func_quote_for_eval_result"
7308 arg=$func_quote_for_eval_result
58687309 ;;
58697310
58707311 *.$objext)
58857326
58867327 if test -z "$pic_object" ||
58877328 test -z "$non_pic_object" ||
5888 test "$pic_object" = none &&
5889 test "$non_pic_object" = none; then
5890 func_fatal_error "cannot find name of object for \`$arg'"
7329 test none = "$pic_object" &&
7330 test none = "$non_pic_object"; then
7331 func_fatal_error "cannot find name of object for '$arg'"
58917332 fi
58927333
58937334 # Extract subdirectory from the argument.
58947335 func_dirname "$arg" "/" ""
5895 xdir="$func_dirname_result"
5896
5897 if test "$pic_object" != none; then
7336 xdir=$func_dirname_result
7337
7338 test none = "$pic_object" || {
58987339 # Prepend the subdirectory the object is found in.
5899 pic_object="$xdir$pic_object"
5900
5901 if test "$prev" = dlfiles; then
5902 if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
7340 pic_object=$xdir$pic_object
7341
7342 if test dlfiles = "$prev"; then
7343 if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then
59037344 func_append dlfiles " $pic_object"
59047345 prev=
59057346 continue
59107351 fi
59117352
59127353 # CHECK ME: I think I busted this. -Ossama
5913 if test "$prev" = dlprefiles; then
7354 if test dlprefiles = "$prev"; then
59147355 # Preload the old-style object.
59157356 func_append dlprefiles " $pic_object"
59167357 prev=
59187359
59197360 # A PIC object.
59207361 func_append libobjs " $pic_object"
5921 arg="$pic_object"
5922 fi
7362 arg=$pic_object
7363 }
59237364
59247365 # Non-PIC object.
5925 if test "$non_pic_object" != none; then
7366 if test none != "$non_pic_object"; then
59267367 # Prepend the subdirectory the object is found in.
5927 non_pic_object="$xdir$non_pic_object"
7368 non_pic_object=$xdir$non_pic_object
59287369
59297370 # A standard non-PIC object
59307371 func_append non_pic_objects " $non_pic_object"
5931 if test -z "$pic_object" || test "$pic_object" = none ; then
5932 arg="$non_pic_object"
7372 if test -z "$pic_object" || test none = "$pic_object"; then
7373 arg=$non_pic_object
59337374 fi
59347375 else
59357376 # If the PIC object exists, use it instead.
59367377 # $xdir was prepended to $pic_object above.
5937 non_pic_object="$pic_object"
7378 non_pic_object=$pic_object
59387379 func_append non_pic_objects " $non_pic_object"
59397380 fi
59407381 else
59427383 if $opt_dry_run; then
59437384 # Extract subdirectory from the argument.
59447385 func_dirname "$arg" "/" ""
5945 xdir="$func_dirname_result"
7386 xdir=$func_dirname_result
59467387
59477388 func_lo2o "$arg"
59487389 pic_object=$xdir$objdir/$func_lo2o_result
59507391 func_append libobjs " $pic_object"
59517392 func_append non_pic_objects " $non_pic_object"
59527393 else
5953 func_fatal_error "\`$arg' is not a valid libtool object"
7394 func_fatal_error "'$arg' is not a valid libtool object"
59547395 fi
59557396 fi
59567397 ;;
59667407 # A libtool-controlled library.
59677408
59687409 func_resolve_sysroot "$arg"
5969 if test "$prev" = dlfiles; then
7410 if test dlfiles = "$prev"; then
59707411 # This library was specified with -dlopen.
59717412 func_append dlfiles " $func_resolve_sysroot_result"
59727413 prev=
5973 elif test "$prev" = dlprefiles; then
7414 elif test dlprefiles = "$prev"; then
59747415 # The library was specified with -dlpreopen.
59757416 func_append dlprefiles " $func_resolve_sysroot_result"
59767417 prev=
59857426 # Unknown arguments in both finalize_command and compile_command need
59867427 # to be aesthetically quoted because they are evaled later.
59877428 func_quote_for_eval "$arg"
5988 arg="$func_quote_for_eval_result"
7429 arg=$func_quote_for_eval_result
59897430 ;;
59907431 esac # arg
59917432
59977438 done # argument parsing loop
59987439
59997440 test -n "$prev" && \
6000 func_fatal_help "the \`$prevarg' option requires an argument"
6001
6002 if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
7441 func_fatal_help "the '$prevarg' option requires an argument"
7442
7443 if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then
60037444 eval arg=\"$export_dynamic_flag_spec\"
60047445 func_append compile_command " $arg"
60057446 func_append finalize_command " $arg"
60087449 oldlibs=
60097450 # calculate the name of the file, without its directory
60107451 func_basename "$output"
6011 outputname="$func_basename_result"
6012 libobjs_save="$libobjs"
7452 outputname=$func_basename_result
7453 libobjs_save=$libobjs
60137454
60147455 if test -n "$shlibpath_var"; then
60157456 # get the directories listed in $shlibpath_var
6016 eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
7457 eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\`
60177458 else
60187459 shlib_search_path=
60197460 fi
60207461 eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
60217462 eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
60227463
7464 # Definition is injected by LT_CONFIG during libtool generation.
7465 func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH"
7466
60237467 func_dirname "$output" "/" ""
6024 output_objdir="$func_dirname_result$objdir"
7468 output_objdir=$func_dirname_result$objdir
60257469 func_to_tool_file "$output_objdir/"
60267470 tool_output_objdir=$func_to_tool_file_result
60277471 # Create the object directory.
60447488 # Find all interdependent deplibs by searching for libraries
60457489 # that are linked more than once (e.g. -la -lb -la)
60467490 for deplib in $deplibs; do
6047 if $opt_preserve_dup_deps ; then
7491 if $opt_preserve_dup_deps; then
60487492 case "$libs " in
60497493 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
60507494 esac
60527496 func_append libs " $deplib"
60537497 done
60547498
6055 if test "$linkmode" = lib; then
7499 if test lib = "$linkmode"; then
60567500 libs="$predeps $libs $compiler_lib_search_path $postdeps"
60577501
60587502 # Compute libraries that are listed more than once in $predeps
60847528 case $file in
60857529 *.la) ;;
60867530 *)
6087 func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
7531 func_fatal_help "libraries can '-dlopen' only libtool libraries: $file"
60887532 ;;
60897533 esac
60907534 done
60927536 prog)
60937537 compile_deplibs=
60947538 finalize_deplibs=
6095 alldeplibs=no
7539 alldeplibs=false
60967540 newdlfiles=
60977541 newdlprefiles=
60987542 passes="conv scan dlopen dlpreopen link"
61047548 for pass in $passes; do
61057549 # The preopen pass in lib mode reverses $deplibs; put it back here
61067550 # so that -L comes before libs that need it for instance...
6107 if test "$linkmode,$pass" = "lib,link"; then
7551 if test lib,link = "$linkmode,$pass"; then
61087552 ## FIXME: Find the place where the list is rebuilt in the wrong
61097553 ## order, and fix it there properly
61107554 tmp_deplibs=
61117555 for deplib in $deplibs; do
61127556 tmp_deplibs="$deplib $tmp_deplibs"
61137557 done
6114 deplibs="$tmp_deplibs"
7558 deplibs=$tmp_deplibs
61157559 fi
61167560
6117 if test "$linkmode,$pass" = "lib,link" ||
6118 test "$linkmode,$pass" = "prog,scan"; then
6119 libs="$deplibs"
7561 if test lib,link = "$linkmode,$pass" ||
7562 test prog,scan = "$linkmode,$pass"; then
7563 libs=$deplibs
61207564 deplibs=
61217565 fi
6122 if test "$linkmode" = prog; then
7566 if test prog = "$linkmode"; then
61237567 case $pass in
6124 dlopen) libs="$dlfiles" ;;
6125 dlpreopen) libs="$dlprefiles" ;;
7568 dlopen) libs=$dlfiles ;;
7569 dlpreopen) libs=$dlprefiles ;;
61267570 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
61277571 esac
61287572 fi
6129 if test "$linkmode,$pass" = "lib,dlpreopen"; then
7573 if test lib,dlpreopen = "$linkmode,$pass"; then
61307574 # Collect and forward deplibs of preopened libtool libs
61317575 for lib in $dlprefiles; do
61327576 # Ignore non-libtool-libs
61477591 esac
61487592 done
61497593 done
6150 libs="$dlprefiles"
7594 libs=$dlprefiles
61517595 fi
6152 if test "$pass" = dlopen; then
7596 if test dlopen = "$pass"; then
61537597 # Collect dlpreopened libraries
6154 save_deplibs="$deplibs"
7598 save_deplibs=$deplibs
61557599 deplibs=
61567600 fi
61577601
61587602 for deplib in $libs; do
61597603 lib=
6160 found=no
7604 found=false
61617605 case $deplib in
61627606 -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
61637607 |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
6164 if test "$linkmode,$pass" = "prog,link"; then
7608 if test prog,link = "$linkmode,$pass"; then
61657609 compile_deplibs="$deplib $compile_deplibs"
61667610 finalize_deplibs="$deplib $finalize_deplibs"
61677611 else
61687612 func_append compiler_flags " $deplib"
6169 if test "$linkmode" = lib ; then
7613 if test lib = "$linkmode"; then
61707614 case "$new_inherited_linker_flags " in
61717615 *" $deplib "*) ;;
61727616 * ) func_append new_inherited_linker_flags " $deplib" ;;
61767620 continue
61777621 ;;
61787622 -l*)
6179 if test "$linkmode" != lib && test "$linkmode" != prog; then
6180 func_warning "\`-l' is ignored for archives/objects"
7623 if test lib != "$linkmode" && test prog != "$linkmode"; then
7624 func_warning "'-l' is ignored for archives/objects"
61817625 continue
61827626 fi
61837627 func_stripname '-l' '' "$deplib"
61847628 name=$func_stripname_result
6185 if test "$linkmode" = lib; then
7629 if test lib = "$linkmode"; then
61867630 searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
61877631 else
61887632 searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
61907634 for searchdir in $searchdirs; do
61917635 for search_ext in .la $std_shrext .so .a; do
61927636 # Search the libtool library
6193 lib="$searchdir/lib${name}${search_ext}"
7637 lib=$searchdir/lib$name$search_ext
61947638 if test -f "$lib"; then
6195 if test "$search_ext" = ".la"; then
6196 found=yes
7639 if test .la = "$search_ext"; then
7640 found=:
61977641 else
6198 found=no
7642 found=false
61997643 fi
62007644 break 2
62017645 fi
62027646 done
62037647 done
6204 if test "$found" != yes; then
6205 # deplib doesn't seem to be a libtool library
6206 if test "$linkmode,$pass" = "prog,link"; then
6207 compile_deplibs="$deplib $compile_deplibs"
6208 finalize_deplibs="$deplib $finalize_deplibs"
6209 else
6210 deplibs="$deplib $deplibs"
6211 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
6212 fi
6213 continue
6214 else # deplib is a libtool library
7648 if $found; then
7649 # deplib is a libtool library
62157650 # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
62167651 # We need to do some special things here, and not later.
6217 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7652 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
62187653 case " $predeps $postdeps " in
62197654 *" $deplib "*)
62207655 if func_lalib_p "$lib"; then
62227657 old_library=
62237658 func_source "$lib"
62247659 for l in $old_library $library_names; do
6225 ll="$l"
7660 ll=$l
62267661 done
6227 if test "X$ll" = "X$old_library" ; then # only static version available
6228 found=no
7662 if test "X$ll" = "X$old_library"; then # only static version available
7663 found=false
62297664 func_dirname "$lib" "" "."
6230 ladir="$func_dirname_result"
7665 ladir=$func_dirname_result
62317666 lib=$ladir/$old_library
6232 if test "$linkmode,$pass" = "prog,link"; then
7667 if test prog,link = "$linkmode,$pass"; then
62337668 compile_deplibs="$deplib $compile_deplibs"
62347669 finalize_deplibs="$deplib $finalize_deplibs"
62357670 else
62367671 deplibs="$deplib $deplibs"
6237 test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
7672 test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
62387673 fi
62397674 continue
62407675 fi
62437678 *) ;;
62447679 esac
62457680 fi
7681 else
7682 # deplib doesn't seem to be a libtool library
7683 if test prog,link = "$linkmode,$pass"; then
7684 compile_deplibs="$deplib $compile_deplibs"
7685 finalize_deplibs="$deplib $finalize_deplibs"
7686 else
7687 deplibs="$deplib $deplibs"
7688 test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs"
7689 fi
7690 continue
62467691 fi
62477692 ;; # -l
62487693 *.ltframework)
6249 if test "$linkmode,$pass" = "prog,link"; then
7694 if test prog,link = "$linkmode,$pass"; then
62507695 compile_deplibs="$deplib $compile_deplibs"
62517696 finalize_deplibs="$deplib $finalize_deplibs"
62527697 else
62537698 deplibs="$deplib $deplibs"
6254 if test "$linkmode" = lib ; then
7699 if test lib = "$linkmode"; then
62557700 case "$new_inherited_linker_flags " in
62567701 *" $deplib "*) ;;
62577702 * ) func_append new_inherited_linker_flags " $deplib" ;;
62647709 case $linkmode in
62657710 lib)
62667711 deplibs="$deplib $deplibs"
6267 test "$pass" = conv && continue
7712 test conv = "$pass" && continue
62687713 newdependency_libs="$deplib $newdependency_libs"
62697714 func_stripname '-L' '' "$deplib"
62707715 func_resolve_sysroot "$func_stripname_result"
62717716 func_append newlib_search_path " $func_resolve_sysroot_result"
62727717 ;;
62737718 prog)
6274 if test "$pass" = conv; then
7719 if test conv = "$pass"; then
62757720 deplibs="$deplib $deplibs"
62767721 continue
62777722 fi
6278 if test "$pass" = scan; then
7723 if test scan = "$pass"; then
62797724 deplibs="$deplib $deplibs"
62807725 else
62817726 compile_deplibs="$deplib $compile_deplibs"
62867731 func_append newlib_search_path " $func_resolve_sysroot_result"
62877732 ;;
62887733 *)
6289 func_warning "\`-L' is ignored for archives/objects"
7734 func_warning "'-L' is ignored for archives/objects"
62907735 ;;
62917736 esac # linkmode
62927737 continue
62937738 ;; # -L
62947739 -R*)
6295 if test "$pass" = link; then
7740 if test link = "$pass"; then
62967741 func_stripname '-R' '' "$deplib"
62977742 func_resolve_sysroot "$func_stripname_result"
62987743 dir=$func_resolve_sysroot_result
63107755 lib=$func_resolve_sysroot_result
63117756 ;;
63127757 *.$libext)
6313 if test "$pass" = conv; then
7758 if test conv = "$pass"; then
63147759 deplibs="$deplib $deplibs"
63157760 continue
63167761 fi
63217766 case " $dlpreconveniencelibs " in
63227767 *" $deplib "*) ;;
63237768 *)
6324 valid_a_lib=no
7769 valid_a_lib=false
63257770 case $deplibs_check_method in
63267771 match_pattern*)
63277772 set dummy $deplibs_check_method; shift
63287773 match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
63297774 if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
63307775 | $EGREP "$match_pattern_regex" > /dev/null; then
6331 valid_a_lib=yes
7776 valid_a_lib=:
63327777 fi
63337778 ;;
63347779 pass_all)
6335 valid_a_lib=yes
7780 valid_a_lib=:
63367781 ;;
63377782 esac
6338 if test "$valid_a_lib" != yes; then
7783 if $valid_a_lib; then
7784 echo
7785 $ECHO "*** Warning: Linking the shared library $output against the"
7786 $ECHO "*** static library $deplib is not portable!"
7787 deplibs="$deplib $deplibs"
7788 else
63397789 echo
63407790 $ECHO "*** Warning: Trying to link with static lib archive $deplib."
63417791 echo "*** I have the capability to make that library automatically link in when"
63437793 echo "*** shared version of the library, which you do not appear to have"
63447794 echo "*** because the file extensions .$libext of this argument makes me believe"
63457795 echo "*** that it is just a static archive that I should not use here."
6346 else
6347 echo
6348 $ECHO "*** Warning: Linking the shared library $output against the"
6349 $ECHO "*** static library $deplib is not portable!"
6350 deplibs="$deplib $deplibs"
63517796 fi
63527797 ;;
63537798 esac
63547799 continue
63557800 ;;
63567801 prog)
6357 if test "$pass" != link; then
7802 if test link != "$pass"; then
63587803 deplibs="$deplib $deplibs"
63597804 else
63607805 compile_deplibs="$deplib $compile_deplibs"
63657810 esac # linkmode
63667811 ;; # *.$libext
63677812 *.lo | *.$objext)
6368 if test "$pass" = conv; then
7813 if test conv = "$pass"; then
63697814 deplibs="$deplib $deplibs"
6370 elif test "$linkmode" = prog; then
6371 if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
7815 elif test prog = "$linkmode"; then
7816 if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then
63727817 # If there is no dlopen support or we're linking statically,
63737818 # we need to preload.
63747819 func_append newdlprefiles " $deplib"
63817826 continue
63827827 ;;
63837828 %DEPLIBS%)
6384 alldeplibs=yes
7829 alldeplibs=:
63857830 continue
63867831 ;;
63877832 esac # case $deplib
63887833
6389 if test "$found" = yes || test -f "$lib"; then :
6390 else
6391 func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
6392 fi
7834 $found || test -f "$lib" \
7835 || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'"
63937836
63947837 # Check to see that this really is a libtool archive.
63957838 func_lalib_unsafe_p "$lib" \
6396 || func_fatal_error "\`$lib' is not a valid libtool archive"
7839 || func_fatal_error "'$lib' is not a valid libtool archive"
63977840
63987841 func_dirname "$lib" "" "."
6399 ladir="$func_dirname_result"
7842 ladir=$func_dirname_result
64007843
64017844 dlname=
64027845 dlopen=
64267869 done
64277870 fi
64287871 dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
6429 if test "$linkmode,$pass" = "lib,link" ||
6430 test "$linkmode,$pass" = "prog,scan" ||
6431 { test "$linkmode" != prog && test "$linkmode" != lib; }; then
7872 if test lib,link = "$linkmode,$pass" ||
7873 test prog,scan = "$linkmode,$pass" ||
7874 { test prog != "$linkmode" && test lib != "$linkmode"; }; then
64327875 test -n "$dlopen" && func_append dlfiles " $dlopen"
64337876 test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
64347877 fi
64357878
6436 if test "$pass" = conv; then
7879 if test conv = "$pass"; then
64377880 # Only check for convenience libraries
64387881 deplibs="$lib $deplibs"
64397882 if test -z "$libdir"; then
64407883 if test -z "$old_library"; then
6441 func_fatal_error "cannot find name of link library for \`$lib'"
7884 func_fatal_error "cannot find name of link library for '$lib'"
64427885 fi
64437886 # It is a libtool convenience library, so add in its objects.
64447887 func_append convenience " $ladir/$objdir/$old_library"
64457888 func_append old_convenience " $ladir/$objdir/$old_library"
6446 elif test "$linkmode" != prog && test "$linkmode" != lib; then
6447 func_fatal_error "\`$lib' is not a convenience library"
7889 elif test prog != "$linkmode" && test lib != "$linkmode"; then
7890 func_fatal_error "'$lib' is not a convenience library"
64487891 fi
64497892 tmp_libs=
64507893 for deplib in $dependency_libs; do
64517894 deplibs="$deplib $deplibs"
6452 if $opt_preserve_dup_deps ; then
7895 if $opt_preserve_dup_deps; then
64537896 case "$tmp_libs " in
64547897 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
64557898 esac
64637906 # Get the name of the library we link against.
64647907 linklib=
64657908 if test -n "$old_library" &&
6466 { test "$prefer_static_libs" = yes ||
6467 test "$prefer_static_libs,$installed" = "built,no"; }; then
7909 { test yes = "$prefer_static_libs" ||
7910 test built,no = "$prefer_static_libs,$installed"; }; then
64687911 linklib=$old_library
64697912 else
64707913 for l in $old_library $library_names; do
6471 linklib="$l"
7914 linklib=$l
64727915 done
64737916 fi
64747917 if test -z "$linklib"; then
6475 func_fatal_error "cannot find name of link library for \`$lib'"
7918 func_fatal_error "cannot find name of link library for '$lib'"
64767919 fi
64777920
64787921 # This library was specified with -dlopen.
6479 if test "$pass" = dlopen; then
6480 if test -z "$libdir"; then
6481 func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
6482 fi
7922 if test dlopen = "$pass"; then
7923 test -z "$libdir" \
7924 && func_fatal_error "cannot -dlopen a convenience library: '$lib'"
64837925 if test -z "$dlname" ||
6484 test "$dlopen_support" != yes ||
6485 test "$build_libtool_libs" = no; then
7926 test yes != "$dlopen_support" ||
7927 test no = "$build_libtool_libs"
7928 then
64867929 # If there is no dlname, no dlopen support or we're linking
64877930 # statically, we need to preload. We also need to preload any
64887931 # dependent libraries so libltdl's deplib preloader doesn't
64967939
64977940 # We need an absolute path.
64987941 case $ladir in
6499 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
7942 [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;;
65007943 *)
65017944 abs_ladir=`cd "$ladir" && pwd`
65027945 if test -z "$abs_ladir"; then
6503 func_warning "cannot determine absolute directory name of \`$ladir'"
7946 func_warning "cannot determine absolute directory name of '$ladir'"
65047947 func_warning "passing it literally to the linker, although it might fail"
6505 abs_ladir="$ladir"
7948 abs_ladir=$ladir
65067949 fi
65077950 ;;
65087951 esac
65097952 func_basename "$lib"
6510 laname="$func_basename_result"
7953 laname=$func_basename_result
65117954
65127955 # Find the relevant object directory and library name.
6513 if test "X$installed" = Xyes; then
7956 if test yes = "$installed"; then
65147957 if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
6515 func_warning "library \`$lib' was moved."
6516 dir="$ladir"
6517 absdir="$abs_ladir"
6518 libdir="$abs_ladir"
7958 func_warning "library '$lib' was moved."
7959 dir=$ladir
7960 absdir=$abs_ladir
7961 libdir=$abs_ladir
65197962 else
6520 dir="$lt_sysroot$libdir"
6521 absdir="$lt_sysroot$libdir"
7963 dir=$lt_sysroot$libdir
7964 absdir=$lt_sysroot$libdir
65227965 fi
6523 test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
7966 test yes = "$hardcode_automatic" && avoidtemprpath=yes
65247967 else
65257968 if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
6526 dir="$ladir"
6527 absdir="$abs_ladir"
7969 dir=$ladir
7970 absdir=$abs_ladir
65287971 # Remove this search path later
65297972 func_append notinst_path " $abs_ladir"
65307973 else
6531 dir="$ladir/$objdir"
6532 absdir="$abs_ladir/$objdir"
7974 dir=$ladir/$objdir
7975 absdir=$abs_ladir/$objdir
65337976 # Remove this search path later
65347977 func_append notinst_path " $abs_ladir"
65357978 fi
65387981 name=$func_stripname_result
65397982
65407983 # This library was specified with -dlpreopen.
6541 if test "$pass" = dlpreopen; then
6542 if test -z "$libdir" && test "$linkmode" = prog; then
6543 func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
7984 if test dlpreopen = "$pass"; then
7985 if test -z "$libdir" && test prog = "$linkmode"; then
7986 func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'"
65447987 fi
6545 case "$host" in
7988 case $host in
65467989 # special handling for platforms with PE-DLLs.
65477990 *cygwin* | *mingw* | *cegcc* )
65487991 # Linker will automatically link against shared library if both
65868029
65878030 if test -z "$libdir"; then
65888031 # Link the convenience library
6589 if test "$linkmode" = lib; then
8032 if test lib = "$linkmode"; then
65908033 deplibs="$dir/$old_library $deplibs"
6591 elif test "$linkmode,$pass" = "prog,link"; then
8034 elif test prog,link = "$linkmode,$pass"; then
65928035 compile_deplibs="$dir/$old_library $compile_deplibs"
65938036 finalize_deplibs="$dir/$old_library $finalize_deplibs"
65948037 else
65988041 fi
65998042
66008043
6601 if test "$linkmode" = prog && test "$pass" != link; then
8044 if test prog = "$linkmode" && test link != "$pass"; then
66028045 func_append newlib_search_path " $ladir"
66038046 deplibs="$lib $deplibs"
66048047
6605 linkalldeplibs=no
6606 if test "$link_all_deplibs" != no || test -z "$library_names" ||
6607 test "$build_libtool_libs" = no; then
6608 linkalldeplibs=yes
8048 linkalldeplibs=false
8049 if test no != "$link_all_deplibs" || test -z "$library_names" ||
8050 test no = "$build_libtool_libs"; then
8051 linkalldeplibs=:
66098052 fi
66108053
66118054 tmp_libs=
66178060 ;;
66188061 esac
66198062 # Need to link against all dependency_libs?
6620 if test "$linkalldeplibs" = yes; then
8063 if $linkalldeplibs; then
66218064 deplibs="$deplib $deplibs"
66228065 else
66238066 # Need to hardcode shared library paths
66248067 # or/and link against static libraries
66258068 newdependency_libs="$deplib $newdependency_libs"
66268069 fi
6627 if $opt_preserve_dup_deps ; then
8070 if $opt_preserve_dup_deps; then
66288071 case "$tmp_libs " in
66298072 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
66308073 esac
66348077 continue
66358078 fi # $linkmode = prog...
66368079
6637 if test "$linkmode,$pass" = "prog,link"; then
8080 if test prog,link = "$linkmode,$pass"; then
66388081 if test -n "$library_names" &&
6639 { { test "$prefer_static_libs" = no ||
6640 test "$prefer_static_libs,$installed" = "built,yes"; } ||
8082 { { test no = "$prefer_static_libs" ||
8083 test built,yes = "$prefer_static_libs,$installed"; } ||
66418084 test -z "$old_library"; }; then
66428085 # We need to hardcode the library path
6643 if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
8086 if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then
66448087 # Make sure the rpath contains only unique directories.
6645 case "$temp_rpath:" in
8088 case $temp_rpath: in
66468089 *"$absdir:"*) ;;
66478090 *) func_append temp_rpath "$absdir:" ;;
66488091 esac
66718114 esac
66728115 fi # $linkmode,$pass = prog,link...
66738116
6674 if test "$alldeplibs" = yes &&
6675 { test "$deplibs_check_method" = pass_all ||
6676 { test "$build_libtool_libs" = yes &&
8117 if $alldeplibs &&
8118 { test pass_all = "$deplibs_check_method" ||
8119 { test yes = "$build_libtool_libs" &&
66778120 test -n "$library_names"; }; }; then
66788121 # We only need to search for static libraries
66798122 continue
66828125
66838126 link_static=no # Whether the deplib will be linked statically
66848127 use_static_libs=$prefer_static_libs
6685 if test "$use_static_libs" = built && test "$installed" = yes; then
8128 if test built = "$use_static_libs" && test yes = "$installed"; then
66868129 use_static_libs=no
66878130 fi
66888131 if test -n "$library_names" &&
6689 { test "$use_static_libs" = no || test -z "$old_library"; }; then
8132 { test no = "$use_static_libs" || test -z "$old_library"; }; then
66908133 case $host in
6691 *cygwin* | *mingw* | *cegcc*)
8134 *cygwin* | *mingw* | *cegcc* | *os2*)
66928135 # No point in relinking DLLs because paths are not encoded
66938136 func_append notinst_deplibs " $lib"
66948137 need_relink=no
66958138 ;;
66968139 *)
6697 if test "$installed" = no; then
8140 if test no = "$installed"; then
66988141 func_append notinst_deplibs " $lib"
66998142 need_relink=yes
67008143 fi
67048147
67058148 # Warn about portability, can't link against -module's on some
67068149 # systems (darwin). Don't bleat about dlopened modules though!
6707 dlopenmodule=""
8150 dlopenmodule=
67088151 for dlpremoduletest in $dlprefiles; do
67098152 if test "X$dlpremoduletest" = "X$lib"; then
6710 dlopenmodule="$dlpremoduletest"
8153 dlopenmodule=$dlpremoduletest
67118154 break
67128155 fi
67138156 done
6714 if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
8157 if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then
67158158 echo
6716 if test "$linkmode" = prog; then
8159 if test prog = "$linkmode"; then
67178160 $ECHO "*** Warning: Linking the executable $output against the loadable module"
67188161 else
67198162 $ECHO "*** Warning: Linking the shared library $output against the loadable module"
67208163 fi
67218164 $ECHO "*** $linklib is not portable!"
67228165 fi
6723 if test "$linkmode" = lib &&
6724 test "$hardcode_into_libs" = yes; then
8166 if test lib = "$linkmode" &&
8167 test yes = "$hardcode_into_libs"; then
67258168 # Hardcode the library path.
67268169 # Skip directories that are in the system default run-time
67278170 # search path.
67498192 # figure out the soname
67508193 set dummy $library_names
67518194 shift
6752 realname="$1"
8195 realname=$1
67538196 shift
67548197 libname=`eval "\\$ECHO \"$libname_spec\""`
67558198 # use dlname if we got it. it's perfectly good, no?
67568199 if test -n "$dlname"; then
6757 soname="$dlname"
8200 soname=$dlname
67588201 elif test -n "$soname_spec"; then
67598202 # bleh windows
67608203 case $host in
6761 *cygwin* | mingw* | *cegcc*)
8204 *cygwin* | mingw* | *cegcc* | *os2*)
67628205 func_arith $current - $age
67638206 major=$func_arith_result
6764 versuffix="-$major"
8207 versuffix=-$major
67658208 ;;
67668209 esac
67678210 eval soname=\"$soname_spec\"
67688211 else
6769 soname="$realname"
8212 soname=$realname
67708213 fi
67718214
67728215 # Make a new name for the extract_expsyms_cmds to use
6773 soroot="$soname"
8216 soroot=$soname
67748217 func_basename "$soroot"
6775 soname="$func_basename_result"
8218 soname=$func_basename_result
67768219 func_stripname 'lib' '.dll' "$soname"
67778220 newlib=libimp-$func_stripname_result.a
67788221
67798222 # If the library has no export list, then create one now
67808223 if test -f "$output_objdir/$soname-def"; then :
67818224 else
6782 func_verbose "extracting exported symbol list from \`$soname'"
8225 func_verbose "extracting exported symbol list from '$soname'"
67838226 func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
67848227 fi
67858228
67868229 # Create $newlib
67878230 if test -f "$output_objdir/$newlib"; then :; else
6788 func_verbose "generating import library for \`$soname'"
8231 func_verbose "generating import library for '$soname'"
67898232 func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
67908233 fi
67918234 # make sure the library variables are pointing to the new library
67938236 linklib=$newlib
67948237 fi # test -n "$old_archive_from_expsyms_cmds"
67958238
6796 if test "$linkmode" = prog || test "$opt_mode" != relink; then
8239 if test prog = "$linkmode" || test relink != "$opt_mode"; then
67978240 add_shlibpath=
67988241 add_dir=
67998242 add=
68008243 lib_linked=yes
68018244 case $hardcode_action in
68028245 immediate | unsupported)
6803 if test "$hardcode_direct" = no; then
6804 add="$dir/$linklib"
8246 if test no = "$hardcode_direct"; then
8247 add=$dir/$linklib
68058248 case $host in
6806 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
6807 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
8249 *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;;
8250 *-*-sysv4*uw2*) add_dir=-L$dir ;;
68088251 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
6809 *-*-unixware7*) add_dir="-L$dir" ;;
8252 *-*-unixware7*) add_dir=-L$dir ;;
68108253 *-*-darwin* )
6811 # if the lib is a (non-dlopened) module then we can not
8254 # if the lib is a (non-dlopened) module then we cannot
68128255 # link against it, someone is ignoring the earlier warnings
68138256 if /usr/bin/file -L $add 2> /dev/null |
6814 $GREP ": [^:]* bundle" >/dev/null ; then
8257 $GREP ": [^:]* bundle" >/dev/null; then
68158258 if test "X$dlopenmodule" != "X$lib"; then
68168259 $ECHO "*** Warning: lib $linklib is a module, not a shared library"
6817 if test -z "$old_library" ; then
8260 if test -z "$old_library"; then
68188261 echo
68198262 echo "*** And there doesn't seem to be a static archive available"
68208263 echo "*** The link will probably fail, sorry"
68218264 else
6822 add="$dir/$old_library"
8265 add=$dir/$old_library
68238266 fi
68248267 elif test -n "$old_library"; then
6825 add="$dir/$old_library"
8268 add=$dir/$old_library
68268269 fi
68278270 fi
68288271 esac
6829 elif test "$hardcode_minus_L" = no; then
8272 elif test no = "$hardcode_minus_L"; then
68308273 case $host in
6831 *-*-sunos*) add_shlibpath="$dir" ;;
8274 *-*-sunos*) add_shlibpath=$dir ;;
68328275 esac
6833 add_dir="-L$dir"
6834 add="-l$name"
6835 elif test "$hardcode_shlibpath_var" = no; then
6836 add_shlibpath="$dir"
6837 add="-l$name"
8276 add_dir=-L$dir
8277 add=-l$name
8278 elif test no = "$hardcode_shlibpath_var"; then
8279 add_shlibpath=$dir
8280 add=-l$name
68388281 else
68398282 lib_linked=no
68408283 fi
68418284 ;;
68428285 relink)
6843 if test "$hardcode_direct" = yes &&
6844 test "$hardcode_direct_absolute" = no; then
6845 add="$dir/$linklib"
6846 elif test "$hardcode_minus_L" = yes; then
6847 add_dir="-L$absdir"
8286 if test yes = "$hardcode_direct" &&
8287 test no = "$hardcode_direct_absolute"; then
8288 add=$dir/$linklib
8289 elif test yes = "$hardcode_minus_L"; then
8290 add_dir=-L$absdir
68488291 # Try looking first in the location we're being installed to.
68498292 if test -n "$inst_prefix_dir"; then
68508293 case $libdir in
68538296 ;;
68548297 esac
68558298 fi
6856 add="-l$name"
6857 elif test "$hardcode_shlibpath_var" = yes; then
6858 add_shlibpath="$dir"
6859 add="-l$name"
8299 add=-l$name
8300 elif test yes = "$hardcode_shlibpath_var"; then
8301 add_shlibpath=$dir
8302 add=-l$name
68608303 else
68618304 lib_linked=no
68628305 fi
68648307 *) lib_linked=no ;;
68658308 esac
68668309
6867 if test "$lib_linked" != yes; then
8310 if test yes != "$lib_linked"; then
68688311 func_fatal_configuration "unsupported hardcode properties"
68698312 fi
68708313
68748317 *) func_append compile_shlibpath "$add_shlibpath:" ;;
68758318 esac
68768319 fi
6877 if test "$linkmode" = prog; then
8320 if test prog = "$linkmode"; then
68788321 test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
68798322 test -n "$add" && compile_deplibs="$add $compile_deplibs"
68808323 else
68818324 test -n "$add_dir" && deplibs="$add_dir $deplibs"
68828325 test -n "$add" && deplibs="$add $deplibs"
6883 if test "$hardcode_direct" != yes &&
6884 test "$hardcode_minus_L" != yes &&
6885 test "$hardcode_shlibpath_var" = yes; then
8326 if test yes != "$hardcode_direct" &&
8327 test yes != "$hardcode_minus_L" &&
8328 test yes = "$hardcode_shlibpath_var"; then
68868329 case :$finalize_shlibpath: in
68878330 *":$libdir:"*) ;;
68888331 *) func_append finalize_shlibpath "$libdir:" ;;
68918334 fi
68928335 fi
68938336
6894 if test "$linkmode" = prog || test "$opt_mode" = relink; then
8337 if test prog = "$linkmode" || test relink = "$opt_mode"; then
68958338 add_shlibpath=
68968339 add_dir=
68978340 add=
68988341 # Finalize command for both is simple: just hardcode it.
6899 if test "$hardcode_direct" = yes &&
6900 test "$hardcode_direct_absolute" = no; then
6901 add="$libdir/$linklib"
6902 elif test "$hardcode_minus_L" = yes; then
6903 add_dir="-L$libdir"
6904 add="-l$name"
6905 elif test "$hardcode_shlibpath_var" = yes; then
8342 if test yes = "$hardcode_direct" &&
8343 test no = "$hardcode_direct_absolute"; then
8344 add=$libdir/$linklib
8345 elif test yes = "$hardcode_minus_L"; then
8346 add_dir=-L$libdir
8347 add=-l$name
8348 elif test yes = "$hardcode_shlibpath_var"; then
69068349 case :$finalize_shlibpath: in
69078350 *":$libdir:"*) ;;
69088351 *) func_append finalize_shlibpath "$libdir:" ;;
69098352 esac
6910 add="-l$name"
6911 elif test "$hardcode_automatic" = yes; then
8353 add=-l$name
8354 elif test yes = "$hardcode_automatic"; then
69128355 if test -n "$inst_prefix_dir" &&
6913 test -f "$inst_prefix_dir$libdir/$linklib" ; then
6914 add="$inst_prefix_dir$libdir/$linklib"
8356 test -f "$inst_prefix_dir$libdir/$linklib"; then
8357 add=$inst_prefix_dir$libdir/$linklib
69158358 else
6916 add="$libdir/$linklib"
8359 add=$libdir/$linklib
69178360 fi
69188361 else
69198362 # We cannot seem to hardcode it, guess we'll fake it.
6920 add_dir="-L$libdir"
8363 add_dir=-L$libdir
69218364 # Try looking first in the location we're being installed to.
69228365 if test -n "$inst_prefix_dir"; then
69238366 case $libdir in
69268369 ;;
69278370 esac
69288371 fi
6929 add="-l$name"
8372 add=-l$name
69308373 fi
69318374
6932 if test "$linkmode" = prog; then
8375 if test prog = "$linkmode"; then
69338376 test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
69348377 test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
69358378 else
69378380 test -n "$add" && deplibs="$add $deplibs"
69388381 fi
69398382 fi
6940 elif test "$linkmode" = prog; then
8383 elif test prog = "$linkmode"; then
69418384 # Here we assume that one of hardcode_direct or hardcode_minus_L
69428385 # is not unsupported. This is valid on all known static and
69438386 # shared platforms.
6944 if test "$hardcode_direct" != unsupported; then
6945 test -n "$old_library" && linklib="$old_library"
8387 if test unsupported != "$hardcode_direct"; then
8388 test -n "$old_library" && linklib=$old_library
69468389 compile_deplibs="$dir/$linklib $compile_deplibs"
69478390 finalize_deplibs="$dir/$linklib $finalize_deplibs"
69488391 else
69498392 compile_deplibs="-l$name -L$dir $compile_deplibs"
69508393 finalize_deplibs="-l$name -L$dir $finalize_deplibs"
69518394 fi
6952 elif test "$build_libtool_libs" = yes; then
8395 elif test yes = "$build_libtool_libs"; then
69538396 # Not a shared library
6954 if test "$deplibs_check_method" != pass_all; then
8397 if test pass_all != "$deplibs_check_method"; then
69558398 # We're trying link a shared library against a static one
69568399 # but the system doesn't support it.
69578400
69588401 # Just print a warning and add the library to dependency_libs so
69598402 # that the program can be linked against the static library.
69608403 echo
6961 $ECHO "*** Warning: This system can not link to static lib archive $lib."
8404 $ECHO "*** Warning: This system cannot link to static lib archive $lib."
69628405 echo "*** I have the capability to make that library automatically link in when"
69638406 echo "*** you link to this library. But I can only do this if you have a"
69648407 echo "*** shared version of the library, which you do not appear to have."
6965 if test "$module" = yes; then
8408 if test yes = "$module"; then
69668409 echo "*** But as you try to build a module library, libtool will still create "
69678410 echo "*** a static module, that should work as long as the dlopening application"
69688411 echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
69698412 if test -z "$global_symbol_pipe"; then
69708413 echo
69718414 echo "*** However, this would only work if libtool was able to extract symbol"
6972 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
8415 echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
69738416 echo "*** not find such a program. So, this module is probably useless."
6974 echo "*** \`nm' from GNU binutils and a full rebuild may help."
8417 echo "*** 'nm' from GNU binutils and a full rebuild may help."
69758418 fi
6976 if test "$build_old_libs" = no; then
8419 if test no = "$build_old_libs"; then
69778420 build_libtool_libs=module
69788421 build_old_libs=yes
69798422 else
69868429 fi
69878430 fi # link shared/static library?
69888431
6989 if test "$linkmode" = lib; then
8432 if test lib = "$linkmode"; then
69908433 if test -n "$dependency_libs" &&
6991 { test "$hardcode_into_libs" != yes ||
6992 test "$build_old_libs" = yes ||
6993 test "$link_static" = yes; }; then
8434 { test yes != "$hardcode_into_libs" ||
8435 test yes = "$build_old_libs" ||
8436 test yes = "$link_static"; }; then
69948437 # Extract -R from dependency_libs
69958438 temp_deplibs=
69968439 for libdir in $dependency_libs; do
70048447 *) func_append temp_deplibs " $libdir";;
70058448 esac
70068449 done
7007 dependency_libs="$temp_deplibs"
8450 dependency_libs=$temp_deplibs
70088451 fi
70098452
70108453 func_append newlib_search_path " $absdir"
70118454 # Link against this library
7012 test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
8455 test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
70138456 # ... and its dependency_libs
70148457 tmp_libs=
70158458 for deplib in $dependency_libs; do
70198462 func_resolve_sysroot "$func_stripname_result";;
70208463 *) func_resolve_sysroot "$deplib" ;;
70218464 esac
7022 if $opt_preserve_dup_deps ; then
8465 if $opt_preserve_dup_deps; then
70238466 case "$tmp_libs " in
70248467 *" $func_resolve_sysroot_result "*)
70258468 func_append specialdeplibs " $func_resolve_sysroot_result" ;;
70288471 func_append tmp_libs " $func_resolve_sysroot_result"
70298472 done
70308473
7031 if test "$link_all_deplibs" != no; then
8474 if test no != "$link_all_deplibs"; then
70328475 # Add the search paths of all dependency libraries
70338476 for deplib in $dependency_libs; do
70348477 path=
70358478 case $deplib in
7036 -L*) path="$deplib" ;;
8479 -L*) path=$deplib ;;
70378480 *.la)
70388481 func_resolve_sysroot "$deplib"
70398482 deplib=$func_resolve_sysroot_result
70418484 dir=$func_dirname_result
70428485 # We need an absolute path.
70438486 case $dir in
7044 [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
8487 [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;;
70458488 *)
70468489 absdir=`cd "$dir" && pwd`
70478490 if test -z "$absdir"; then
7048 func_warning "cannot determine absolute directory name of \`$dir'"
7049 absdir="$dir"
8491 func_warning "cannot determine absolute directory name of '$dir'"
8492 absdir=$dir
70508493 fi
70518494 ;;
70528495 esac
70548497 case $host in
70558498 *-*-darwin*)
70568499 depdepl=
7057 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
7058 if test -n "$deplibrary_names" ; then
7059 for tmp in $deplibrary_names ; do
8500 eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
8501 if test -n "$deplibrary_names"; then
8502 for tmp in $deplibrary_names; do
70608503 depdepl=$tmp
70618504 done
7062 if test -f "$absdir/$objdir/$depdepl" ; then
7063 depdepl="$absdir/$objdir/$depdepl"
7064 darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
8505 if test -f "$absdir/$objdir/$depdepl"; then
8506 depdepl=$absdir/$objdir/$depdepl
8507 darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
70658508 if test -z "$darwin_install_name"; then
7066 darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
8509 darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
70678510 fi
7068 func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
7069 func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
8511 func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl"
8512 func_append linker_flags " -dylib_file $darwin_install_name:$depdepl"
70708513 path=
70718514 fi
70728515 fi
70738516 ;;
70748517 *)
7075 path="-L$absdir/$objdir"
8518 path=-L$absdir/$objdir
70768519 ;;
70778520 esac
70788521 else
7079 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
8522 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
70808523 test -z "$libdir" && \
7081 func_fatal_error "\`$deplib' is not a valid libtool archive"
8524 func_fatal_error "'$deplib' is not a valid libtool archive"
70828525 test "$absdir" != "$libdir" && \
7083 func_warning "\`$deplib' seems to be moved"
7084
7085 path="-L$absdir"
8526 func_warning "'$deplib' seems to be moved"
8527
8528 path=-L$absdir
70868529 fi
70878530 ;;
70888531 esac
70948537 fi # link_all_deplibs != no
70958538 fi # linkmode = lib
70968539 done # for deplib in $libs
7097 if test "$pass" = link; then
7098 if test "$linkmode" = "prog"; then
8540 if test link = "$pass"; then
8541 if test prog = "$linkmode"; then
70998542 compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
71008543 finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
71018544 else
71028545 compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
71038546 fi
71048547 fi
7105 dependency_libs="$newdependency_libs"
7106 if test "$pass" = dlpreopen; then
8548 dependency_libs=$newdependency_libs
8549 if test dlpreopen = "$pass"; then
71078550 # Link the dlpreopened libraries before other libraries
71088551 for deplib in $save_deplibs; do
71098552 deplibs="$deplib $deplibs"
71108553 done
71118554 fi
7112 if test "$pass" != dlopen; then
7113 if test "$pass" != conv; then
8555 if test dlopen != "$pass"; then
8556 test conv = "$pass" || {
71148557 # Make sure lib_search_path contains only unique directories.
71158558 lib_search_path=
71168559 for dir in $newlib_search_path; do
71208563 esac
71218564 done
71228565 newlib_search_path=
7123 fi
7124
7125 if test "$linkmode,$pass" != "prog,link"; then
7126 vars="deplibs"
8566 }
8567
8568 if test prog,link = "$linkmode,$pass"; then
8569 vars="compile_deplibs finalize_deplibs"
71278570 else
7128 vars="compile_deplibs finalize_deplibs"
8571 vars=deplibs
71298572 fi
71308573 for var in $vars dependency_libs; do
71318574 # Add libraries to $var in reverse order
71838626 eval $var=\"$tmp_libs\"
71848627 done # for var
71858628 fi
8629
8630 # Add Sun CC postdeps if required:
8631 test CXX = "$tagname" && {
8632 case $host_os in
8633 linux*)
8634 case `$CC -V 2>&1 | sed 5q` in
8635 *Sun\ C*) # Sun C++ 5.9
8636 func_suncc_cstd_abi
8637
8638 if test no != "$suncc_use_cstd_abi"; then
8639 func_append postdeps ' -library=Cstd -library=Crun'
8640 fi
8641 ;;
8642 esac
8643 ;;
8644
8645 solaris*)
8646 func_cc_basename "$CC"
8647 case $func_cc_basename_result in
8648 CC* | sunCC*)
8649 func_suncc_cstd_abi
8650
8651 if test no != "$suncc_use_cstd_abi"; then
8652 func_append postdeps ' -library=Cstd -library=Crun'
8653 fi
8654 ;;
8655 esac
8656 ;;
8657 esac
8658 }
8659
71868660 # Last step: remove runtime libs from dependency_libs
71878661 # (they stay in deplibs)
71888662 tmp_libs=
7189 for i in $dependency_libs ; do
8663 for i in $dependency_libs; do
71908664 case " $predeps $postdeps $compiler_lib_search_path " in
71918665 *" $i "*)
7192 i=""
8666 i=
71938667 ;;
71948668 esac
7195 if test -n "$i" ; then
8669 if test -n "$i"; then
71968670 func_append tmp_libs " $i"
71978671 fi
71988672 done
71998673 dependency_libs=$tmp_libs
72008674 done # for pass
7201 if test "$linkmode" = prog; then
7202 dlfiles="$newdlfiles"
8675 if test prog = "$linkmode"; then
8676 dlfiles=$newdlfiles
72038677 fi
7204 if test "$linkmode" = prog || test "$linkmode" = lib; then
7205 dlprefiles="$newdlprefiles"
8678 if test prog = "$linkmode" || test lib = "$linkmode"; then
8679 dlprefiles=$newdlprefiles
72068680 fi
72078681
72088682 case $linkmode in
72098683 oldlib)
7210 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
7211 func_warning "\`-dlopen' is ignored for archives"
8684 if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
8685 func_warning "'-dlopen' is ignored for archives"
72128686 fi
72138687
72148688 case " $deplibs" in
72158689 *\ -l* | *\ -L*)
7216 func_warning "\`-l' and \`-L' are ignored for archives" ;;
8690 func_warning "'-l' and '-L' are ignored for archives" ;;
72178691 esac
72188692
72198693 test -n "$rpath" && \
7220 func_warning "\`-rpath' is ignored for archives"
8694 func_warning "'-rpath' is ignored for archives"
72218695
72228696 test -n "$xrpath" && \
7223 func_warning "\`-R' is ignored for archives"
8697 func_warning "'-R' is ignored for archives"
72248698
72258699 test -n "$vinfo" && \
7226 func_warning "\`-version-info/-version-number' is ignored for archives"
8700 func_warning "'-version-info/-version-number' is ignored for archives"
72278701
72288702 test -n "$release" && \
7229 func_warning "\`-release' is ignored for archives"
8703 func_warning "'-release' is ignored for archives"
72308704
72318705 test -n "$export_symbols$export_symbols_regex" && \
7232 func_warning "\`-export-symbols' is ignored for archives"
8706 func_warning "'-export-symbols' is ignored for archives"
72338707
72348708 # Now set the variables for building old libraries.
72358709 build_libtool_libs=no
7236 oldlibs="$output"
8710 oldlibs=$output
72378711 func_append objs "$old_deplibs"
72388712 ;;
72398713
72408714 lib)
7241 # Make sure we only generate libraries of the form `libNAME.la'.
8715 # Make sure we only generate libraries of the form 'libNAME.la'.
72428716 case $outputname in
72438717 lib*)
72448718 func_stripname 'lib' '.la' "$outputname"
72478721 eval libname=\"$libname_spec\"
72488722 ;;
72498723 *)
7250 test "$module" = no && \
7251 func_fatal_help "libtool library \`$output' must begin with \`lib'"
7252
7253 if test "$need_lib_prefix" != no; then
8724 test no = "$module" \
8725 && func_fatal_help "libtool library '$output' must begin with 'lib'"
8726
8727 if test no != "$need_lib_prefix"; then
72548728 # Add the "lib" prefix for modules if required
72558729 func_stripname '' '.la' "$outputname"
72568730 name=$func_stripname_result
72648738 esac
72658739
72668740 if test -n "$objs"; then
7267 if test "$deplibs_check_method" != pass_all; then
7268 func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
8741 if test pass_all != "$deplibs_check_method"; then
8742 func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs"
72698743 else
72708744 echo
72718745 $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
72748748 fi
72758749 fi
72768750
7277 test "$dlself" != no && \
7278 func_warning "\`-dlopen self' is ignored for libtool libraries"
8751 test no = "$dlself" \
8752 || func_warning "'-dlopen self' is ignored for libtool libraries"
72798753
72808754 set dummy $rpath
72818755 shift
7282 test "$#" -gt 1 && \
7283 func_warning "ignoring multiple \`-rpath's for a libtool library"
7284
7285 install_libdir="$1"
8756 test 1 -lt "$#" \
8757 && func_warning "ignoring multiple '-rpath's for a libtool library"
8758
8759 install_libdir=$1
72868760
72878761 oldlibs=
72888762 if test -z "$rpath"; then
7289 if test "$build_libtool_libs" = yes; then
8763 if test yes = "$build_libtool_libs"; then
72908764 # Building a libtool convenience library.
7291 # Some compilers have problems with a `.al' extension so
8765 # Some compilers have problems with a '.al' extension so
72928766 # convenience libraries should have the same extension an
72938767 # archive normally would.
72948768 oldlibs="$output_objdir/$libname.$libext $oldlibs"
72978771 fi
72988772
72998773 test -n "$vinfo" && \
7300 func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
8774 func_warning "'-version-info/-version-number' is ignored for convenience libraries"
73018775
73028776 test -n "$release" && \
7303 func_warning "\`-release' is ignored for convenience libraries"
8777 func_warning "'-release' is ignored for convenience libraries"
73048778 else
73058779
73068780 # Parse the version information argument.
7307 save_ifs="$IFS"; IFS=':'
8781 save_ifs=$IFS; IFS=:
73088782 set dummy $vinfo 0 0 0
73098783 shift
7310 IFS="$save_ifs"
8784 IFS=$save_ifs
73118785
73128786 test -n "$7" && \
7313 func_fatal_help "too many parameters to \`-version-info'"
8787 func_fatal_help "too many parameters to '-version-info'"
73148788
73158789 # convert absolute version numbers to libtool ages
73168790 # this retains compatibility with .la files and attempts
73188792
73198793 case $vinfo_number in
73208794 yes)
7321 number_major="$1"
7322 number_minor="$2"
7323 number_revision="$3"
8795 number_major=$1
8796 number_minor=$2
8797 number_revision=$3
73248798 #
73258799 # There are really only two kinds -- those that
73268800 # use the current revision as the major version
73278801 # and those that subtract age and use age as
73288802 # a minor version. But, then there is irix
7329 # which has an extra 1 added just for fun
8803 # that has an extra 1 added just for fun
73308804 #
73318805 case $version_type in
73328806 # correct linux to gnu/linux during the next big refactor
7333 darwin|linux|osf|windows|none)
8807 darwin|freebsd-elf|linux|osf|windows|none)
73348808 func_arith $number_major + $number_minor
73358809 current=$func_arith_result
7336 age="$number_minor"
7337 revision="$number_revision"
8810 age=$number_minor
8811 revision=$number_revision
73388812 ;;
7339 freebsd-aout|freebsd-elf|qnx|sunos)
7340 current="$number_major"
7341 revision="$number_minor"
7342 age="0"
8813 freebsd-aout|qnx|sunos)
8814 current=$number_major
8815 revision=$number_minor
8816 age=0
73438817 ;;
73448818 irix|nonstopux)
73458819 func_arith $number_major + $number_minor
73468820 current=$func_arith_result
7347 age="$number_minor"
7348 revision="$number_minor"
8821 age=$number_minor
8822 revision=$number_minor
73498823 lt_irix_increment=no
73508824 ;;
73518825 esac
73528826 ;;
73538827 no)
7354 current="$1"
7355 revision="$2"
7356 age="$3"
8828 current=$1
8829 revision=$2
8830 age=$3
73578831 ;;
73588832 esac
73598833
73618835 case $current in
73628836 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
73638837 *)
7364 func_error "CURRENT \`$current' must be a nonnegative integer"
7365 func_fatal_error "\`$vinfo' is not valid version information"
8838 func_error "CURRENT '$current' must be a nonnegative integer"
8839 func_fatal_error "'$vinfo' is not valid version information"
73668840 ;;
73678841 esac
73688842
73698843 case $revision in
73708844 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
73718845 *)
7372 func_error "REVISION \`$revision' must be a nonnegative integer"
7373 func_fatal_error "\`$vinfo' is not valid version information"
8846 func_error "REVISION '$revision' must be a nonnegative integer"
8847 func_fatal_error "'$vinfo' is not valid version information"
73748848 ;;
73758849 esac
73768850
73778851 case $age in
73788852 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
73798853 *)
7380 func_error "AGE \`$age' must be a nonnegative integer"
7381 func_fatal_error "\`$vinfo' is not valid version information"
8854 func_error "AGE '$age' must be a nonnegative integer"
8855 func_fatal_error "'$vinfo' is not valid version information"
73828856 ;;
73838857 esac
73848858
73858859 if test "$age" -gt "$current"; then
7386 func_error "AGE \`$age' is greater than the current interface number \`$current'"
7387 func_fatal_error "\`$vinfo' is not valid version information"
8860 func_error "AGE '$age' is greater than the current interface number '$current'"
8861 func_fatal_error "'$vinfo' is not valid version information"
73888862 fi
73898863
73908864 # Calculate the version variables.
73998873 # verstring for coding it into the library header
74008874 func_arith $current - $age
74018875 major=.$func_arith_result
7402 versuffix="$major.$age.$revision"
8876 versuffix=$major.$age.$revision
74038877 # Darwin ld doesn't like 0 for these options...
74048878 func_arith $current + 1
74058879 minor_current=$func_arith_result
7406 xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
8880 xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
74078881 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
8882 # On Darwin other compilers
8883 case $CC in
8884 nagfor*)
8885 verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
8886 ;;
8887 *)
8888 verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
8889 ;;
8890 esac
74088891 ;;
74098892
74108893 freebsd-aout)
7411 major=".$current"
7412 versuffix=".$current.$revision";
8894 major=.$current
8895 versuffix=.$current.$revision
74138896 ;;
74148897
74158898 freebsd-elf)
7416 major=".$current"
7417 versuffix=".$current"
8899 func_arith $current - $age
8900 major=.$func_arith_result
8901 versuffix=$major.$age.$revision
74188902 ;;
74198903
74208904 irix | nonstopux)
7421 if test "X$lt_irix_increment" = "Xno"; then
8905 if test no = "$lt_irix_increment"; then
74228906 func_arith $current - $age
74238907 else
74248908 func_arith $current - $age + 1
74298913 nonstopux) verstring_prefix=nonstopux ;;
74308914 *) verstring_prefix=sgi ;;
74318915 esac
7432 verstring="$verstring_prefix$major.$revision"
8916 verstring=$verstring_prefix$major.$revision
74338917
74348918 # Add in all the interfaces that we are compatible with.
74358919 loop=$revision
7436 while test "$loop" -ne 0; do
8920 while test 0 -ne "$loop"; do
74378921 func_arith $revision - $loop
74388922 iface=$func_arith_result
74398923 func_arith $loop - 1
74408924 loop=$func_arith_result
7441 verstring="$verstring_prefix$major.$iface:$verstring"
8925 verstring=$verstring_prefix$major.$iface:$verstring
74428926 done
74438927
7444 # Before this point, $major must not contain `.'.
8928 # Before this point, $major must not contain '.'.
74458929 major=.$major
7446 versuffix="$major.$revision"
8930 versuffix=$major.$revision
74478931 ;;
74488932
74498933 linux) # correct to gnu/linux during the next big refactor
74508934 func_arith $current - $age
74518935 major=.$func_arith_result
7452 versuffix="$major.$age.$revision"
8936 versuffix=$major.$age.$revision
74538937 ;;
74548938
74558939 osf)
74568940 func_arith $current - $age
74578941 major=.$func_arith_result
7458 versuffix=".$current.$age.$revision"
7459 verstring="$current.$age.$revision"
8942 versuffix=.$current.$age.$revision
8943 verstring=$current.$age.$revision
74608944
74618945 # Add in all the interfaces that we are compatible with.
74628946 loop=$age
7463 while test "$loop" -ne 0; do
8947 while test 0 -ne "$loop"; do
74648948 func_arith $current - $loop
74658949 iface=$func_arith_result
74668950 func_arith $loop - 1
74678951 loop=$func_arith_result
7468 verstring="$verstring:${iface}.0"
8952 verstring=$verstring:$iface.0
74698953 done
74708954
74718955 # Make executables depend on our current version.
7472 func_append verstring ":${current}.0"
8956 func_append verstring ":$current.0"
74738957 ;;
74748958
74758959 qnx)
7476 major=".$current"
7477 versuffix=".$current"
8960 major=.$current
8961 versuffix=.$current
74788962 ;;
74798963
8964 sco)
8965 major=.$current
8966 versuffix=.$current
8967 ;;
8968
74808969 sunos)
7481 major=".$current"
7482 versuffix=".$current.$revision"
8970 major=.$current
8971 versuffix=.$current.$revision
74838972 ;;
74848973
74858974 windows)
74868975 # Use '-' rather than '.', since we only want one
7487 # extension on DOS 8.3 filesystems.
8976 # extension on DOS 8.3 file systems.
74888977 func_arith $current - $age
74898978 major=$func_arith_result
7490 versuffix="-$major"
8979 versuffix=-$major
74918980 ;;
74928981
74938982 *)
7494 func_fatal_configuration "unknown library version type \`$version_type'"
8983 func_fatal_configuration "unknown library version type '$version_type'"
74958984 ;;
74968985 esac
74978986
75058994 verstring=
75068995 ;;
75078996 *)
7508 verstring="0.0"
8997 verstring=0.0
75098998 ;;
75108999 esac
7511 if test "$need_version" = no; then
9000 if test no = "$need_version"; then
75129001 versuffix=
75139002 else
7514 versuffix=".0.0"
9003 versuffix=.0.0
75159004 fi
75169005 fi
75179006
75189007 # Remove version info from name if versioning should be avoided
7519 if test "$avoid_version" = yes && test "$need_version" = no; then
9008 if test yes,no = "$avoid_version,$need_version"; then
75209009 major=
75219010 versuffix=
7522 verstring=""
9011 verstring=
75239012 fi
75249013
75259014 # Check to see if the archive will have undefined symbols.
7526 if test "$allow_undefined" = yes; then
7527 if test "$allow_undefined_flag" = unsupported; then
7528 func_warning "undefined symbols not allowed in $host shared libraries"
7529 build_libtool_libs=no
7530 build_old_libs=yes
9015 if test yes = "$allow_undefined"; then
9016 if test unsupported = "$allow_undefined_flag"; then
9017 if test yes = "$build_old_libs"; then
9018 func_warning "undefined symbols not allowed in $host shared libraries; building static only"
9019 build_libtool_libs=no
9020 else
9021 func_fatal_error "can't build $host shared library unless -no-undefined is specified"
9022 fi
75319023 fi
75329024 else
75339025 # Don't allow undefined symbols.
7534 allow_undefined_flag="$no_undefined_flag"
9026 allow_undefined_flag=$no_undefined_flag
75359027 fi
75369028
75379029 fi
75389030
7539 func_generate_dlsyms "$libname" "$libname" "yes"
9031 func_generate_dlsyms "$libname" "$libname" :
75409032 func_append libobjs " $symfileobj"
7541 test "X$libobjs" = "X " && libobjs=
7542
7543 if test "$opt_mode" != relink; then
9033 test " " = "$libobjs" && libobjs=
9034
9035 if test relink != "$opt_mode"; then
75449036 # Remove our outputs, but don't remove object files since they
75459037 # may have been created when compiling PIC objects.
75469038 removelist=
75499041 case $p in
75509042 *.$objext | *.gcno)
75519043 ;;
7552 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
7553 if test "X$precious_files_regex" != "X"; then
9044 $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*)
9045 if test -n "$precious_files_regex"; then
75549046 if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
75559047 then
75569048 continue
75669058 fi
75679059
75689060 # Now set the variables for building old libraries.
7569 if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
9061 if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then
75709062 func_append oldlibs " $output_objdir/$libname.$libext"
75719063
75729064 # Transform .lo files to .o files.
7573 oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
9065 oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP`
75749066 fi
75759067
75769068 # Eliminate all temporary directories.
75919083 *) func_append finalize_rpath " $libdir" ;;
75929084 esac
75939085 done
7594 if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
9086 if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then
75959087 dependency_libs="$temp_xrpath $dependency_libs"
75969088 fi
75979089 fi
75989090
75999091 # Make sure dlfiles contains only unique files that won't be dlpreopened
7600 old_dlfiles="$dlfiles"
9092 old_dlfiles=$dlfiles
76019093 dlfiles=
76029094 for lib in $old_dlfiles; do
76039095 case " $dlprefiles $dlfiles " in
76079099 done
76089100
76099101 # Make sure dlprefiles contains only unique files
7610 old_dlprefiles="$dlprefiles"
9102 old_dlprefiles=$dlprefiles
76119103 dlprefiles=
76129104 for lib in $old_dlprefiles; do
76139105 case "$dlprefiles " in
76169108 esac
76179109 done
76189110
7619 if test "$build_libtool_libs" = yes; then
9111 if test yes = "$build_libtool_libs"; then
76209112 if test -n "$rpath"; then
76219113 case $host in
76229114 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
76409132 ;;
76419133 *)
76429134 # Add libc to deplibs on all other systems if necessary.
7643 if test "$build_libtool_need_lc" = "yes"; then
9135 if test yes = "$build_libtool_need_lc"; then
76449136 func_append deplibs " -lc"
76459137 fi
76469138 ;;
76569148 # I'm not sure if I'm treating the release correctly. I think
76579149 # release should show up in the -l (ie -lgmp5) so we don't want to
76589150 # add it in twice. Is that correct?
7659 release=""
7660 versuffix=""
7661 major=""
9151 release=
9152 versuffix=
9153 major=
76629154 newdeplibs=
76639155 droppeddeps=no
76649156 case $deplibs_check_method in
76879179 -l*)
76889180 func_stripname -l '' "$i"
76899181 name=$func_stripname_result
7690 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
9182 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
76919183 case " $predeps $postdeps " in
76929184 *" $i "*)
76939185 func_append newdeplibs " $i"
7694 i=""
9186 i=
76959187 ;;
76969188 esac
76979189 fi
7698 if test -n "$i" ; then
9190 if test -n "$i"; then
76999191 libname=`eval "\\$ECHO \"$libname_spec\""`
77009192 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
77019193 set dummy $deplib_matches; shift
77029194 deplib_match=$1
7703 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
9195 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
77049196 func_append newdeplibs " $i"
77059197 else
77069198 droppeddeps=yes
77309222 $opt_dry_run || $RM conftest
77319223 if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
77329224 ldd_output=`ldd conftest`
7733 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
9225 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
77349226 case " $predeps $postdeps " in
77359227 *" $i "*)
77369228 func_append newdeplibs " $i"
7737 i=""
9229 i=
77389230 ;;
77399231 esac
77409232 fi
7741 if test -n "$i" ; then
9233 if test -n "$i"; then
77429234 libname=`eval "\\$ECHO \"$libname_spec\""`
77439235 deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
77449236 set dummy $deplib_matches; shift
77459237 deplib_match=$1
7746 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
9238 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then
77479239 func_append newdeplibs " $i"
77489240 else
77499241 droppeddeps=yes
77809272 -l*)
77819273 func_stripname -l '' "$a_deplib"
77829274 name=$func_stripname_result
7783 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
9275 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
77849276 case " $predeps $postdeps " in
77859277 *" $a_deplib "*)
77869278 func_append newdeplibs " $a_deplib"
7787 a_deplib=""
9279 a_deplib=
77889280 ;;
77899281 esac
77909282 fi
7791 if test -n "$a_deplib" ; then
9283 if test -n "$a_deplib"; then
77929284 libname=`eval "\\$ECHO \"$libname_spec\""`
77939285 if test -n "$file_magic_glob"; then
77949286 libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
77959287 else
77969288 libnameglob=$libname
77979289 fi
7798 test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
9290 test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob`
77999291 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
7800 if test "$want_nocaseglob" = yes; then
9292 if test yes = "$want_nocaseglob"; then
78019293 shopt -s nocaseglob
78029294 potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
78039295 $nocaseglob
78159307 # We might still enter an endless loop, since a link
78169308 # loop can be closed while we follow links,
78179309 # but so what?
7818 potlib="$potent_lib"
9310 potlib=$potent_lib
78199311 while test -h "$potlib" 2>/dev/null; do
7820 potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
9312 potliblink=`ls -ld $potlib | $SED 's/.* -> //'`
78219313 case $potliblink in
7822 [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
7823 *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
9314 [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;;
9315 *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";;
78249316 esac
78259317 done
78269318 if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
78279319 $SED -e 10q |
78289320 $EGREP "$file_magic_regex" > /dev/null; then
78299321 func_append newdeplibs " $a_deplib"
7830 a_deplib=""
9322 a_deplib=
78319323 break 2
78329324 fi
78339325 done
78349326 done
78359327 fi
7836 if test -n "$a_deplib" ; then
9328 if test -n "$a_deplib"; then
78379329 droppeddeps=yes
78389330 echo
78399331 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
78419333 echo "*** you link to this library. But I can only do this if you have a"
78429334 echo "*** shared version of the library, which you do not appear to have"
78439335 echo "*** because I did check the linker path looking for a file starting"
7844 if test -z "$potlib" ; then
9336 if test -z "$potlib"; then
78459337 $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
78469338 else
78479339 $ECHO "*** with $libname and none of the candidates passed a file format test"
78649356 -l*)
78659357 func_stripname -l '' "$a_deplib"
78669358 name=$func_stripname_result
7867 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
9359 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
78689360 case " $predeps $postdeps " in
78699361 *" $a_deplib "*)
78709362 func_append newdeplibs " $a_deplib"
7871 a_deplib=""
9363 a_deplib=
78729364 ;;
78739365 esac
78749366 fi
7875 if test -n "$a_deplib" ; then
9367 if test -n "$a_deplib"; then
78769368 libname=`eval "\\$ECHO \"$libname_spec\""`
78779369 for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
78789370 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
78799371 for potent_lib in $potential_libs; do
7880 potlib="$potent_lib" # see symlink-check above in file_magic test
9372 potlib=$potent_lib # see symlink-check above in file_magic test
78819373 if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
78829374 $EGREP "$match_pattern_regex" > /dev/null; then
78839375 func_append newdeplibs " $a_deplib"
7884 a_deplib=""
9376 a_deplib=
78859377 break 2
78869378 fi
78879379 done
78889380 done
78899381 fi
7890 if test -n "$a_deplib" ; then
9382 if test -n "$a_deplib"; then
78919383 droppeddeps=yes
78929384 echo
78939385 $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
78959387 echo "*** you link to this library. But I can only do this if you have a"
78969388 echo "*** shared version of the library, which you do not appear to have"
78979389 echo "*** because I did check the linker path looking for a file starting"
7898 if test -z "$potlib" ; then
9390 if test -z "$potlib"; then
78999391 $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
79009392 else
79019393 $ECHO "*** with $libname and none of the candidates passed a file format test"
79119403 done # Gone through all deplibs.
79129404 ;;
79139405 none | unknown | *)
7914 newdeplibs=""
9406 newdeplibs=
79159407 tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
7916 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
7917 for i in $predeps $postdeps ; do
9408 if test yes = "$allow_libtool_libs_with_static_runtimes"; then
9409 for i in $predeps $postdeps; do
79189410 # can't use Xsed below, because $i might contain '/'
7919 tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
9411 tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"`
79209412 done
79219413 fi
79229414 case $tmp_deplibs in
79239415 *[!\ \ ]*)
79249416 echo
7925 if test "X$deplibs_check_method" = "Xnone"; then
9417 if test none = "$deplibs_check_method"; then
79269418 echo "*** Warning: inter-library dependencies are not supported in this platform."
79279419 else
79289420 echo "*** Warning: inter-library dependencies are not known to be supported."
79469438 ;;
79479439 esac
79489440
7949 if test "$droppeddeps" = yes; then
7950 if test "$module" = yes; then
9441 if test yes = "$droppeddeps"; then
9442 if test yes = "$module"; then
79519443 echo
79529444 echo "*** Warning: libtool could not satisfy all declared inter-library"
79539445 $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
79569448 if test -z "$global_symbol_pipe"; then
79579449 echo
79589450 echo "*** However, this would only work if libtool was able to extract symbol"
7959 echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
9451 echo "*** lists from a program, using 'nm' or equivalent, but libtool could"
79609452 echo "*** not find such a program. So, this module is probably useless."
7961 echo "*** \`nm' from GNU binutils and a full rebuild may help."
9453 echo "*** 'nm' from GNU binutils and a full rebuild may help."
79629454 fi
7963 if test "$build_old_libs" = no; then
7964 oldlibs="$output_objdir/$libname.$libext"
9455 if test no = "$build_old_libs"; then
9456 oldlibs=$output_objdir/$libname.$libext
79659457 build_libtool_libs=module
79669458 build_old_libs=yes
79679459 else
79729464 echo "*** automatically added whenever a program is linked with this library"
79739465 echo "*** or is declared to -dlopen it."
79749466
7975 if test "$allow_undefined" = no; then
9467 if test no = "$allow_undefined"; then
79769468 echo
79779469 echo "*** Since this library must not contain undefined symbols,"
79789470 echo "*** because either the platform does not support them or"
79799471 echo "*** it was explicitly requested with -no-undefined,"
79809472 echo "*** libtool will only create a static version of it."
7981 if test "$build_old_libs" = no; then
7982 oldlibs="$output_objdir/$libname.$libext"
9473 if test no = "$build_old_libs"; then
9474 oldlibs=$output_objdir/$libname.$libext
79839475 build_libtool_libs=module
79849476 build_old_libs=yes
79859477 else
80259517 *) func_append new_libs " $deplib" ;;
80269518 esac
80279519 done
8028 deplibs="$new_libs"
9520 deplibs=$new_libs
80299521
80309522 # All the library-specific variables (install_libdir is set above).
80319523 library_names=
80339525 dlname=
80349526
80359527 # Test again, we may have decided not to build it any more
8036 if test "$build_libtool_libs" = yes; then
8037 # Remove ${wl} instances when linking with ld.
9528 if test yes = "$build_libtool_libs"; then
9529 # Remove $wl instances when linking with ld.
80389530 # FIXME: should test the right _cmds variable.
80399531 case $archive_cmds in
80409532 *\$LD\ *) wl= ;;
80419533 esac
8042 if test "$hardcode_into_libs" = yes; then
9534 if test yes = "$hardcode_into_libs"; then
80439535 # Hardcode the library paths
80449536 hardcode_libdirs=
80459537 dep_rpath=
8046 rpath="$finalize_rpath"
8047 test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
9538 rpath=$finalize_rpath
9539 test relink = "$opt_mode" || rpath=$compile_rpath$rpath
80489540 for libdir in $rpath; do
80499541 if test -n "$hardcode_libdir_flag_spec"; then
80509542 if test -n "$hardcode_libdir_separator"; then
80519543 func_replace_sysroot "$libdir"
80529544 libdir=$func_replace_sysroot_result
80539545 if test -z "$hardcode_libdirs"; then
8054 hardcode_libdirs="$libdir"
9546 hardcode_libdirs=$libdir
80559547 else
80569548 # Just accumulate the unique libdirs.
80579549 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
80769568 # Substitute the hardcoded libdirs into the rpath.
80779569 if test -n "$hardcode_libdir_separator" &&
80789570 test -n "$hardcode_libdirs"; then
8079 libdir="$hardcode_libdirs"
9571 libdir=$hardcode_libdirs
80809572 eval "dep_rpath=\"$hardcode_libdir_flag_spec\""
80819573 fi
80829574 if test -n "$runpath_var" && test -n "$perm_rpath"; then
80909582 test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
80919583 fi
80929584
8093 shlibpath="$finalize_shlibpath"
8094 test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
9585 shlibpath=$finalize_shlibpath
9586 test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath
80959587 if test -n "$shlibpath"; then
80969588 eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
80979589 fi
81019593 eval library_names=\"$library_names_spec\"
81029594 set dummy $library_names
81039595 shift
8104 realname="$1"
9596 realname=$1
81059597 shift
81069598
81079599 if test -n "$soname_spec"; then
81089600 eval soname=\"$soname_spec\"
81099601 else
8110 soname="$realname"
9602 soname=$realname
81119603 fi
81129604 if test -z "$dlname"; then
81139605 dlname=$soname
81149606 fi
81159607
8116 lib="$output_objdir/$realname"
9608 lib=$output_objdir/$realname
81179609 linknames=
81189610 for link
81199611 do
81279619 delfiles=
81289620 if test -n "$export_symbols" && test -n "$include_expsyms"; then
81299621 $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
8130 export_symbols="$output_objdir/$libname.uexp"
9622 export_symbols=$output_objdir/$libname.uexp
81319623 func_append delfiles " $export_symbols"
81329624 fi
81339625
81369628 cygwin* | mingw* | cegcc*)
81379629 if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
81389630 # exporting using user supplied symfile
8139 if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
9631 func_dll_def_p "$export_symbols" || {
81409632 # and it's NOT already a .def file. Must figure out
81419633 # which of the given symbols are data symbols and tag
81429634 # them as such. So, trigger use of export_symbols_cmds.
81439635 # export_symbols gets reassigned inside the "prepare
81449636 # the list of exported symbols" if statement, so the
81459637 # include_expsyms logic still works.
8146 orig_export_symbols="$export_symbols"
9638 orig_export_symbols=$export_symbols
81479639 export_symbols=
81489640 always_export_symbols=yes
8149 fi
9641 }
81509642 fi
81519643 ;;
81529644 esac
81539645
81549646 # Prepare the list of exported symbols
81559647 if test -z "$export_symbols"; then
8156 if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
8157 func_verbose "generating symbol list for \`$libname.la'"
8158 export_symbols="$output_objdir/$libname.exp"
9648 if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then
9649 func_verbose "generating symbol list for '$libname.la'"
9650 export_symbols=$output_objdir/$libname.exp
81599651 $opt_dry_run || $RM $export_symbols
81609652 cmds=$export_symbols_cmds
8161 save_ifs="$IFS"; IFS='~'
9653 save_ifs=$IFS; IFS='~'
81629654 for cmd1 in $cmds; do
8163 IFS="$save_ifs"
9655 IFS=$save_ifs
81649656 # Take the normal branch if the nm_file_list_spec branch
81659657 # doesn't work or if tool conversion is not needed.
81669658 case $nm_file_list_spec~$to_tool_file_cmd in
81749666 try_normal_branch=no
81759667 ;;
81769668 esac
8177 if test "$try_normal_branch" = yes \
9669 if test yes = "$try_normal_branch" \
81789670 && { test "$len" -lt "$max_cmd_len" \
81799671 || test "$max_cmd_len" -le -1; }
81809672 then
81859677 output_la=$func_basename_result
81869678 save_libobjs=$libobjs
81879679 save_output=$output
8188 output=${output_objdir}/${output_la}.nm
9680 output=$output_objdir/$output_la.nm
81899681 func_to_tool_file "$output"
81909682 libobjs=$nm_file_list_spec$func_to_tool_file_result
81919683 func_append delfiles " $output"
82089700 break
82099701 fi
82109702 done
8211 IFS="$save_ifs"
8212 if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
9703 IFS=$save_ifs
9704 if test -n "$export_symbols_regex" && test : != "$skipped_export"; then
82139705 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
82149706 func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
82159707 fi
82179709 fi
82189710
82199711 if test -n "$export_symbols" && test -n "$include_expsyms"; then
8220 tmp_export_symbols="$export_symbols"
8221 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
9712 tmp_export_symbols=$export_symbols
9713 test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
82229714 $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
82239715 fi
82249716
8225 if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
9717 if test : != "$skipped_export" && test -n "$orig_export_symbols"; then
82269718 # The given exports_symbols file has to be filtered, so filter it.
8227 func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
9719 func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
82289720 # FIXME: $output_objdir/$libname.filter potentially contains lots of
8229 # 's' commands which not all seds can handle. GNU sed should be fine
9721 # 's' commands, which not all seds can handle. GNU sed should be fine
82309722 # though. Also, the filter scales superlinearly with the number of
82319723 # global variables. join(1) would be nice here, but unfortunately
82329724 # isn't a blessed tool.
82459737 ;;
82469738 esac
82479739 done
8248 deplibs="$tmp_deplibs"
9740 deplibs=$tmp_deplibs
82499741
82509742 if test -n "$convenience"; then
82519743 if test -n "$whole_archive_flag_spec" &&
8252 test "$compiler_needs_object" = yes &&
9744 test yes = "$compiler_needs_object" &&
82539745 test -z "$libobjs"; then
82549746 # extract the archives, so we have objects to list.
82559747 # TODO: could optimize this to just extract one archive.
82609752 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
82619753 test "X$libobjs" = "X " && libobjs=
82629754 else
8263 gentop="$output_objdir/${outputname}x"
9755 gentop=$output_objdir/${outputname}x
82649756 func_append generated " $gentop"
82659757
82669758 func_extract_archives $gentop $convenience
82699761 fi
82709762 fi
82719763
8272 if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
9764 if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then
82739765 eval flag=\"$thread_safe_flag_spec\"
82749766 func_append linker_flags " $flag"
82759767 fi
82769768
82779769 # Make a backup of the uninstalled library when relinking
8278 if test "$opt_mode" = relink; then
9770 if test relink = "$opt_mode"; then
82799771 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
82809772 fi
82819773
82829774 # Do each of the archive commands.
8283 if test "$module" = yes && test -n "$module_cmds" ; then
9775 if test yes = "$module" && test -n "$module_cmds"; then
82849776 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
82859777 eval test_cmds=\"$module_expsym_cmds\"
82869778 cmds=$module_expsym_cmds
82989790 fi
82999791 fi
83009792
8301 if test "X$skipped_export" != "X:" &&
9793 if test : != "$skipped_export" &&
83029794 func_len " $test_cmds" &&
83039795 len=$func_len_result &&
83049796 test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
83319823 last_robj=
83329824 k=1
83339825
8334 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
8335 output=${output_objdir}/${output_la}.lnkscript
9826 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then
9827 output=$output_objdir/$output_la.lnkscript
83369828 func_verbose "creating GNU ld script: $output"
83379829 echo 'INPUT (' > $output
83389830 for obj in $save_libobjs
83449836 func_append delfiles " $output"
83459837 func_to_tool_file "$output"
83469838 output=$func_to_tool_file_result
8347 elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
8348 output=${output_objdir}/${output_la}.lnk
9839 elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then
9840 output=$output_objdir/$output_la.lnk
83499841 func_verbose "creating linker input file list: $output"
83509842 : > $output
83519843 set x $save_libobjs
83529844 shift
83539845 firstobj=
8354 if test "$compiler_needs_object" = yes; then
9846 if test yes = "$compiler_needs_object"; then
83559847 firstobj="$1 "
83569848 shift
83579849 fi
83669858 else
83679859 if test -n "$save_libobjs"; then
83689860 func_verbose "creating reloadable object files..."
8369 output=$output_objdir/$output_la-${k}.$objext
9861 output=$output_objdir/$output_la-$k.$objext
83709862 eval test_cmds=\"$reload_cmds\"
83719863 func_len " $test_cmds"
83729864 len0=$func_len_result
83789870 func_len " $obj"
83799871 func_arith $len + $func_len_result
83809872 len=$func_arith_result
8381 if test "X$objlist" = X ||
9873 if test -z "$objlist" ||
83829874 test "$len" -lt "$max_cmd_len"; then
83839875 func_append objlist " $obj"
83849876 else
83859877 # The command $test_cmds is almost too long, add a
83869878 # command to the queue.
8387 if test "$k" -eq 1 ; then
9879 if test 1 -eq "$k"; then
83889880 # The first file doesn't have a previous command to add.
83899881 reload_objs=$objlist
83909882 eval concat_cmds=\"$reload_cmds\"
83949886 reload_objs="$objlist $last_robj"
83959887 eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
83969888 fi
8397 last_robj=$output_objdir/$output_la-${k}.$objext
9889 last_robj=$output_objdir/$output_la-$k.$objext
83989890 func_arith $k + 1
83999891 k=$func_arith_result
8400 output=$output_objdir/$output_la-${k}.$objext
9892 output=$output_objdir/$output_la-$k.$objext
84019893 objlist=" $obj"
84029894 func_len " $last_robj"
84039895 func_arith $len0 + $func_len_result
84099901 # files will link in the last one created.
84109902 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
84119903 reload_objs="$objlist $last_robj"
8412 eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
9904 eval concat_cmds=\"\$concat_cmds$reload_cmds\"
84139905 if test -n "$last_robj"; then
8414 eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
9906 eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
84159907 fi
84169908 func_append delfiles " $output"
84179909
84199911 output=
84209912 fi
84219913
8422 if ${skipped_export-false}; then
8423 func_verbose "generating symbol list for \`$libname.la'"
8424 export_symbols="$output_objdir/$libname.exp"
9914 ${skipped_export-false} && {
9915 func_verbose "generating symbol list for '$libname.la'"
9916 export_symbols=$output_objdir/$libname.exp
84259917 $opt_dry_run || $RM $export_symbols
84269918 libobjs=$output
84279919 # Append the command to create the export file.
84309922 if test -n "$last_robj"; then
84319923 eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
84329924 fi
8433 fi
9925 }
84349926
84359927 test -n "$save_libobjs" &&
84369928 func_verbose "creating a temporary reloadable object file: $output"
84379929
84389930 # Loop through the commands generated above and execute them.
8439 save_ifs="$IFS"; IFS='~'
9931 save_ifs=$IFS; IFS='~'
84409932 for cmd in $concat_cmds; do
8441 IFS="$save_ifs"
8442 $opt_silent || {
9933 IFS=$save_ifs
9934 $opt_quiet || {
84439935 func_quote_for_expand "$cmd"
84449936 eval "func_echo $func_quote_for_expand_result"
84459937 }
84479939 lt_exit=$?
84489940
84499941 # Restore the uninstalled library and exit
8450 if test "$opt_mode" = relink; then
9942 if test relink = "$opt_mode"; then
84519943 ( cd "$output_objdir" && \
84529944 $RM "${realname}T" && \
84539945 $MV "${realname}U" "$realname" )
84569948 exit $lt_exit
84579949 }
84589950 done
8459 IFS="$save_ifs"
9951 IFS=$save_ifs
84609952
84619953 if test -n "$export_symbols_regex" && ${skipped_export-false}; then
84629954 func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
84649956 fi
84659957 fi
84669958
8467 if ${skipped_export-false}; then
9959 ${skipped_export-false} && {
84689960 if test -n "$export_symbols" && test -n "$include_expsyms"; then
8469 tmp_export_symbols="$export_symbols"
8470 test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
9961 tmp_export_symbols=$export_symbols
9962 test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols
84719963 $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
84729964 fi
84739965
84749966 if test -n "$orig_export_symbols"; then
84759967 # The given exports_symbols file has to be filtered, so filter it.
8476 func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
9968 func_verbose "filter symbol list for '$libname.la' to tag DATA exports"
84779969 # FIXME: $output_objdir/$libname.filter potentially contains lots of
8478 # 's' commands which not all seds can handle. GNU sed should be fine
9970 # 's' commands, which not all seds can handle. GNU sed should be fine
84799971 # though. Also, the filter scales superlinearly with the number of
84809972 # global variables. join(1) would be nice here, but unfortunately
84819973 # isn't a blessed tool.
84849976 export_symbols=$output_objdir/$libname.def
84859977 $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
84869978 fi
8487 fi
9979 }
84889980
84899981 libobjs=$output
84909982 # Restore the value of output.
84989990 # value of $libobjs for piecewise linking.
84999991
85009992 # Do each of the archive commands.
8501 if test "$module" = yes && test -n "$module_cmds" ; then
9993 if test yes = "$module" && test -n "$module_cmds"; then
85029994 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
85039995 cmds=$module_expsym_cmds
85049996 else
852010012
852110013 # Add any objects from preloaded convenience libraries
852210014 if test -n "$dlprefiles"; then
8523 gentop="$output_objdir/${outputname}x"
10015 gentop=$output_objdir/${outputname}x
852410016 func_append generated " $gentop"
852510017
852610018 func_extract_archives $gentop $dlprefiles
852810020 test "X$libobjs" = "X " && libobjs=
852910021 fi
853010022
8531 save_ifs="$IFS"; IFS='~'
10023 save_ifs=$IFS; IFS='~'
853210024 for cmd in $cmds; do
8533 IFS="$save_ifs"
10025 IFS=$sp$nl
853410026 eval cmd=\"$cmd\"
8535 $opt_silent || {
10027 IFS=$save_ifs
10028 $opt_quiet || {
853610029 func_quote_for_expand "$cmd"
853710030 eval "func_echo $func_quote_for_expand_result"
853810031 }
854010033 lt_exit=$?
854110034
854210035 # Restore the uninstalled library and exit
8543 if test "$opt_mode" = relink; then
10036 if test relink = "$opt_mode"; then
854410037 ( cd "$output_objdir" && \
854510038 $RM "${realname}T" && \
854610039 $MV "${realname}U" "$realname" )
854910042 exit $lt_exit
855010043 }
855110044 done
8552 IFS="$save_ifs"
10045 IFS=$save_ifs
855310046
855410047 # Restore the uninstalled library and exit
8555 if test "$opt_mode" = relink; then
10048 if test relink = "$opt_mode"; then
855610049 $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
855710050
855810051 if test -n "$convenience"; then
857210065 done
857310066
857410067 # If -module or -export-dynamic was specified, set the dlname.
8575 if test "$module" = yes || test "$export_dynamic" = yes; then
10068 if test yes = "$module" || test yes = "$export_dynamic"; then
857610069 # On all known operating systems, these are identical.
8577 dlname="$soname"
10070 dlname=$soname
857810071 fi
857910072 fi
858010073 ;;
858110074
858210075 obj)
8583 if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
8584 func_warning "\`-dlopen' is ignored for objects"
10076 if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then
10077 func_warning "'-dlopen' is ignored for objects"
858510078 fi
858610079
858710080 case " $deplibs" in
858810081 *\ -l* | *\ -L*)
8589 func_warning "\`-l' and \`-L' are ignored for objects" ;;
10082 func_warning "'-l' and '-L' are ignored for objects" ;;
859010083 esac
859110084
859210085 test -n "$rpath" && \
8593 func_warning "\`-rpath' is ignored for objects"
10086 func_warning "'-rpath' is ignored for objects"
859410087
859510088 test -n "$xrpath" && \
8596 func_warning "\`-R' is ignored for objects"
10089 func_warning "'-R' is ignored for objects"
859710090
859810091 test -n "$vinfo" && \
8599 func_warning "\`-version-info' is ignored for objects"
10092 func_warning "'-version-info' is ignored for objects"
860010093
860110094 test -n "$release" && \
8602 func_warning "\`-release' is ignored for objects"
10095 func_warning "'-release' is ignored for objects"
860310096
860410097 case $output in
860510098 *.lo)
860610099 test -n "$objs$old_deplibs" && \
8607 func_fatal_error "cannot build library object \`$output' from non-libtool objects"
10100 func_fatal_error "cannot build library object '$output' from non-libtool objects"
860810101
860910102 libobj=$output
861010103 func_lo2o "$libobj"
861210105 ;;
861310106 *)
861410107 libobj=
8615 obj="$output"
10108 obj=$output
861610109 ;;
861710110 esac
861810111
862510118 # the extraction.
862610119 reload_conv_objs=
862710120 gentop=
8628 # reload_cmds runs $LD directly, so let us get rid of
8629 # -Wl from whole_archive_flag_spec and hope we can get by with
8630 # turning comma into space..
8631 wl=
8632
10121 # if reload_cmds runs $LD directly, get rid of -Wl from
10122 # whole_archive_flag_spec and hope we can get by with turning comma
10123 # into space.
10124 case $reload_cmds in
10125 *\$LD[\ \$]*) wl= ;;
10126 esac
863310127 if test -n "$convenience"; then
863410128 if test -n "$whole_archive_flag_spec"; then
863510129 eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
8636 reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
10130 test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
10131 reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags
863710132 else
8638 gentop="$output_objdir/${obj}x"
10133 gentop=$output_objdir/${obj}x
863910134 func_append generated " $gentop"
864010135
864110136 func_extract_archives $gentop $convenience
864410139 fi
864510140
864610141 # If we're not building shared, we need to use non_pic_objs
8647 test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
10142 test yes = "$build_libtool_libs" || libobjs=$non_pic_objects
864810143
864910144 # Create the old-style object.
8650 reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
8651
8652 output="$obj"
10145 reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs
10146
10147 output=$obj
865310148 func_execute_cmds "$reload_cmds" 'exit $?'
865410149
865510150 # Exit if we aren't doing a library object file.
866110156 exit $EXIT_SUCCESS
866210157 fi
866310158
8664 if test "$build_libtool_libs" != yes; then
10159 test yes = "$build_libtool_libs" || {
866510160 if test -n "$gentop"; then
866610161 func_show_eval '${RM}r "$gentop"'
866710162 fi
867110166 # $show "echo timestamp > $libobj"
867210167 # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
867310168 exit $EXIT_SUCCESS
8674 fi
8675
8676 if test -n "$pic_flag" || test "$pic_mode" != default; then
10169 }
10170
10171 if test -n "$pic_flag" || test default != "$pic_mode"; then
867710172 # Only do commands if we really have different PIC objects.
867810173 reload_objs="$libobjs $reload_conv_objs"
8679 output="$libobj"
10174 output=$libobj
868010175 func_execute_cmds "$reload_cmds" 'exit $?'
868110176 fi
868210177
869310188 output=$func_stripname_result.exe;;
869410189 esac
869510190 test -n "$vinfo" && \
8696 func_warning "\`-version-info' is ignored for programs"
10191 func_warning "'-version-info' is ignored for programs"
869710192
869810193 test -n "$release" && \
8699 func_warning "\`-release' is ignored for programs"
8700
8701 test "$preload" = yes \
8702 && test "$dlopen_support" = unknown \
8703 && test "$dlopen_self" = unknown \
8704 && test "$dlopen_self_static" = unknown && \
8705 func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
10194 func_warning "'-release' is ignored for programs"
10195
10196 $preload \
10197 && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \
10198 && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support."
870610199
870710200 case $host in
870810201 *-*-rhapsody* | *-*-darwin1.[012])
871610209 *-*-darwin*)
871710210 # Don't allow lazy linking, it breaks C++ global constructors
871810211 # But is supposedly fixed on 10.4 or later (yay!).
8719 if test "$tagname" = CXX ; then
10212 if test CXX = "$tagname"; then
872010213 case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
872110214 10.[0123])
8722 func_append compile_command " ${wl}-bind_at_load"
8723 func_append finalize_command " ${wl}-bind_at_load"
10215 func_append compile_command " $wl-bind_at_load"
10216 func_append finalize_command " $wl-bind_at_load"
872410217 ;;
872510218 esac
872610219 fi
875610249 *) func_append new_libs " $deplib" ;;
875710250 esac
875810251 done
8759 compile_deplibs="$new_libs"
10252 compile_deplibs=$new_libs
876010253
876110254
876210255 func_append compile_command " $compile_deplibs"
878010273 if test -n "$hardcode_libdir_flag_spec"; then
878110274 if test -n "$hardcode_libdir_separator"; then
878210275 if test -z "$hardcode_libdirs"; then
8783 hardcode_libdirs="$libdir"
10276 hardcode_libdirs=$libdir
878410277 else
878510278 # Just accumulate the unique libdirs.
878610279 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
880310296 fi
880410297 case $host in
880510298 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
8806 testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
10299 testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'`
880710300 case :$dllsearchpath: in
880810301 *":$libdir:"*) ;;
880910302 ::) dllsearchpath=$libdir;;
882010313 # Substitute the hardcoded libdirs into the rpath.
882110314 if test -n "$hardcode_libdir_separator" &&
882210315 test -n "$hardcode_libdirs"; then
8823 libdir="$hardcode_libdirs"
10316 libdir=$hardcode_libdirs
882410317 eval rpath=\" $hardcode_libdir_flag_spec\"
882510318 fi
8826 compile_rpath="$rpath"
10319 compile_rpath=$rpath
882710320
882810321 rpath=
882910322 hardcode_libdirs=
883110324 if test -n "$hardcode_libdir_flag_spec"; then
883210325 if test -n "$hardcode_libdir_separator"; then
883310326 if test -z "$hardcode_libdirs"; then
8834 hardcode_libdirs="$libdir"
10327 hardcode_libdirs=$libdir
883510328 else
883610329 # Just accumulate the unique libdirs.
883710330 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
885610349 # Substitute the hardcoded libdirs into the rpath.
885710350 if test -n "$hardcode_libdir_separator" &&
885810351 test -n "$hardcode_libdirs"; then
8859 libdir="$hardcode_libdirs"
10352 libdir=$hardcode_libdirs
886010353 eval rpath=\" $hardcode_libdir_flag_spec\"
886110354 fi
8862 finalize_rpath="$rpath"
8863
8864 if test -n "$libobjs" && test "$build_old_libs" = yes; then
10355 finalize_rpath=$rpath
10356
10357 if test -n "$libobjs" && test yes = "$build_old_libs"; then
886510358 # Transform all the library objects into standard objects.
886610359 compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
886710360 finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
886810361 fi
886910362
8870 func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
10363 func_generate_dlsyms "$outputname" "@PROGRAM@" false
887110364
887210365 # template prelinking step
887310366 if test -n "$prelink_cmds"; then
887410367 func_execute_cmds "$prelink_cmds" 'exit $?'
887510368 fi
887610369
8877 wrappers_required=yes
10370 wrappers_required=:
887810371 case $host in
887910372 *cegcc* | *mingw32ce*)
888010373 # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
8881 wrappers_required=no
10374 wrappers_required=false
888210375 ;;
888310376 *cygwin* | *mingw* )
8884 if test "$build_libtool_libs" != yes; then
8885 wrappers_required=no
8886 fi
10377 test yes = "$build_libtool_libs" || wrappers_required=false
888710378 ;;
888810379 *)
8889 if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
8890 wrappers_required=no
10380 if test no = "$need_relink" || test yes != "$build_libtool_libs"; then
10381 wrappers_required=false
889110382 fi
889210383 ;;
889310384 esac
8894 if test "$wrappers_required" = no; then
10385 $wrappers_required || {
889510386 # Replace the output file specification.
889610387 compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
8897 link_command="$compile_command$compile_rpath"
10388 link_command=$compile_command$compile_rpath
889810389
889910390 # We have no uninstalled library dependencies, so finalize right now.
890010391 exit_status=0
890710398 fi
890810399
890910400 # Delete the generated files.
8910 if test -f "$output_objdir/${outputname}S.${objext}"; then
8911 func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
10401 if test -f "$output_objdir/${outputname}S.$objext"; then
10402 func_show_eval '$RM "$output_objdir/${outputname}S.$objext"'
891210403 fi
891310404
891410405 exit $exit_status
8915 fi
10406 }
891610407
891710408 if test -n "$compile_shlibpath$finalize_shlibpath"; then
891810409 compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
894210433 fi
894310434 fi
894410435
8945 if test "$no_install" = yes; then
10436 if test yes = "$no_install"; then
894610437 # We don't need to create a wrapper script.
8947 link_command="$compile_var$compile_command$compile_rpath"
10438 link_command=$compile_var$compile_command$compile_rpath
894810439 # Replace the output file specification.
894910440 link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
895010441 # Delete the old output file.
896110452 exit $EXIT_SUCCESS
896210453 fi
896310454
8964 if test "$hardcode_action" = relink; then
8965 # Fast installation is not supported
8966 link_command="$compile_var$compile_command$compile_rpath"
8967 relink_command="$finalize_var$finalize_command$finalize_rpath"
8968
8969 func_warning "this platform does not like uninstalled shared libraries"
8970 func_warning "\`$output' will be relinked during installation"
8971 else
8972 if test "$fast_install" != no; then
8973 link_command="$finalize_var$compile_command$finalize_rpath"
8974 if test "$fast_install" = yes; then
8975 relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
8976 else
8977 # fast_install is set to needless
8978 relink_command=
8979 fi
8980 else
8981 link_command="$compile_var$compile_command$compile_rpath"
8982 relink_command="$finalize_var$finalize_command$finalize_rpath"
8983 fi
8984 fi
10455 case $hardcode_action,$fast_install in
10456 relink,*)
10457 # Fast installation is not supported
10458 link_command=$compile_var$compile_command$compile_rpath
10459 relink_command=$finalize_var$finalize_command$finalize_rpath
10460
10461 func_warning "this platform does not like uninstalled shared libraries"
10462 func_warning "'$output' will be relinked during installation"
10463 ;;
10464 *,yes)
10465 link_command=$finalize_var$compile_command$finalize_rpath
10466 relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
10467 ;;
10468 *,no)
10469 link_command=$compile_var$compile_command$compile_rpath
10470 relink_command=$finalize_var$finalize_command$finalize_rpath
10471 ;;
10472 *,needless)
10473 link_command=$finalize_var$compile_command$finalize_rpath
10474 relink_command=
10475 ;;
10476 esac
898510477
898610478 # Replace the output file specification.
898710479 link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
903810530 func_dirname_and_basename "$output" "" "."
903910531 output_name=$func_basename_result
904010532 output_path=$func_dirname_result
9041 cwrappersource="$output_path/$objdir/lt-$output_name.c"
9042 cwrapper="$output_path/$output_name.exe"
10533 cwrappersource=$output_path/$objdir/lt-$output_name.c
10534 cwrapper=$output_path/$output_name.exe
904310535 $RM $cwrappersource $cwrapper
904410536 trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
904510537
906010552 trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
906110553 $opt_dry_run || {
906210554 # note: this script will not be executed, so do not chmod.
9063 if test "x$build" = "x$host" ; then
10555 if test "x$build" = "x$host"; then
906410556 $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
906510557 else
906610558 func_emit_wrapper no > $func_ltwrapper_scriptname_result
908310575 # See if we need to build an old-fashioned archive.
908410576 for oldlib in $oldlibs; do
908510577
9086 if test "$build_libtool_libs" = convenience; then
9087 oldobjs="$libobjs_save $symfileobj"
9088 addlibs="$convenience"
9089 build_libtool_libs=no
9090 else
9091 if test "$build_libtool_libs" = module; then
9092 oldobjs="$libobjs_save"
10578 case $build_libtool_libs in
10579 convenience)
10580 oldobjs="$libobjs_save $symfileobj"
10581 addlibs=$convenience
909310582 build_libtool_libs=no
9094 else
10583 ;;
10584 module)
10585 oldobjs=$libobjs_save
10586 addlibs=$old_convenience
10587 build_libtool_libs=no
10588 ;;
10589 *)
909510590 oldobjs="$old_deplibs $non_pic_objects"
9096 if test "$preload" = yes && test -f "$symfileobj"; then
9097 func_append oldobjs " $symfileobj"
9098 fi
9099 fi
9100 addlibs="$old_convenience"
9101 fi
10591 $preload && test -f "$symfileobj" \
10592 && func_append oldobjs " $symfileobj"
10593 addlibs=$old_convenience
10594 ;;
10595 esac
910210596
910310597 if test -n "$addlibs"; then
9104 gentop="$output_objdir/${outputname}x"
10598 gentop=$output_objdir/${outputname}x
910510599 func_append generated " $gentop"
910610600
910710601 func_extract_archives $gentop $addlibs
910910603 fi
911010604
911110605 # Do each command in the archive commands.
9112 if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
10606 if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then
911310607 cmds=$old_archive_from_new_cmds
911410608 else
911510609
911610610 # Add any objects from preloaded convenience libraries
911710611 if test -n "$dlprefiles"; then
9118 gentop="$output_objdir/${outputname}x"
10612 gentop=$output_objdir/${outputname}x
911910613 func_append generated " $gentop"
912010614
912110615 func_extract_archives $gentop $dlprefiles
913610630 :
913710631 else
913810632 echo "copying selected object files to avoid basename conflicts..."
9139 gentop="$output_objdir/${outputname}x"
10633 gentop=$output_objdir/${outputname}x
914010634 func_append generated " $gentop"
914110635 func_mkdir_p "$gentop"
914210636 save_oldobjs=$oldobjs
914510639 for obj in $save_oldobjs
914610640 do
914710641 func_basename "$obj"
9148 objbase="$func_basename_result"
10642 objbase=$func_basename_result
914910643 case " $oldobjs " in
915010644 " ") oldobjs=$obj ;;
915110645 *[\ /]"$objbase "*)
921410708 else
921510709 # the above command should be used before it gets too long
921610710 oldobjs=$objlist
9217 if test "$obj" = "$last_oldobj" ; then
10711 if test "$obj" = "$last_oldobj"; then
921810712 RANLIB=$save_RANLIB
921910713 fi
922010714 test -z "$concat_cmds" || concat_cmds=$concat_cmds~
9221 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
10715 eval concat_cmds=\"\$concat_cmds$old_archive_cmds\"
922210716 objlist=
922310717 len=$len0
922410718 fi
922510719 done
922610720 RANLIB=$save_RANLIB
922710721 oldobjs=$objlist
9228 if test "X$oldobjs" = "X" ; then
10722 if test -z "$oldobjs"; then
922910723 eval cmds=\"\$concat_cmds\"
923010724 else
923110725 eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
924210736 case $output in
924310737 *.la)
924410738 old_library=
9245 test "$build_old_libs" = yes && old_library="$libname.$libext"
10739 test yes = "$build_old_libs" && old_library=$libname.$libext
924610740 func_verbose "creating $output"
924710741
924810742 # Preserve any variables that may affect compiler behavior
925710751 fi
925810752 done
925910753 # Quote the link command for shipping.
9260 relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
10754 relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
926110755 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
9262 if test "$hardcode_automatic" = yes ; then
10756 if test yes = "$hardcode_automatic"; then
926310757 relink_command=
926410758 fi
926510759
926610760 # Only create the output if not a dry run.
926710761 $opt_dry_run || {
926810762 for installed in no yes; do
9269 if test "$installed" = yes; then
10763 if test yes = "$installed"; then
927010764 if test -z "$install_libdir"; then
927110765 break
927210766 fi
9273 output="$output_objdir/$outputname"i
10767 output=$output_objdir/${outputname}i
927410768 # Replace all uninstalled libtool libraries with the installed ones
927510769 newdependency_libs=
927610770 for deplib in $dependency_libs; do
927710771 case $deplib in
927810772 *.la)
927910773 func_basename "$deplib"
9280 name="$func_basename_result"
10774 name=$func_basename_result
928110775 func_resolve_sysroot "$deplib"
9282 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
10776 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
928310777 test -z "$libdir" && \
9284 func_fatal_error "\`$deplib' is not a valid libtool archive"
10778 func_fatal_error "'$deplib' is not a valid libtool archive"
928510779 func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
928610780 ;;
928710781 -L*)
929710791 *) func_append newdependency_libs " $deplib" ;;
929810792 esac
929910793 done
9300 dependency_libs="$newdependency_libs"
10794 dependency_libs=$newdependency_libs
930110795 newdlfiles=
930210796
930310797 for lib in $dlfiles; do
930410798 case $lib in
930510799 *.la)
930610800 func_basename "$lib"
9307 name="$func_basename_result"
9308 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
10801 name=$func_basename_result
10802 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
930910803 test -z "$libdir" && \
9310 func_fatal_error "\`$lib' is not a valid libtool archive"
10804 func_fatal_error "'$lib' is not a valid libtool archive"
931110805 func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
931210806 ;;
931310807 *) func_append newdlfiles " $lib" ;;
931410808 esac
931510809 done
9316 dlfiles="$newdlfiles"
10810 dlfiles=$newdlfiles
931710811 newdlprefiles=
931810812 for lib in $dlprefiles; do
931910813 case $lib in
932310817 # didn't already link the preopened objects directly into
932410818 # the library:
932510819 func_basename "$lib"
9326 name="$func_basename_result"
9327 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
10820 name=$func_basename_result
10821 eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
932810822 test -z "$libdir" && \
9329 func_fatal_error "\`$lib' is not a valid libtool archive"
10823 func_fatal_error "'$lib' is not a valid libtool archive"
933010824 func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
933110825 ;;
933210826 esac
933310827 done
9334 dlprefiles="$newdlprefiles"
10828 dlprefiles=$newdlprefiles
933510829 else
933610830 newdlfiles=
933710831 for lib in $dlfiles; do
933810832 case $lib in
9339 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
10833 [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
934010834 *) abs=`pwd`"/$lib" ;;
934110835 esac
934210836 func_append newdlfiles " $abs"
934310837 done
9344 dlfiles="$newdlfiles"
10838 dlfiles=$newdlfiles
934510839 newdlprefiles=
934610840 for lib in $dlprefiles; do
934710841 case $lib in
9348 [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
10842 [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;;
934910843 *) abs=`pwd`"/$lib" ;;
935010844 esac
935110845 func_append newdlprefiles " $abs"
935210846 done
9353 dlprefiles="$newdlprefiles"
10847 dlprefiles=$newdlprefiles
935410848 fi
935510849 $RM $output
935610850 # place dlname in correct position for cygwin
936610860 case $host,$output,$installed,$module,$dlname in
936710861 *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
936810862 # If a -bindir argument was supplied, place the dll there.
9369 if test "x$bindir" != x ;
9370 then
10863 if test -n "$bindir"; then
937110864 func_relative_path "$install_libdir" "$bindir"
9372 tdlname=$func_relative_path_result$dlname
10865 tdlname=$func_relative_path_result/$dlname
937310866 else
937410867 # Otherwise fall back on heuristic.
937510868 tdlname=../bin/$dlname
937810871 esac
937910872 $ECHO > $output "\
938010873 # $outputname - a libtool library file
9381 # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
10874 # Generated by $PROGRAM (GNU $PACKAGE) $VERSION
938210875 #
938310876 # Please DO NOT delete this file!
938410877 # It is necessary for linking the library.
939210885 # The name of the static archive.
939310886 old_library='$old_library'
939410887
9395 # Linker flags that can not go in dependency_libs.
10888 # Linker flags that cannot go in dependency_libs.
939610889 inherited_linker_flags='$new_inherited_linker_flags'
939710890
939810891 # Libraries that this one depends upon.
941810911
941910912 # Directory that this library needs to be installed in:
942010913 libdir='$install_libdir'"
9421 if test "$installed" = no && test "$need_relink" = yes; then
10914 if test no,yes = "$installed,$need_relink"; then
942210915 $ECHO >> $output "\
942310916 relink_command=\"$relink_command\""
942410917 fi
943310926 exit $EXIT_SUCCESS
943410927 }
943510928
9436 { test "$opt_mode" = link || test "$opt_mode" = relink; } &&
9437 func_mode_link ${1+"$@"}
10929 if test link = "$opt_mode" || test relink = "$opt_mode"; then
10930 func_mode_link ${1+"$@"}
10931 fi
943810932
943910933
944010934 # func_mode_uninstall arg...
944110935 func_mode_uninstall ()
944210936 {
9443 $opt_debug
9444 RM="$nonopt"
10937 $debug_cmd
10938
10939 RM=$nonopt
944510940 files=
9446 rmforce=
10941 rmforce=false
944710942 exit_status=0
944810943
944910944 # This variable tells wrapper scripts just to set variables rather
945010945 # than running their programs.
9451 libtool_install_magic="$magic"
10946 libtool_install_magic=$magic
945210947
945310948 for arg
945410949 do
945510950 case $arg in
9456 -f) func_append RM " $arg"; rmforce=yes ;;
10951 -f) func_append RM " $arg"; rmforce=: ;;
945710952 -*) func_append RM " $arg" ;;
945810953 *) func_append files " $arg" ;;
945910954 esac
946610961
946710962 for file in $files; do
946810963 func_dirname "$file" "" "."
9469 dir="$func_dirname_result"
9470 if test "X$dir" = X.; then
9471 odir="$objdir"
10964 dir=$func_dirname_result
10965 if test . = "$dir"; then
10966 odir=$objdir
947210967 else
9473 odir="$dir/$objdir"
10968 odir=$dir/$objdir
947410969 fi
947510970 func_basename "$file"
9476 name="$func_basename_result"
9477 test "$opt_mode" = uninstall && odir="$dir"
10971 name=$func_basename_result
10972 test uninstall = "$opt_mode" && odir=$dir
947810973
947910974 # Remember odir for removal later, being careful to avoid duplicates
9480 if test "$opt_mode" = clean; then
10975 if test clean = "$opt_mode"; then
948110976 case " $rmdirs " in
948210977 *" $odir "*) ;;
948310978 *) func_append rmdirs " $odir" ;;
949210987 elif test -d "$file"; then
949310988 exit_status=1
949410989 continue
9495 elif test "$rmforce" = yes; then
10990 elif $rmforce; then
949610991 continue
949710992 fi
949810993
9499 rmfiles="$file"
10994 rmfiles=$file
950010995
950110996 case $name in
950210997 *.la)
951011005 done
951111006 test -n "$old_library" && func_append rmfiles " $odir/$old_library"
951211007
9513 case "$opt_mode" in
11008 case $opt_mode in
951411009 clean)
951511010 case " $library_names " in
951611011 *" $dlname "*) ;;
952111016 uninstall)
952211017 if test -n "$library_names"; then
952311018 # Do each command in the postuninstall commands.
9524 func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
11019 func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1'
952511020 fi
952611021
952711022 if test -n "$old_library"; then
952811023 # Do each command in the old_postuninstall commands.
9529 func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
11024 func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1'
953011025 fi
953111026 # FIXME: should reinstall the best remaining shared library.
953211027 ;;
954211037 func_source $dir/$name
954311038
954411039 # Add PIC object to the list of files to remove.
9545 if test -n "$pic_object" &&
9546 test "$pic_object" != none; then
11040 if test -n "$pic_object" && test none != "$pic_object"; then
954711041 func_append rmfiles " $dir/$pic_object"
954811042 fi
954911043
955011044 # Add non-PIC object to the list of files to remove.
9551 if test -n "$non_pic_object" &&
9552 test "$non_pic_object" != none; then
11045 if test -n "$non_pic_object" && test none != "$non_pic_object"; then
955311046 func_append rmfiles " $dir/$non_pic_object"
955411047 fi
955511048 fi
955611049 ;;
955711050
955811051 *)
9559 if test "$opt_mode" = clean ; then
11052 if test clean = "$opt_mode"; then
956011053 noexename=$name
956111054 case $file in
956211055 *.exe)
958311076
958411077 # note $name still contains .exe if it was in $file originally
958511078 # as does the version of $file that was added into $rmfiles
9586 func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
9587 if test "$fast_install" = yes && test -n "$relink_command"; then
11079 func_append rmfiles " $odir/$name $odir/${name}S.$objext"
11080 if test yes = "$fast_install" && test -n "$relink_command"; then
958811081 func_append rmfiles " $odir/lt-$name"
958911082 fi
9590 if test "X$noexename" != "X$name" ; then
9591 func_append rmfiles " $odir/lt-${noexename}.c"
11083 if test "X$noexename" != "X$name"; then
11084 func_append rmfiles " $odir/lt-$noexename.c"
959211085 fi
959311086 fi
959411087 fi
959711090 func_show_eval "$RM $rmfiles" 'exit_status=1'
959811091 done
959911092
9600 # Try to remove the ${objdir}s in the directories where we deleted files
11093 # Try to remove the $objdir's in the directories where we deleted files
960111094 for dir in $rmdirs; do
960211095 if test -d "$dir"; then
960311096 func_show_eval "rmdir $dir >/dev/null 2>&1"
960711100 exit $exit_status
960811101 }
960911102
9610 { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
9611 func_mode_uninstall ${1+"$@"}
11103 if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then
11104 func_mode_uninstall ${1+"$@"}
11105 fi
961211106
961311107 test -z "$opt_mode" && {
9614 help="$generic_help"
11108 help=$generic_help
961511109 func_fatal_help "you must specify a MODE"
961611110 }
961711111
961811112 test -z "$exec_cmd" && \
9619 func_fatal_help "invalid operation mode \`$opt_mode'"
11113 func_fatal_help "invalid operation mode '$opt_mode'"
962011114
962111115 if test -n "$exec_cmd"; then
962211116 eval exec "$exec_cmd"
962711121
962811122
962911123 # The TAGs below are defined such that we never get into a situation
9630 # in which we disable both kinds of libraries. Given conflicting
11124 # where we disable both kinds of libraries. Given conflicting
963111125 # choices, we go for a static library, that is the most portable,
963211126 # since we can't tell whether shared libraries were disabled because
963311127 # the user asked for that or because the platform doesn't support
965011144 # mode:shell-script
965111145 # sh-indentation:2
965211146 # End:
9653 # vi:sw=2
9654
00 dnl Functions for common
11 dnl
2 dnl Version: 20120524
2 dnl Version: 20161106
33
44 dnl Function to test if a certain feature was enabled
55 AC_DEFUN([AX_COMMON_ARG_ENABLE],
6 [AC_ARG_ENABLE(
7 [$1],
8 [AS_HELP_STRING(
9 [--enable-$1],
10 [$3 [default=$4]])],
11 [ac_cv_enable_$2=$enableval],
12 [ac_cv_enable_$2=$4])dnl
13 AC_CACHE_CHECK(
14 [whether to enable $3],
15 [ac_cv_enable_$2],
16 [ac_cv_enable_$2=$4])dnl
17 ])
6 [
7 AC_ARG_ENABLE(
8 [$1],
9 [AS_HELP_STRING(
10 [--enable-$1],
11 [$3 [default=$4]])],
12 [ac_cv_enable_$2=$enableval],
13 [ac_cv_enable_$2=$4])dnl
14
15 AC_CACHE_CHECK(
16 [whether to enable $3],
17 [ac_cv_enable_$2],
18 [ac_cv_enable_$2=$4])dnl
19 ])
1820
1921 dnl Function to test if the location of a certain feature was provided
2022 AC_DEFUN([AX_COMMON_ARG_WITH],
21 [AC_ARG_WITH(
22 [$1],
23 [AS_HELP_STRING(
24 [--with-$1[[=$5]]],
25 [$3 [default=$4]])],
26 [ac_cv_with_$2=$withval],
27 [ac_cv_with_$2=$4])dnl
28 AC_CACHE_CHECK(
29 [whether to use $3],
30 [ac_cv_with_$2],
31 [ac_cv_with_$2=$4])dnl
32 ])
23 [
24 AC_ARG_WITH(
25 [$1],
26 [AS_HELP_STRING(
27 [--with-$1[[=$5]]],
28 [$3 [default=$4]])],
29 [ac_cv_with_$2=$withval],
30 [ac_cv_with_$2=$4])dnl
31
32 AC_CACHE_CHECK(
33 [whether to use $3],
34 [ac_cv_with_$2],
35 [ac_cv_with_$2=$4])dnl
36 ])
3337
3438 dnl Function to detect whether WINAPI support should be enabled
3539 AC_DEFUN([AX_COMMON_CHECK_ENABLE_WINAPI],
36 [AX_COMMON_ARG_ENABLE(
37 [winapi],
38 [winapi],
39 [enable WINAPI support for cross-compilation],
40 [auto-detect])
41
42 AS_IF(
43 [test "x$ac_cv_enable_winapi" = xauto-detect],
44 [ac_common_check_winapi_target_string="$target"
45
46 AS_IF(
47 [test "x$ac_common_check_winapi_target_string" = x],
48 [ac_common_check_winapi_target_string="$host"])
49
50 AS_CASE(
51 [$ac_common_check_winapi_target_string],
52 [*mingw*],[AC_MSG_NOTICE(
53 [detected MinGW enabling WINAPI support for cross-compilation])
54 ac_cv_enable_winapi=yes],
55 [*],[ac_cv_enable_winapi=no])
56 ])
57 ])
40 [
41 AX_COMMON_ARG_ENABLE(
42 [winapi],
43 [winapi],
44 [enable WINAPI support for cross-compilation],
45 [auto-detect])
46
47 AS_IF(
48 [test "x$ac_cv_enable_winapi" = xauto-detect],
49 [ac_common_check_winapi_target_string="$target"
50
51 AS_IF(
52 [test "x$ac_common_check_winapi_target_string" = x],
53 [ac_common_check_winapi_target_string="$host"])
54
55 AS_CASE(
56 [$ac_common_check_winapi_target_string],
57 [*mingw*],[AC_MSG_NOTICE(
58 [detected MinGW enabling WINAPI support for cross-compilation])
59 ac_cv_enable_winapi=yes],
60 [*],[ac_cv_enable_winapi=no])
61 ])
62 ])
5863
5964 dnl Function to detect whether static executables support should be enabled
6065 AC_DEFUN([AX_COMMON_CHECK_ENABLE_STATIC_EXECUTABLES],
61 [AX_COMMON_ARG_ENABLE(
62 [static-executables],
63 [static_executables],
64 [build static executables (binaries)],
65 [no])
66
67 AS_IF(
68 [test "x$ac_cv_enable_static_executables" != xno],
69 [STATIC_LDFLAGS="-all-static";
70
71 AC_SUBST(
72 [STATIC_LDFLAGS])
73
74 ac_cv_enable_static_executables=yes])
75 ])
66 [
67 AX_COMMON_ARG_ENABLE(
68 [static-executables],
69 [static_executables],
70 [build static executables (binaries)],
71 [no])
72
73 AS_IF(
74 [test "x$ac_cv_enable_static_executables" != xno],
75 [STATIC_LDFLAGS="-all-static";
76
77 AC_SUBST(
78 [STATIC_LDFLAGS])
79
80 ac_cv_enable_static_executables=yes])
81 ])
7682
7783 dnl Function to detect whether static executables support should be enabled
7884 AC_DEFUN([AX_COMMON_CHECK_ENABLE_WIDE_CHARACTER_TYPE],
79 [AX_COMMON_ARG_ENABLE(
80 [wide-character-type],
81 [wide_character_type],
82 [enable wide character type support],
83 [no])
84 ])
85 [
86 AX_COMMON_ARG_ENABLE(
87 [wide-character-type],
88 [wide_character_type],
89 [enable wide character type support],
90 [no])
91 ])
8592
8693 dnl Function to detect whether verbose output should be enabled
8794 AC_DEFUN([AX_COMMON_CHECK_ENABLE_VERBOSE_OUTPUT],
88 [AX_COMMON_ARG_ENABLE(
89 [verbose-output],
90 [verbose_output],
91 [enable verbose output],
92 [no])
93
94 AS_IF(
95 [test "x$ac_cv_enable_verbose_output" != xno ],
96 [AC_DEFINE(
97 [HAVE_VERBOSE_OUTPUT],
98 [1],
99 [Define to 1 if verbose output should be used.])
100
101 ac_cv_enable_verbose_output=yes])
102 ])
95 [
96 AX_COMMON_ARG_ENABLE(
97 [verbose-output],
98 [verbose_output],
99 [enable verbose output],
100 [no])
101
102 AS_IF(
103 [test "x$ac_cv_enable_verbose_output" != xno ],
104 [AC_DEFINE(
105 [HAVE_VERBOSE_OUTPUT],
106 [1],
107 [Define to 1 if verbose output should be used.])
108
109 ac_cv_enable_verbose_output=yes])
110 ])
103111
104112 dnl Function to detect whether debug output should be enabled
105113 AC_DEFUN([AX_COMMON_CHECK_ENABLE_DEBUG_OUTPUT],
106 [AX_COMMON_ARG_ENABLE(
107 [debug-output],
108 [debug_output],
109 [enable debug output],
110 [no])
111
112 AS_IF(
113 [test "x$ac_cv_enable_debug_output" != xno ],
114 [AC_DEFINE(
115 [HAVE_DEBUG_OUTPUT],
116 [1],
117 [Define to 1 if debug output should be used.])
118
119 ac_cv_enable_debug_output=yes])
120 ])
114 [
115 AX_COMMON_ARG_ENABLE(
116 [debug-output],
117 [debug_output],
118 [enable debug output],
119 [no])
120
121 AS_IF(
122 [test "x$ac_cv_enable_debug_output" != xno ],
123 [AC_DEFINE(
124 [HAVE_DEBUG_OUTPUT],
125 [1],
126 [Define to 1 if debug output should be used.])
127
128 ac_cv_enable_debug_output=yes])
129 ])
121130
122131 dnl Function to detect whether printf conversion specifier "%jd" is available
123132 AC_DEFUN([AX_COMMON_CHECK_FUNC_PRINTF_JD],
124 [AC_MSG_CHECKING(
125 [whether printf supports the conversion specifier "%jd"])
126
127 SAVE_CFLAGS="$CFLAGS"
128 CFLAGS="$CFLAGS -Wall -Werror"
129 AC_LANG_PUSH(C)
130
131 dnl First try to see if compilation and linkage without a parameter succeeds
132 AC_LINK_IFELSE(
133 [AC_LANG_PROGRAM(
134 [[#include <stdio.h>]],
135 [[printf( "%jd" ); ]] )],
136 [ac_cv_cv_have_printf_jd=no],
137 [ac_cv_cv_have_printf_jd=yes])
138
139 dnl Second try to see if compilation and linkage with a parameter succeeds
140 AS_IF(
141 [test "x$ac_cv_cv_have_printf_jd" = xyes],
142 [AC_LINK_IFELSE(
143 [AC_LANG_PROGRAM(
144 [[#include <sys/types.h>
133 [
134 AC_MSG_CHECKING(
135 [whether printf supports the conversion specifier "%jd"])
136
137 SAVE_CFLAGS="$CFLAGS"
138 CFLAGS="$CFLAGS -Wall -Werror"
139 AC_LANG_PUSH(C)
140
141 dnl First try to see if compilation and linkage without a parameter succeeds
142 AC_LINK_IFELSE(
143 [AC_LANG_PROGRAM(
144 [[#include <stdio.h>]],
145 [[printf( "%jd" ); ]] )],
146 [ac_cv_cv_have_printf_jd=no],
147 [ac_cv_cv_have_printf_jd=yes])
148
149 dnl Second try to see if compilation and linkage with a parameter succeeds
150 AS_IF(
151 [test "x$ac_cv_cv_have_printf_jd" = xyes],
152 [AC_LINK_IFELSE(
153 [AC_LANG_PROGRAM(
154 [[#include <sys/types.h>
145155 #include <stdio.h>]],
146 [[printf( "%jd", (off_t) 10 ); ]] )],
147 [ac_cv_cv_have_printf_jd=yes],
148 [ac_cv_cv_have_printf_jd=no])
149 ])
150
151 dnl Third try to see if the program runs correctly
152 AS_IF(
153 [test "x$ac_cv_cv_have_printf_jd" = xyes],
154 [AC_RUN_IFELSE(
155 [AC_LANG_PROGRAM(
156 [[#include <sys/types.h>
156 [[printf( "%jd", (off_t) 10 ); ]] )],
157 [ac_cv_cv_have_printf_jd=yes],
158 [ac_cv_cv_have_printf_jd=no])
159 ])
160
161 dnl Third try to see if the program runs correctly
162 AS_IF(
163 [test "x$ac_cv_cv_have_printf_jd" = xyes],
164 [AC_RUN_IFELSE(
165 [AC_LANG_PROGRAM(
166 [[#include <sys/types.h>
157167 #include <stdio.h>]],
158 [[char string[ 3 ];
168 [[char string[ 3 ];
159169 if( snprintf( string, 3, "%jd", (off_t) 10 ) < 0 ) return( 1 );
160170 if( ( string[ 0 ] != '1' ) || ( string[ 1 ] != '0' ) ) return( 1 ); ]] )],
161 [ac_cv_cv_have_printf_jd=yes],
162 [ac_cv_cv_have_printf_jd=no],
163 [ac_cv_cv_have_printf_jd=undetermined])
164 ])
165
166 AC_LANG_POP(C)
167 CFLAGS="$SAVE_CFLAGS"
168
169 AS_IF(
170 [test "x$ac_cv_cv_have_printf_jd" = xyes],
171 [AC_MSG_RESULT(
172 [yes])
173 AC_DEFINE(
174 [HAVE_PRINTF_JD],
175 [1],
176 [Define to 1 whether printf supports the conversion specifier "%jd".]) ],
177 [AC_MSG_RESULT(
178 [$ac_cv_cv_have_printf_jd]) ])
179 ])
171 [ac_cv_cv_have_printf_jd=yes],
172 [ac_cv_cv_have_printf_jd=no],
173 [ac_cv_cv_have_printf_jd=undetermined])
174 ])
175
176 AC_LANG_POP(C)
177 CFLAGS="$SAVE_CFLAGS"
178
179 AS_IF(
180 [test "x$ac_cv_cv_have_printf_jd" = xyes],
181 [AC_MSG_RESULT(
182 [yes])
183 AC_DEFINE(
184 [HAVE_PRINTF_JD],
185 [1],
186 [Define to 1 whether printf supports the conversion specifier "%jd".]) ],
187 [AC_MSG_RESULT(
188 [$ac_cv_cv_have_printf_jd])
189 ])
190 ])
180191
181192 dnl Function to detect whether printf conversion specifier "%zd" is available
182193 AC_DEFUN([AX_COMMON_CHECK_FUNC_PRINTF_ZD],
183 [AC_MSG_CHECKING(
184 [whether printf supports the conversion specifier "%zd"])
185
186 SAVE_CFLAGS="$CFLAGS"
187 CFLAGS="$CFLAGS -Wall -Werror"
188 AC_LANG_PUSH(C)
189
190 dnl First try to see if compilation and linkage without a parameter succeeds
191 AC_LINK_IFELSE(
192 [AC_LANG_PROGRAM(
193 [[#include <stdio.h>]],
194 [[printf( "%zd" ); ]] )],
195 [ac_cv_cv_have_printf_zd=no],
196 [ac_cv_cv_have_printf_zd=yes])
197
198 dnl Second try to see if compilation and linkage with a parameter succeeds
199 AS_IF(
200 [test "x$ac_cv_cv_have_printf_zd" = xyes],
201 [AC_LINK_IFELSE(
202 [AC_LANG_PROGRAM(
203 [[#include <sys/types.h>
194 [
195 AC_MSG_CHECKING(
196 [whether printf supports the conversion specifier "%zd"])
197
198 SAVE_CFLAGS="$CFLAGS"
199 CFLAGS="$CFLAGS -Wall -Werror"
200 AC_LANG_PUSH(C)
201
202 dnl First try to see if compilation and linkage without a parameter succeeds
203 AC_LINK_IFELSE(
204 [AC_LANG_PROGRAM(
205 [[#include <stdio.h>]],
206 [[printf( "%zd" ); ]] )],
207 [ac_cv_cv_have_printf_zd=no],
208 [ac_cv_cv_have_printf_zd=yes])
209
210 dnl Second try to see if compilation and linkage with a parameter succeeds
211 AS_IF(
212 [test "x$ac_cv_cv_have_printf_zd" = xyes],
213 [AC_LINK_IFELSE(
214 [AC_LANG_PROGRAM(
215 [[#include <sys/types.h>
204216 #include <stdio.h>]],
205 [[printf( "%zd", (size_t) 10 ); ]] )],
206 [ac_cv_cv_have_printf_zd=yes],
207 [ac_cv_cv_have_printf_zd=no])
208 ])
209
210 dnl Third try to see if the program runs correctly
211 AS_IF(
212 [test "x$ac_cv_cv_have_printf_zd" = xyes],
213 [AC_RUN_IFELSE(
214 [AC_LANG_PROGRAM(
215 [[#include <sys/types.h>
217 [[printf( "%zd", (size_t) 10 ); ]] )],
218 [ac_cv_cv_have_printf_zd=yes],
219 [ac_cv_cv_have_printf_zd=no])
220 ])
221
222 dnl Third try to see if the program runs correctly
223 AS_IF(
224 [test "x$ac_cv_cv_have_printf_zd" = xyes],
225 [AC_RUN_IFELSE(
226 [AC_LANG_PROGRAM(
227 [[#include <sys/types.h>
216228 #include <stdio.h>]],
217 [[char string[ 3 ];
229 [[char string[ 3 ];
218230 if( snprintf( string, 3, "%zd", (size_t) 10 ) < 0 ) return( 1 );
219231 if( ( string[ 0 ] != '1' ) || ( string[ 1 ] != '0' ) ) return( 1 ); ]] )],
220 [ac_cv_cv_have_printf_zd=yes],
221 [ac_cv_cv_have_printf_zd=no],
222 [ac_cv_cv_have_printf_zd=undetermined])
223 ])
224
225 AC_LANG_POP(C)
226 CFLAGS="$SAVE_CFLAGS"
227
228 AS_IF(
229 [test "x$ac_cv_cv_have_printf_zd" = xyes],
230 [AC_MSG_RESULT(
231 [yes])
232 AC_DEFINE(
233 [HAVE_PRINTF_ZD],
234 [1],
235 [Define to 1 whether printf supports the conversion specifier "%zd".]) ],
236 [AC_MSG_RESULT(
237 [$ac_cv_cv_have_printf_zd]) ])
238 ])
232 [ac_cv_cv_have_printf_zd=yes],
233 [ac_cv_cv_have_printf_zd=no],
234 [ac_cv_cv_have_printf_zd=undetermined])
235 ])
236
237 AC_LANG_POP(C)
238 CFLAGS="$SAVE_CFLAGS"
239
240 AS_IF(
241 [test "x$ac_cv_cv_have_printf_zd" = xyes],
242 [AC_MSG_RESULT(
243 [yes])
244 AC_DEFINE(
245 [HAVE_PRINTF_ZD],
246 [1],
247 [Define to 1 whether printf supports the conversion specifier "%zd".]) ],
248 [AC_MSG_RESULT(
249 [$ac_cv_cv_have_printf_zd])
250 ])
251 ])
239252
240253 dnl Function to detect if common dependencies are available
241254 AC_DEFUN([AX_COMMON_CHECK_LOCAL],
242 [dnl Headers included in common/common.h
243 AS_IF(
244 [test "x$ac_cv_enable_winapi" = xyes],
245 [AC_CHECK_HEADERS([windows.h])
246
247 AS_IF(
248 [test "x$ac_cv_header_windows_h" = xno],
249 [AC_MSG_FAILURE(
250 [Missing header: windows.h header is required to compile with winapi support],
251 [1])
252 ])
253 ])
254
255 AS_IF(
256 [test "x$ac_cv_enable_winapi" = xno],
257 [AC_CHECK_HEADERS([libintl.h]) ])
258
259 dnl Headers included in common/types.h
260 AC_CHECK_HEADERS([limits.h])
261
262 dnl Headers included in common/memory.h
263 AC_CHECK_HEADERS([stdlib.h string.h])
264
265 dnl File stream functions used in common/file_stream.h
266 AC_CHECK_FUNCS([fclose feof fgets fopen fread fseeko fseeko64 fwrite vfprintf])
267
268 AS_IF(
269 [test "x$ac_cv_func_fclose" != xyes],
270 [AC_MSG_FAILURE(
271 [Missing function: fclose],
272 [1])
273 ])
274
275 AS_IF(
276 [test "x$ac_cv_func_feof" != xyes],
277 [AC_MSG_FAILURE(
278 [Missing function: feof],
279 [1])
280 ])
281
282 AS_IF(
283 [test "x$ac_cv_func_fgets" != xyes],
284 [AC_MSG_FAILURE(
285 [Missing function: fgets],
286 [1])
287 ])
288
289 AS_IF(
290 [test "x$ac_cv_func_fopen" != xyes],
291 [AC_MSG_FAILURE(
292 [Missing function: fopen],
293 [1])
294 ])
295
296 AS_IF(
297 [test "x$ac_cv_func_fread" != xyes],
298 [AC_MSG_FAILURE(
299 [Missing function: fread],
300 [1])
301 ])
302
303 AS_IF(
304 [test "x$ac_cv_func_fseeko" != xyes && test "x$ac_cv_func_fseeko64" != xyes],
305 [AC_MSG_FAILURE(
306 [Missing function: fseeko and fseeko64],
307 [1])
308 ])
309
310 AS_IF(
311 [test "x$ac_cv_func_fwrite" != xyes],
312 [AC_MSG_FAILURE(
313 [Missing function: fwrite],
314 [1])
315 ])
316
317 AS_IF(
318 [test "x$ac_cv_func_vfprintf" != xyes],
319 [AC_MSG_FAILURE(
320 [Missing function: vfprintf],
321 [1])
322 ])
323
324 AS_IF(
325 [test "x$ac_cv_enable_wide_character_type" != xno],
326 [AC_CHECK_FUNCS([fgetws])
327
328 AS_IF(
329 [test "x$ac_cv_func_fgetws" != xyes],
330 [AC_MSG_FAILURE(
331 [Missing function: fgetws],
332 [1])
333 ])
334 ])
335
336 dnl Memory functions used in common/memory.h
337 AC_CHECK_FUNCS([free malloc memcmp memcpy memset realloc])
338
339 AS_IF(
340 [test "x$ac_cv_func_free" != xyes],
341 [AC_MSG_FAILURE(
342 [Missing function: free],
343 [1])
344 ])
345
346 AS_IF(
347 [test "x$ac_cv_func_malloc" != xyes],
348 [AC_MSG_FAILURE(
349 [Missing function: malloc],
350 [1])
351 ])
352
353 AS_IF(
354 [test "x$ac_cv_func_memcmp" != xyes],
355 [AC_MSG_FAILURE(
356 [Missing function: memcmp],
357 [1])
358 ])
359
360 AS_IF(
361 [test "x$ac_cv_func_memcpy" != xyes],
362 [AC_MSG_FAILURE(
363 [Missing function: memcpy],
364 [1])
365 ])
366
367 AS_IF(
368 [test "x$ac_cv_func_memset" != xyes],
369 [AC_MSG_FAILURE(
370 [Missing function: memset],
371 [1])
372 ])
373
374 AS_IF(
375 [test "x$ac_cv_func_realloc" != xyes],
376 [AC_MSG_FAILURE(
377 [Missing function: realloc],
378 [1])
379 ])
380
381 dnl Check for printf conversion specifier support
382 AX_COMMON_CHECK_FUNC_PRINTF_JD
383 AX_COMMON_CHECK_FUNC_PRINTF_ZD
384 ])
385
255 [
256 dnl Headers included in common/common.h
257 AS_IF(
258 [test "x$ac_cv_enable_winapi" = xyes],
259 [AC_CHECK_HEADERS([windows.h])
260
261 AS_IF(
262 [test "x$ac_cv_header_windows_h" = xno],
263 [AC_MSG_FAILURE(
264 [Missing header: windows.h header is required to compile with winapi support],
265 [1])
266 ])
267 ])
268
269 AS_IF(
270 [test "x$ac_cv_enable_winapi" = xno],
271 [AC_CHECK_HEADERS([libintl.h])
272 ])
273
274 dnl Headers included in common/types.h
275 AC_CHECK_HEADERS([limits.h])
276
277 dnl Headers included in common/memory.h and common/narrow_string.h
278 AC_CHECK_HEADERS([stdlib.h string.h])
279
280 dnl Headers included in common/wide_string.h
281 AC_CHECK_HEADERS([wchar.h wctype.h])
282
283 dnl File stream functions used in common/file_stream.h
284 AC_CHECK_FUNCS([fclose feof fgets fopen fread fseeko fseeko64 fwrite vfprintf])
285
286 AS_IF(
287 [test "x$ac_cv_func_fclose" != xyes],
288 [AC_MSG_FAILURE(
289 [Missing function: fclose],
290 [1])
291 ])
292
293 AS_IF(
294 [test "x$ac_cv_func_feof" != xyes],
295 [AC_MSG_FAILURE(
296 [Missing function: feof],
297 [1])
298 ])
299
300 AS_IF(
301 [test "x$ac_cv_func_fgets" != xyes],
302 [AC_MSG_FAILURE(
303 [Missing function: fgets],
304 [1])
305 ])
306
307 AS_IF(
308 [test "x$ac_cv_func_fopen" != xyes],
309 [AC_MSG_FAILURE(
310 [Missing function: fopen],
311 [1])
312 ])
313
314 AS_IF(
315 [test "x$ac_cv_func_fread" != xyes],
316 [AC_MSG_FAILURE(
317 [Missing function: fread],
318 [1])
319 ])
320
321 AS_IF(
322 [test "x$ac_cv_func_fseeko" != xyes && test "x$ac_cv_func_fseeko64" != xyes],
323 [AC_MSG_FAILURE(
324 [Missing function: fseeko and fseeko64],
325 [1])
326 ])
327
328 AS_IF(
329 [test "x$ac_cv_func_fwrite" != xyes],
330 [AC_MSG_FAILURE(
331 [Missing function: fwrite],
332 [1])
333 ])
334
335 AS_IF(
336 [test "x$ac_cv_func_vfprintf" != xyes],
337 [AC_MSG_FAILURE(
338 [Missing function: vfprintf],
339 [1])
340 ])
341
342 AS_IF(
343 [test "x$ac_cv_enable_wide_character_type" != xno],
344 [AC_CHECK_FUNCS([fgetws])
345
346 AS_IF(
347 [test "x$ac_cv_func_fgetws" != xyes],
348 [AC_MSG_FAILURE(
349 [Missing function: fgetws],
350 [1])
351 ])
352 ])
353
354 dnl Memory functions used in common/memory.h
355 AC_CHECK_FUNCS([free malloc memcmp memcpy memset realloc])
356
357 AS_IF(
358 [test "x$ac_cv_func_free" != xyes],
359 [AC_MSG_FAILURE(
360 [Missing function: free],
361 [1])
362 ])
363
364 AS_IF(
365 [test "x$ac_cv_func_malloc" != xyes],
366 [AC_MSG_FAILURE(
367 [Missing function: malloc],
368 [1])
369 ])
370
371 AS_IF(
372 [test "x$ac_cv_func_memcmp" != xyes],
373 [AC_MSG_FAILURE(
374 [Missing function: memcmp],
375 [1])
376 ])
377
378 AS_IF(
379 [test "x$ac_cv_func_memcpy" != xyes],
380 [AC_MSG_FAILURE(
381 [Missing function: memcpy],
382 [1])
383 ])
384
385 AS_IF(
386 [test "x$ac_cv_func_memset" != xyes],
387 [AC_MSG_FAILURE(
388 [Missing function: memset],
389 [1])
390 ])
391
392 AS_IF(
393 [test "x$ac_cv_func_realloc" != xyes],
394 [AC_MSG_FAILURE(
395 [Missing function: realloc],
396 [1])
397 ])
398
399 dnl Narrow character string functions used in common/narrow_string.h
400 AC_CHECK_FUNCS([memchr memrchr snprintf sscanf strcasecmp strchr strlen strncasecmp strncmp strncpy strnicmp strrchr strstr vsnprintf])
401
402 AS_IF(
403 [test "x$ac_cv_func_memchr" != xyes && test "x$ac_cv_func_strchr" != xyes],
404 [AC_MSG_FAILURE(
405 [Missing functions: memchr and strchr],
406 [1])
407 ])
408
409 AS_IF(
410 [test "x$ac_cv_func_memcmp" != xyes && test "x$ac_cv_func_strncmp" != xyes],
411 [AC_MSG_FAILURE(
412 [Missing functions: memcmp and strncmp],
413 [1])
414 ])
415
416 AS_IF(
417 [test "x$ac_cv_func_memcpy" != xyes && test "x$ac_cv_func_strncpy" != xyes],
418 [AC_MSG_FAILURE(
419 [Missing functions: memcpy and strncpy],
420 [1])
421 ])
422
423 AS_IF(
424 [test "x$ac_cv_func_memrchr" = xyes],
425 [AC_CHECK_DECLS([memrchr])
426
427 AS_IF(
428 [test "x$ac_cv_decl_memrchr" != xyes],
429 [ac_cv_func_memrchr=no])
430 ])
431
432 AS_IF(
433 [test "x$ac_cv_func_memrchr" != xyes && test "x$ac_cv_func_strrchr" != xyes],
434 [AC_MSG_FAILURE(
435 [Missing functions: strrchr and memrchr],
436 [1])
437 ])
438
439 AS_IF(
440 [test "x$ac_cv_func_snprintf" != xyes],
441 [AC_MSG_FAILURE(
442 [Missing function: snprintf],
443 [1])
444 ])
445
446 AS_IF(
447 [test "x$ac_cv_func_sscanf" != xyes],
448 [AC_MSG_FAILURE(
449 [Missing function: sscanf],
450 [1])
451 ])
452
453 AS_IF(
454 [test "x$ac_cv_func_strlen" != xyes],
455 [AC_MSG_FAILURE(
456 [Missing function: strlen],
457 [1])
458 ])
459
460 AS_IF(
461 [test "x$ac_cv_func_strcasecmp" != xyes && test "x$ac_cv_func_strncasecmp" != xyes && test "x$ac_cv_func_strnicmp" != xyes],
462 [AC_MSG_FAILURE(
463 [Missing functions: strncasecmp, strcasecmp and strnicmp],
464 [1])
465 ])
466
467 AS_IF(
468 [test "x$ac_cv_func_strstr" != xyes],
469 [AC_MSG_FAILURE(
470 [Missing function: strstr],
471 [1])
472 ])
473
474 AS_IF(
475 [test "x$ac_cv_func_vsnprintf" != xyes],
476 [AC_MSG_FAILURE(
477 [Missing function: vsnprintf],
478 [1])
479 ])
480
481 dnl Wide character string functions used in common/wide_string.h
482 AS_IF(
483 [test "x$ac_cv_enable_wide_character_type" != xno],
484 [AC_CHECK_FUNCS([swprintf towlower wcscasecmp wcschr wcslen wcsncasecmp wcsncmp wcsncpy wcsnicmp wcsrchr wcsstr wmemchr wmemcmp wmemcpy wmemrchr])
485
486 AS_IF(
487 [test "x$ac_cv_func_swprintf" != xyes],
488 [AC_MSG_FAILURE(
489 [Missing function: swprintf],
490 [1])
491 ])
492
493 AS_IF(
494 [test "x$ac_cv_func_wmemchr" != xyes && test "x$ac_cv_func_wcschr" != xyes],
495 [AC_MSG_FAILURE(
496 [Missing functions: wmemchr and wcschr],
497 [1])
498 ])
499
500 AS_IF(
501 [test "x$ac_cv_func_wmemcmp" != xyes && test "x$ac_cv_func_wcsncmp" != xyes],
502 [AC_MSG_FAILURE(
503 [Missing functions: wmemcmp and wcsncmp],
504 [1])
505 ])
506
507 AS_IF(
508 [test "x$ac_cv_func_wmemcpy" != xyes && test "x$ac_cv_func_wcsncpy" != xyes],
509 [AC_MSG_FAILURE(
510 [Missing functions: wmemcpy and wcsncpy],
511 [1])
512 ])
513
514 AS_IF(
515 [test "x$ac_cv_func_wmemrchr" != xyes && test "x$ac_cv_func_wcsrchr" != xyes],
516 [AC_MSG_FAILURE(
517 [Missing functions: wmemrchr and wcsrchr],
518 [1])
519 ])
520
521 AS_IF(
522 [test "x$ac_cv_func_wcslen" != xyes],
523 [AC_MSG_FAILURE(
524 [Missing function: wcslen],
525 [1])
526 ])
527
528 AS_IF(
529 [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],
530 [AC_MSG_FAILURE(
531 [Missing functions: wcsncasecmp, wcscasecmp, wcsnicmp and towlower],
532 [1])
533 ])
534
535 AS_IF(
536 [test "x$ac_cv_func_wcsstr" != xyes],
537 [AC_MSG_FAILURE(
538 [Missing function: wcsstr],
539 [1])
540 ])
541 ])
542
543 dnl Check for printf conversion specifier support
544 AX_COMMON_CHECK_FUNC_PRINTF_JD
545 AX_COMMON_CHECK_FUNC_PRINTF_ZD
546 ])
547
+0
-304
m4/libcstring.m4 less more
0 dnl Functions for libcstring
1 dnl
2 dnl Version: 20141014
3
4 dnl Function to detect if libcstring is available
5 dnl ac_libcstring_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
6 AC_DEFUN([AX_LIBCSTRING_CHECK_LIB],
7 [dnl Check if parameters were provided
8 AS_IF(
9 [test "x$ac_cv_with_libcstring" != x && test "x$ac_cv_with_libcstring" != xno && test "x$ac_cv_with_libcstring" != xauto-detect],
10 [AS_IF(
11 [test -d "$ac_cv_with_libcstring"],
12 [CFLAGS="$CFLAGS -I${ac_cv_with_libcstring}/include"
13 LDFLAGS="$LDFLAGS -L${ac_cv_with_libcstring}/lib"],
14 [AC_MSG_WARN([no such directory: $ac_cv_with_libcstring])
15 ])
16 ])
17
18 AS_IF(
19 [test "x$ac_cv_with_libcstring" = xno],
20 [ac_cv_libcstring=no],
21 [AS_IF(
22 [test "x$ac_cv_header_libcstring_h" = xno],
23 [ac_cv_libcstring=no],
24 [dnl Check for a pkg-config file
25 AS_IF(
26 [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"],
27 [PKG_CHECK_MODULES(
28 [libcstring],
29 [libcstring >= 20120425],
30 [ac_cv_libcstring=yes],
31 [ac_cv_libcstring=no])
32 ])
33 ])
34
35 AS_IF(
36 [test "x$ac_cv_libcstring" = xyes],
37 [ac_cv_libcstring_CPPFLAGS="$pkg_cv_libcstring_CFLAGS"
38 ac_cv_libcstring_LIBADD="$pkg_cv_libcstring_LIBS"],
39 [dnl Check for headers
40 AC_CHECK_HEADERS([libcstring.h])
41
42 AS_IF(
43 [test "x$ac_cv_header_libcstring_h" = xno],
44 [ac_cv_libcstring=no],
45 [dnl Check for the individual functions
46 ac_cv_libcstring=yes
47
48 AC_CHECK_LIB(
49 cstring,
50 libcstring_get_version,
51 [ac_cv_libcstring_dummy=yes],
52 [ac_cv_libcstring=no])
53
54 ac_cv_libcstring_LIBADD="-lcstring"
55 ])
56 ])
57 ])
58
59 AS_IF(
60 [test "x$ac_cv_libcstring" = xyes],
61 [AC_DEFINE(
62 [HAVE_LIBCSTRING],
63 [1],
64 [Define to 1 if you have the `cstring' library (-lcstring).])
65 ])
66
67 AS_IF(
68 [test "x$ac_cv_libcstring" = xyes],
69 [AC_SUBST(
70 [HAVE_LIBCSTRING],
71 [1]) ],
72 [AC_SUBST(
73 [HAVE_LIBCSTRING],
74 [0])
75 ])
76 ])
77
78 dnl Function to detect if libcstring dependencies are available
79 AC_DEFUN([AX_LIBCSTRING_CHECK_LOCAL],
80 [dnl Headers included in libcstring/libcstring_narrow_string.h
81 AC_CHECK_HEADERS([stdlib.h string.h])
82
83 dnl Headers included in libcstring/libcstring_wide.h
84 AC_CHECK_HEADERS([wchar.h wctype.h])
85
86 dnl Narrow character string functions used in libcstring/libcstring_narrow_string.h
87 AC_CHECK_FUNCS([fgets memchr memcmp memcpy memrchr snprintf sscanf strcasecmp strchr strlen strncasecmp strncmp strncpy strnicmp strrchr strstr vsnprintf])
88
89 AS_IF(
90 [test "x$ac_cv_func_fgets" != xyes],
91 [AC_MSG_FAILURE(
92 [Missing function: fgets],
93 [1])
94 ])
95
96 AS_IF(
97 [test "x$ac_cv_func_memchr" != xyes && test "x$ac_cv_func_strchr" != xyes],
98 [AC_MSG_FAILURE(
99 [Missing functions: memchr and strchr],
100 [1])
101 ])
102
103 AS_IF(
104 [test "x$ac_cv_func_memcmp" != xyes && test "x$ac_cv_func_strncmp" != xyes],
105 [AC_MSG_FAILURE(
106 [Missing functions: memcmp and strncmp],
107 [1])
108 ])
109
110 AS_IF(
111 [test "x$ac_cv_func_memcpy" != xyes && test "x$ac_cv_func_strncpy" != xyes],
112 [AC_MSG_FAILURE(
113 [Missing functions: memcpy and strncpy],
114 [1])
115 ])
116
117 AS_IF(
118 [test "x$ac_cv_func_memrchr" = xyes],
119 [AC_CHECK_DECLS([memrchr])
120
121 AS_IF(
122 [test "x$ac_cv_decl_memrchr" != xyes],
123 [ac_cv_func_memrchr=no])
124 ])
125
126 AS_IF(
127 [test "x$ac_cv_func_memrchr" != xyes && test "x$ac_cv_func_strrchr" != xyes],
128 [AC_MSG_FAILURE(
129 [Missing functions: strrchr and memrchr],
130 [1])
131 ])
132
133 AS_IF(
134 [test "x$ac_cv_func_snprintf" != xyes],
135 [AC_MSG_FAILURE(
136 [Missing function: snprintf],
137 [1])
138 ])
139
140 AS_IF(
141 [test "x$ac_cv_func_sscanf" != xyes],
142 [AC_MSG_FAILURE(
143 [Missing function: sscanf],
144 [1])
145 ])
146
147 AS_IF(
148 [test "x$ac_cv_func_strlen" != xyes],
149 [AC_MSG_FAILURE(
150 [Missing function: strlen],
151 [1])
152 ])
153
154 AS_IF(
155 [test "x$ac_cv_func_strcasecmp" != xyes && test "x$ac_cv_func_strncasecmp" != xyes && test "x$ac_cv_func_strnicmp" != xyes],
156 [AC_MSG_FAILURE(
157 [Missing functions: strncasecmp, strcasecmp and strnicmp],
158 [1])
159 ])
160
161 AS_IF(
162 [test "x$ac_cv_func_strstr" != xyes],
163 [AC_MSG_FAILURE(
164 [Missing function: strstr],
165 [1])
166 ])
167
168 AS_IF(
169 [test "x$ac_cv_func_strstr" != xyes],
170 [AC_MSG_FAILURE(
171 [Missing function: vsnprintf],
172 [1])
173 ])
174
175 dnl Wide character string functions used in libcstring/libcstring_wide_string.h
176 AS_IF(
177 [test "x$ac_cv_enable_wide_character_type" != xno],
178 [AC_CHECK_FUNCS([swprintf towlower wcscasecmp wcschr wcslen wcsncasecmp wcsncmp wcsncpy wcsnicmp wcsrchr wcsstr wmemchr wmemcmp wmemcpy wmemrchr])
179
180 AS_IF(
181 [test "x$ac_cv_func_swprintf" != xyes],
182 [AC_MSG_FAILURE(
183 [Missing function: swprintf],
184 [1])
185 ])
186
187 AS_IF(
188 [test "x$ac_cv_func_wmemchr" != xyes && test "x$ac_cv_func_wcschr" != xyes],
189 [AC_MSG_FAILURE(
190 [Missing functions: wmemchr and wcschr],
191 [1])
192 ])
193
194 AS_IF(
195 [test "x$ac_cv_func_wmemcmp" != xyes && test "x$ac_cv_func_wcsncmp" != xyes],
196 [AC_MSG_FAILURE(
197 [Missing functions: wmemcmp and wcsncmp],
198 [1])
199 ])
200
201 AS_IF(
202 [test "x$ac_cv_func_wmemcpy" != xyes && test "x$ac_cv_func_wcsncpy" != xyes],
203 [AC_MSG_FAILURE(
204 [Missing functions: wmemcpy and wcsncpy],
205 [1])
206 ])
207
208 AS_IF(
209 [test "x$ac_cv_func_wmemrchr" != xyes && test "x$ac_cv_func_wcsrchr" != xyes],
210 [AC_MSG_FAILURE(
211 [Missing functions: wmemrchr and wcsrchr],
212 [1])
213 ])
214
215 AS_IF(
216 [test "x$ac_cv_func_wcslen" != xyes],
217 [AC_MSG_FAILURE(
218 [Missing function: wcslen],
219 [1])
220 ])
221
222 AS_IF(
223 [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],
224 [AC_MSG_FAILURE(
225 [Missing functions: wcsncasecmp, wcscasecmp, wcsnicmp and towlower],
226 [1])
227 ])
228
229 AS_IF(
230 [test "x$ac_cv_func_wcsstr" != xyes],
231 [AC_MSG_FAILURE(
232 [Missing function: wcsstr],
233 [1])
234 ])
235 ])
236 ])
237
238 dnl Function to detect how to enable libcstring
239 AC_DEFUN([AX_LIBCSTRING_CHECK_ENABLE],
240 [AX_COMMON_ARG_WITH(
241 [libcstring],
242 [libcstring],
243 [search for libcstring in includedir and libdir or in the specified DIR, or no if to use local version],
244 [auto-detect],
245 [DIR])
246
247 dnl Check for a shared library version
248 AX_LIBCSTRING_CHECK_LIB
249
250 dnl Always check the dependencies
251 AX_LIBCSTRING_CHECK_LOCAL
252
253 dnl Check if the dependencies for the local library version
254 AS_IF(
255 [test "x$ac_cv_libcstring" != xyes],
256 [ac_cv_libcstring_CPPFLAGS="-I../libcstring";
257 ac_cv_libcstring_LIBADD="../libcstring/libcstring.la";
258
259 ac_cv_libcstring=local
260
261 AC_DEFINE(
262 [HAVE_LOCAL_LIBCSTRING],
263 [1],
264 [Define to 1 if the local version of libcstring is used.])
265 AC_SUBST(
266 [HAVE_LOCAL_LIBCSTRING],
267 [1])
268 ])
269
270 AM_CONDITIONAL(
271 [HAVE_LOCAL_LIBCSTRING],
272 [test "x$ac_cv_libcstring" = xlocal])
273 AS_IF(
274 [test "x$ac_cv_libcstring_CPPFLAGS" != "x"],
275 [AC_SUBST(
276 [LIBCSTRING_CPPFLAGS],
277 [$ac_cv_libcstring_CPPFLAGS])
278 ])
279 AS_IF(
280 [test "x$ac_cv_libcstring_LIBADD" != "x"],
281 [AC_SUBST(
282 [LIBCSTRING_LIBADD],
283 [$ac_cv_libcstring_LIBADD])
284 ])
285
286 AS_IF(
287 [test "x$ac_cv_libcstring" = xyes],
288 [AC_SUBST(
289 [ax_libcstring_pc_libs_private],
290 [-lcstring])
291 ])
292
293 AS_IF(
294 [test "x$ac_cv_libcstring" = xyes],
295 [AC_SUBST(
296 [ax_libcstring_spec_requires],
297 [libcstring])
298 AC_SUBST(
299 [ax_libcstring_spec_build_requires],
300 [libcstring-devel])
301 ])
302 ])
303
+0
-242
m4/libcsystem.m4 less more
0 dnl Functions for libcsystem
1 dnl
2 dnl Version: 20150629
3
4 dnl Function to detect if libcsystem is available
5 dnl ac_libcsystem_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
6 AC_DEFUN([AX_LIBCSYSTEM_CHECK_LIB],
7 [dnl Check if parameters were provided
8 AS_IF(
9 [test "x$ac_cv_with_libcsystem" != x && test "x$ac_cv_with_libcsystem" != xno && test "x$ac_cv_with_libcsystem" != xauto-detect],
10 [AS_IF(
11 [test -d "$ac_cv_with_libcsystem"],
12 [CFLAGS="$CFLAGS -I${ac_cv_with_libcsystem}/include"
13 LDFLAGS="$LDFLAGS -L${ac_cv_with_libcsystem}/lib"],
14 [AC_MSG_WARN([no such directory: $ac_cv_with_libcsystem])
15 ])
16 ])
17
18 AS_IF(
19 [test "x$ac_cv_with_libcsystem" = xno],
20 [ac_cv_libcsystem=no],
21 [dnl Check for a pkg-config file
22 AS_IF(
23 [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"],
24 [PKG_CHECK_MODULES(
25 [libcsystem],
26 [libcsystem >= 20150629],
27 [ac_cv_libcsystem=yes],
28 [ac_cv_libcsystem=no])
29 ])
30
31 AS_IF(
32 [test "x$ac_cv_libcsystem" = xyes],
33 [ac_cv_libcsystem_CPPFLAGS="$pkg_cv_libcsystem_CFLAGS"
34 ac_cv_libcsystem_LIBADD="$pkg_cv_libcsystem_LIBS"],
35 [dnl Check for headers
36 AC_CHECK_HEADERS([libcsystem.h])
37
38 AS_IF(
39 [test "x$ac_cv_header_libcsystem_h" = xno],
40 [ac_cv_libcsystem=no],
41 [dnl Check for the individual functions
42 ac_cv_libcsystem=yes
43
44 dnl Support functions
45 AC_CHECK_LIB(
46 csystem,
47 libcsystem_initialize,
48 [ac_cv_libcsystem_dummy=yes],
49 [ac_cv_libcsystem=no])
50
51 dnl Signal functions
52 AC_CHECK_LIB(
53 csystem,
54 libcsystem_signal_attach,
55 [ac_cv_libcsystem_dummy=yes],
56 [ac_cv_libcsystem=no])
57 AC_CHECK_LIB(
58 csystem,
59 libcsystem_signal_detach,
60 [ac_cv_libcsystem_dummy=yes],
61 [ac_cv_libcsystem=no])
62
63 ac_cv_libcsystem_LIBADD="-lcsystem"
64 ])
65 ])
66 ])
67
68 AS_IF(
69 [test "x$ac_cv_libcsystem" = xyes],
70 [AC_DEFINE(
71 [HAVE_LIBCSYSTEM],
72 [1],
73 [Define to 1 if you have the `csystem' library (-lcsystem).])
74 ])
75
76 AS_IF(
77 [test "x$ac_cv_libcsystem" = xyes],
78 [AC_SUBST(
79 [HAVE_LIBCSYSTEM],
80 [1]) ],
81 [AC_SUBST(
82 [HAVE_LIBCSYSTEM],
83 [0])
84 ])
85 ])
86
87 dnl Function to detect if libcsystem dependencies are available
88 AC_DEFUN([AX_LIBCSYSTEM_CHECK_LOCAL],
89 [dnl Headers included in libcsystem/libcsystem_file.h, libcsystem/libcsystem_glob.h,
90 dnl and libcsystem/libcsystem_notify.h
91 AC_CHECK_HEADERS([errno.h])
92
93 dnl Headers included in libcsystem/libcsystem_file_io.h
94 AC_CHECK_HEADERS([fcntl.h unistd.h sys/stat.h])
95
96 dnl Headers included in libcsystem/libcsystem_glob.h
97 AC_CHECK_HEADERS([glob.h])
98
99 AS_IF(
100 [test "x$ac_cv_header_glob_h" = xno],
101 [AC_CHECK_HEADERS([io.h])
102 ])
103
104 dnl Headers included in libcsystem/libcsystem_signal.h
105 AC_CHECK_HEADERS([signal.h sys/signal.h])
106
107 dnl File input/output functions used in libcsystem/libcsystem_file_io.h
108 AC_CHECK_FUNCS([close fstat ftruncate lseek open read stat write])
109
110 AS_IF(
111 [test "x$ac_cv_func_close" != xyes],
112 [AC_MSG_FAILURE(
113 [Missing function: close],
114 [1])
115 ])
116
117 AS_IF(
118 [test "x$ac_cv_func_fstat" != xyes],
119 [AC_MSG_FAILURE(
120 [Missing function: fstat],
121 [1])
122 ])
123
124 AS_IF(
125 [test "x$ac_cv_func_ftruncate" != xyes],
126 [AC_MSG_FAILURE(
127 [Missing function: ftruncate],
128 [1])
129 ])
130
131 AS_IF(
132 [test "x$ac_cv_func_lseek" != xyes],
133 [AC_MSG_FAILURE(
134 [Missing function: lseek],
135 [1])
136 ])
137
138 AS_IF(
139 [test "x$ac_cv_func_open" != xyes],
140 [AC_MSG_FAILURE(
141 [Missing function: open],
142 [1])
143 ])
144
145 AS_IF(
146 [test "x$ac_cv_func_read" != xyes],
147 [AC_MSG_FAILURE(
148 [Missing function: read],
149 [1])
150 ])
151
152 AS_IF(
153 [test "x$ac_cv_func_stat" != xyes],
154 [AC_MSG_FAILURE(
155 [Missing function: stat],
156 [1])
157 ])
158
159 AS_IF(
160 [test "x$ac_cv_func_write" != xyes],
161 [AC_MSG_FAILURE(
162 [Missing function: write],
163 [1])
164 ])
165
166 dnl Commandline argument/option parsing functions in libcsystem/libcsystem_getopt.h
167 AC_CHECK_FUNCS([getopt])
168
169 dnl Check for IO buffering functions in libcsystem/libcsystem_support.c
170 AC_CHECK_FUNCS([setvbuf])
171
172 dnl Check for internationalization functions in libcsystem/libcsystem_support.c
173 AC_CHECK_FUNCS([bindtextdomain textdomain])
174 ])
175
176 dnl Function to detect how to enable libcsystem
177 AC_DEFUN([AX_LIBCSYSTEM_CHECK_ENABLE],
178 [AX_COMMON_ARG_WITH(
179 [libcsystem],
180 [libcsystem],
181 [search for libcsystem in includedir and libdir or in the specified DIR, or no if to use local version],
182 [auto-detect],
183 [DIR])
184
185 dnl Check for a shared library version
186 AX_LIBCSYSTEM_CHECK_LIB
187
188 dnl Always check the dependencies
189 AX_LIBCSYSTEM_CHECK_LOCAL
190
191 dnl Check if the dependencies for the local library version
192 AS_IF(
193 [test "x$ac_cv_libcsystem" != xyes],
194 [ac_cv_libcsystem_CPPFLAGS="-I../libcsystem";
195 ac_cv_libcsystem_LIBADD="../libcsystem/libcsystem.la";
196
197 ac_cv_libcsystem=local
198
199 AC_DEFINE(
200 [HAVE_LOCAL_LIBCSYSTEM],
201 [1],
202 [Define to 1 if the local version of libcsystem is used.])
203 AC_SUBST(
204 [HAVE_LOCAL_LIBCSYSTEM],
205 [1])
206 ])
207
208 AM_CONDITIONAL(
209 [HAVE_LOCAL_LIBCSYSTEM],
210 [test "x$ac_cv_libcsystem" = xlocal])
211 AS_IF(
212 [test "x$ac_cv_libcsystem_CPPFLAGS" != "x"],
213 [AC_SUBST(
214 [LIBCSYSTEM_CPPFLAGS],
215 [$ac_cv_libcsystem_CPPFLAGS])
216 ])
217 AS_IF(
218 [test "x$ac_cv_libcsystem_LIBADD" != "x"],
219 [AC_SUBST(
220 [LIBCSYSTEM_LIBADD],
221 [$ac_cv_libcsystem_LIBADD])
222 ])
223
224 AS_IF(
225 [test "x$ac_cv_libcsystem" = xyes],
226 [AC_SUBST(
227 [ax_libcsystem_pc_libs_private],
228 [-lstring])
229 ])
230
231 AS_IF(
232 [test "x$ac_cv_libcsystem" = xyes],
233 [AC_SUBST(
234 [ax_libcsystem_spec_requires],
235 [libcsystem])
236 AC_SUBST(
237 [ax_libcsystem_spec_build_requires],
238 [libcsystem-devel])
239 ])
240 ])
241
00 dnl Functions for libfwnt
11 dnl
2 dnl Version: 20160417
2 dnl Version: 20161107
33
44 dnl Function to detect if libfwnt is available
55 dnl ac_libfwnt_dummy is used to prevent AC_CHECK_LIB adding unnecessary -l<library> arguments
2323 [test "x$cross_compiling" != "xyes" && test "x$PKGCONFIG" != "x"],
2424 [PKG_CHECK_MODULES(
2525 [libfwnt],
26 [libfwnt >= 20160417],
26 [libfwnt >= 20161103],
2727 [ac_cv_libfwnt=yes],
2828 [ac_cv_libfwnt=no])
2929 ])
200200 AC_CHECK_LIB(
201201 fwnt,
202202 libfwnt_lzxpress_huffman_decompress,
203 [ac_cv_libfwnt_dummy=yes],
204 [ac_cv_libfwnt=no])
205 AC_CHECK_LIB(
206 fwnt,
207 libfwnt_lzxpress_huffman_stream_decompress,
208203 [ac_cv_libfwnt_dummy=yes],
209204 [ac_cv_libfwnt=no])
210205
00 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
11 #
2 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
3 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
4 # Foundation, Inc.
2 # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
53 # Written by Gordon Matzigkeit, 1996
64 #
75 # This file is free software; the Free Software Foundation gives
97 # modifications, as long as this notice is preserved.
108
119 m4_define([_LT_COPYING], [dnl
12 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
13 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
14 # Foundation, Inc.
15 # Written by Gordon Matzigkeit, 1996
10 # Copyright (C) 2014 Free Software Foundation, Inc.
11 # This is free software; see the source for copying conditions. There is NO
12 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
14 # GNU Libtool is free software; you can redistribute it and/or modify
15 # it under the terms of the GNU General Public License as published by
16 # the Free Software Foundation; either version 2 of of the License, or
17 # (at your option) any later version.
1618 #
17 # This file is part of GNU Libtool.
19 # As a special exception to the GNU General Public License, if you
20 # distribute this file as part of a program or library that is built
21 # using GNU Libtool, you may include this file under the same
22 # distribution terms that you use for the rest of that program.
1823 #
19 # GNU Libtool is free software; you can redistribute it and/or
20 # modify it under the terms of the GNU General Public License as
21 # published by the Free Software Foundation; either version 2 of
22 # the License, or (at your option) any later version.
23 #
24 # As a special exception to the GNU General Public License,
25 # if you distribute this file as part of a program or library that
26 # is built using GNU Libtool, you may include this file under the
27 # same distribution terms that you use for the rest of that program.
28 #
29 # GNU Libtool is distributed in the hope that it will be useful,
30 # but WITHOUT ANY WARRANTY; without even the implied warranty of
24 # GNU Libtool is distributed in the hope that it will be useful, but
25 # WITHOUT ANY WARRANTY; without even the implied warranty of
3126 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3227 # GNU General Public License for more details.
3328 #
3429 # You should have received a copy of the GNU General Public License
35 # along with GNU Libtool; see the file COPYING. If not, a copy
36 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
37 # obtained by writing to the Free Software Foundation, Inc.,
38 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
30 # along with this program. If not, see <http://www.gnu.org/licenses/>.
3931 ])
4032
41 # serial 57 LT_INIT
33 # serial 58 LT_INIT
4234
4335
4436 # LT_PREREQ(VERSION)
6658 # LT_INIT([OPTIONS])
6759 # ------------------
6860 AC_DEFUN([LT_INIT],
69 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
61 [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
7062 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
7163 AC_BEFORE([$0], [LT_LANG])dnl
7264 AC_BEFORE([$0], [LT_OUTPUT])dnl
9082 _LT_SET_OPTIONS([$0], [$1])
9183
9284 # This can be used to rebuild libtool when needed
93 LIBTOOL_DEPS="$ltmain"
85 LIBTOOL_DEPS=$ltmain
9486
9587 # Always use our own libtool.
9688 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
110102 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
111103
112104
105 # _LT_PREPARE_CC_BASENAME
106 # -----------------------
107 m4_defun([_LT_PREPARE_CC_BASENAME], [
108 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
109 func_cc_basename ()
110 {
111 for cc_temp in @S|@*""; do
112 case $cc_temp in
113 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
114 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
115 \-*) ;;
116 *) break;;
117 esac
118 done
119 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
120 }
121 ])# _LT_PREPARE_CC_BASENAME
122
123
113124 # _LT_CC_BASENAME(CC)
114125 # -------------------
115 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
126 # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
127 # but that macro is also expanded into generated libtool script, which
128 # arranges for $SED and $ECHO to be set by different means.
116129 m4_defun([_LT_CC_BASENAME],
117 [for cc_temp in $1""; do
118 case $cc_temp in
119 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
120 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
121 \-*) ;;
122 *) break;;
123 esac
124 done
125 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
130 [m4_require([_LT_PREPARE_CC_BASENAME])dnl
131 AC_REQUIRE([_LT_DECL_SED])dnl
132 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
133 func_cc_basename $1
134 cc_basename=$func_cc_basename_result
126135 ])
127136
128137
129138 # _LT_FILEUTILS_DEFAULTS
130139 # ----------------------
131140 # It is okay to use these file commands and assume they have been set
132 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
141 # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
133142 m4_defun([_LT_FILEUTILS_DEFAULTS],
134143 [: ${CP="cp -f"}
135144 : ${MV="mv -f"}
176185 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
177186 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
178187 m4_require([_LT_WITH_SYSROOT])dnl
188 m4_require([_LT_CMD_TRUNCATE])dnl
179189
180190 _LT_CONFIG_LIBTOOL_INIT([
181 # See if we are running on zsh, and set the options which allow our
191 # See if we are running on zsh, and set the options that allow our
182192 # commands through without removal of \ escapes INIT.
183 if test -n "\${ZSH_VERSION+set}" ; then
193 if test -n "\${ZSH_VERSION+set}"; then
184194 setopt NO_GLOB_SUBST
185195 fi
186196 ])
187 if test -n "${ZSH_VERSION+set}" ; then
197 if test -n "${ZSH_VERSION+set}"; then
188198 setopt NO_GLOB_SUBST
189199 fi
190200
197207 # AIX sometimes has problems with the GCC collect2 program. For some
198208 # reason, if we set the COLLECT_NAMES environment variable, the problems
199209 # vanish in a puff of smoke.
200 if test "X${COLLECT_NAMES+set}" != Xset; then
210 if test set != "${COLLECT_NAMES+set}"; then
201211 COLLECT_NAMES=
202212 export COLLECT_NAMES
203213 fi
208218 ofile=libtool
209219 can_build_shared=yes
210220
211 # All known linkers require a `.a' archive for static linking (except MSVC,
221 # All known linkers require a '.a' archive for static linking (except MSVC,
212222 # which needs '.lib').
213223 libext=a
214224
215 with_gnu_ld="$lt_cv_prog_gnu_ld"
216
217 old_CC="$CC"
218 old_CFLAGS="$CFLAGS"
225 with_gnu_ld=$lt_cv_prog_gnu_ld
226
227 old_CC=$CC
228 old_CFLAGS=$CFLAGS
219229
220230 # Set sane defaults for various variables
221231 test -z "$CC" && CC=cc
268278
269279 # _LT_PROG_LTMAIN
270280 # ---------------
271 # Note that this code is called both from `configure', and `config.status'
281 # Note that this code is called both from 'configure', and 'config.status'
272282 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
273 # `config.status' has no value for ac_aux_dir unless we are using Automake,
283 # 'config.status' has no value for ac_aux_dir unless we are using Automake,
274284 # so we pass a copy along to make sure it has a sensible value anyway.
275285 m4_defun([_LT_PROG_LTMAIN],
276286 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
277287 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
278 ltmain="$ac_aux_dir/ltmain.sh"
288 ltmain=$ac_aux_dir/ltmain.sh
279289 ])# _LT_PROG_LTMAIN
280290
281291
285295
286296 # So that we can recreate a full libtool script including additional
287297 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
288 # in macros and then make a single call at the end using the `libtool'
298 # in macros and then make a single call at the end using the 'libtool'
289299 # label.
290300
291301
420430
421431 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
422432 # ------------------------------------
423 # Quote a variable value, and forward it to `config.status' so that its
424 # declaration there will have the same value as in `configure'. VARNAME
433 # Quote a variable value, and forward it to 'config.status' so that its
434 # declaration there will have the same value as in 'configure'. VARNAME
425435 # must have a single quote delimited value for this to work.
426436 m4_define([_LT_CONFIG_STATUS_DECLARE],
427437 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
445455 # Output comment and list of tags supported by the script
446456 m4_defun([_LT_LIBTOOL_TAGS],
447457 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
448 available_tags="_LT_TAGS"dnl
458 available_tags='_LT_TAGS'dnl
449459 ])
450460
451461
473483 # _LT_LIBTOOL_CONFIG_VARS
474484 # -----------------------
475485 # Produce commented declarations of non-tagged libtool config variables
476 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
486 # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
477487 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
478488 # section) are produced by _LT_LIBTOOL_TAG_VARS.
479489 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
499509 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
500510 # variables for single and double quote escaping we saved from calls
501511 # to _LT_DECL, we can put quote escaped variables declarations
502 # into `config.status', and then the shell code to quote escape them in
503 # for loops in `config.status'. Finally, any additional code accumulated
512 # into 'config.status', and then the shell code to quote escape them in
513 # for loops in 'config.status'. Finally, any additional code accumulated
504514 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
505515 m4_defun([_LT_CONFIG_COMMANDS],
506516 [AC_PROVIDE_IFELSE([LT_OUTPUT],
546556 ]], lt_decl_quote_varnames); do
547557 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
548558 *[[\\\\\\\`\\"\\\$]]*)
549 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
559 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
550560 ;;
551561 *)
552562 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
559569 ]], lt_decl_dquote_varnames); do
560570 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
561571 *[[\\\\\\\`\\"\\\$]]*)
562 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
572 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
563573 ;;
564574 *)
565575 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
575585 # Generate a child script FILE with all initialization necessary to
576586 # reuse the environment learned by the parent script, and make the
577587 # file executable. If COMMENT is supplied, it is inserted after the
578 # `#!' sequence but before initialization text begins. After this
588 # '#!' sequence but before initialization text begins. After this
579589 # macro, additional text can be appended to FILE to form the body of
580590 # the child script. The macro ends with non-zero status if the
581591 # file could not be fully written (such as if the disk is full).
597607 _AS_PREPARE
598608 exec AS_MESSAGE_FD>&1
599609 _ASEOF
600 test $lt_write_fail = 0 && chmod +x $1[]dnl
610 test 0 = "$lt_write_fail" && chmod +x $1[]dnl
601611 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
602612
603613 # LT_OUTPUT
620630 } >&AS_MESSAGE_LOG_FD
621631
622632 lt_cl_help="\
623 \`$as_me' creates a local libtool stub from the current configuration,
633 '$as_me' creates a local libtool stub from the current configuration,
624634 for use in further configure time tests before the real libtool is
625635 generated.
626636
642652 This config.lt script is free software; the Free Software Foundation
643653 gives unlimited permision to copy, distribute and modify it."
644654
645 while test $[#] != 0
655 while test 0 != $[#]
646656 do
647657 case $[1] in
648658 --version | --v* | -V )
655665 lt_cl_silent=: ;;
656666
657667 -*) AC_MSG_ERROR([unrecognized option: $[1]
658 Try \`$[0] --help' for more information.]) ;;
668 Try '$[0] --help' for more information.]) ;;
659669
660670 *) AC_MSG_ERROR([unrecognized argument: $[1]
661 Try \`$[0] --help' for more information.]) ;;
671 Try '$[0] --help' for more information.]) ;;
662672 esac
663673 shift
664674 done
684694 # open by configure. Here we exec the FD to /dev/null, effectively closing
685695 # config.log, so it can be properly (re)opened and appended to by config.lt.
686696 lt_cl_success=:
687 test "$silent" = yes &&
697 test yes = "$silent" &&
688698 lt_config_lt_args="$lt_config_lt_args --quiet"
689699 exec AS_MESSAGE_LOG_FD>/dev/null
690700 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
704714 _LT_CONFIG_SAVE_COMMANDS([
705715 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
706716 m4_if(_LT_TAG, [C], [
707 # See if we are running on zsh, and set the options which allow our
717 # See if we are running on zsh, and set the options that allow our
708718 # commands through without removal of \ escapes.
709 if test -n "${ZSH_VERSION+set}" ; then
719 if test -n "${ZSH_VERSION+set}"; then
710720 setopt NO_GLOB_SUBST
711721 fi
712722
713 cfgfile="${ofile}T"
723 cfgfile=${ofile}T
714724 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
715725 $RM "$cfgfile"
716726
717727 cat <<_LT_EOF >> "$cfgfile"
718728 #! $SHELL
719
720 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
721 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
729 # Generated automatically by $as_me ($PACKAGE) $VERSION
722730 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
723731 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
724 #
732
733 # Provide generalized library-building support services.
734 # Written by Gordon Matzigkeit, 1996
735
725736 _LT_COPYING
726737 _LT_LIBTOOL_TAGS
738
739 # Configured defaults for sys_lib_dlsearch_path munging.
740 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
727741
728742 # ### BEGIN LIBTOOL CONFIG
729743 _LT_LIBTOOL_CONFIG_VARS
730744 _LT_LIBTOOL_TAG_VARS
731745 # ### END LIBTOOL CONFIG
746
747 _LT_EOF
748
749 cat <<'_LT_EOF' >> "$cfgfile"
750
751 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
752
753 _LT_PREPARE_MUNGE_PATH_LIST
754 _LT_PREPARE_CC_BASENAME
755
756 # ### END FUNCTIONS SHARED WITH CONFIGURE
732757
733758 _LT_EOF
734759
738763 # AIX sometimes has problems with the GCC collect2 program. For some
739764 # reason, if we set the COLLECT_NAMES environment variable, the problems
740765 # vanish in a puff of smoke.
741 if test "X${COLLECT_NAMES+set}" != Xset; then
766 if test set != "${COLLECT_NAMES+set}"; then
742767 COLLECT_NAMES=
743768 export COLLECT_NAMES
744769 fi
754779 # is reportedly fixed, but why not run on old versions too?
755780 sed '$q' "$ltmain" >> "$cfgfile" \
756781 || (rm -f "$cfgfile"; exit 1)
757
758 _LT_PROG_REPLACE_SHELLFNS
759782
760783 mv -f "$cfgfile" "$ofile" ||
761784 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
774797 [m4_if([$1], [], [
775798 PACKAGE='$PACKAGE'
776799 VERSION='$VERSION'
777 TIMESTAMP='$TIMESTAMP'
778800 RM='$RM'
779801 ofile='$ofile'], [])
780802 ])dnl /_LT_CONFIG_SAVE_COMMANDS
973995
974996 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
975997 [lt_cv_apple_cc_single_mod=no
976 if test -z "${LT_MULTI_MODULE}"; then
998 if test -z "$LT_MULTI_MODULE"; then
977999 # By default we will add the -single_module flag. You can override
9781000 # by either setting the environment variable LT_MULTI_MODULE
9791001 # non-empty at configure time, or by adding -multi_module to the
9911013 cat conftest.err >&AS_MESSAGE_LOG_FD
9921014 # Otherwise, if the output was created with a 0 exit code from
9931015 # the compiler, it worked.
994 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
1016 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
9951017 lt_cv_apple_cc_single_mod=yes
9961018 else
9971019 cat conftest.err >&AS_MESSAGE_LOG_FD
10091031 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
10101032 [lt_cv_ld_exported_symbols_list=yes],
10111033 [lt_cv_ld_exported_symbols_list=no])
1012 LDFLAGS="$save_LDFLAGS"
1034 LDFLAGS=$save_LDFLAGS
10131035 ])
10141036
10151037 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
10311053 _lt_result=$?
10321054 if test -s conftest.err && $GREP force_load conftest.err; then
10331055 cat conftest.err >&AS_MESSAGE_LOG_FD
1034 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
1056 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10351057 lt_cv_ld_force_load=yes
10361058 else
10371059 cat conftest.err >&AS_MESSAGE_LOG_FD
10411063 ])
10421064 case $host_os in
10431065 rhapsody* | darwin1.[[012]])
1044 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1066 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10451067 darwin1.*)
1046 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1068 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10471069 darwin*) # darwin 5.x on
10481070 # if running on 10.5 or later, the deployment target defaults
10491071 # to the OS version, if on x86, and 10.4, the deployment
10501072 # target defaults to 10.4. Don't you love it?
10511073 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10521074 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1053 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1054 10.[[012]]*)
1055 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1075 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
1076 10.[[012]][[,.]]*)
1077 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10561078 10.*)
1057 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1079 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10581080 esac
10591081 ;;
10601082 esac
1061 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1083 if test yes = "$lt_cv_apple_cc_single_mod"; then
10621084 _lt_dar_single_mod='$single_module'
10631085 fi
1064 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1065 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1086 if test yes = "$lt_cv_ld_exported_symbols_list"; then
1087 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10661088 else
1067 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
1089 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10681090 fi
1069 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
1091 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10701092 _lt_dsymutil='~$DSYMUTIL $lib || :'
10711093 else
10721094 _lt_dsymutil=
10861108 _LT_TAGVAR(hardcode_direct, $1)=no
10871109 _LT_TAGVAR(hardcode_automatic, $1)=yes
10881110 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
1089 if test "$lt_cv_ld_force_load" = "yes"; then
1090 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
1111 if test yes = "$lt_cv_ld_force_load"; then
1112 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
10911113 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
10921114 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
10931115 else
10941116 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
10951117 fi
10961118 _LT_TAGVAR(link_all_deplibs, $1)=yes
1097 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
1119 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
10981120 case $cc_basename in
1099 ifort*) _lt_dar_can_shared=yes ;;
1121 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
11001122 *) _lt_dar_can_shared=$GCC ;;
11011123 esac
1102 if test "$_lt_dar_can_shared" = "yes"; then
1124 if test yes = "$_lt_dar_can_shared"; then
11031125 output_verbose_link_cmd=func_echo_all
1104 _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}"
1105 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
1106 _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}"
1107 _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}"
1126 _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"
1127 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
1128 _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"
1129 _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"
11081130 m4_if([$1], [CXX],
1109 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
1110 _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}"
1111 _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}"
1131 [ if test yes != "$lt_cv_apple_cc_single_mod"; then
1132 _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"
1133 _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"
11121134 fi
11131135 ],[])
11141136 else
11281150 # Allow to override them for all tags through lt_cv_aix_libpath.
11291151 m4_defun([_LT_SYS_MODULE_PATH_AIX],
11301152 [m4_require([_LT_DECL_SED])dnl
1131 if test "${lt_cv_aix_libpath+set}" = set; then
1153 if test set = "${lt_cv_aix_libpath+set}"; then
11321154 aix_libpath=$lt_cv_aix_libpath
11331155 else
11341156 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
11461168 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11471169 fi],[])
11481170 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
1149 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
1171 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
11501172 fi
11511173 ])
11521174 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
11661188 # -----------------------
11671189 # Find how we can fake an echo command that does not interpret backslash.
11681190 # In particular, with Autoconf 2.60 or later we add some code to the start
1169 # of the generated configure script which will find a shell with a builtin
1170 # printf (which we can use as an echo command).
1191 # of the generated configure script that will find a shell with a builtin
1192 # printf (that we can use as an echo command).
11711193 m4_defun([_LT_PROG_ECHO_BACKSLASH],
11721194 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
11731195 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
11951217 # Invoke $ECHO with all args, space-separated.
11961218 func_echo_all ()
11971219 {
1198 $ECHO "$*"
1220 $ECHO "$*"
11991221 }
12001222
1201 case "$ECHO" in
1223 case $ECHO in
12021224 printf*) AC_MSG_RESULT([printf]) ;;
12031225 print*) AC_MSG_RESULT([print -r]) ;;
12041226 *) AC_MSG_RESULT([cat]) ;;
12241246 AC_DEFUN([_LT_WITH_SYSROOT],
12251247 [AC_MSG_CHECKING([for sysroot])
12261248 AC_ARG_WITH([sysroot],
1227 [ --with-sysroot[=DIR] Search for dependent libraries within DIR
1228 (or the compiler's sysroot if not specified).],
1249 [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
1250 [Search for dependent libraries within DIR (or the compiler's sysroot
1251 if not specified).])],
12291252 [], [with_sysroot=no])
12301253
12311254 dnl lt_sysroot will always be passed unquoted. We quote it here
12321255 dnl in case the user passed a directory name.
12331256 lt_sysroot=
1234 case ${with_sysroot} in #(
1257 case $with_sysroot in #(
12351258 yes)
1236 if test "$GCC" = yes; then
1259 if test yes = "$GCC"; then
12371260 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
12381261 fi
12391262 ;; #(
12431266 no|'')
12441267 ;; #(
12451268 *)
1246 AC_MSG_RESULT([${with_sysroot}])
1269 AC_MSG_RESULT([$with_sysroot])
12471270 AC_MSG_ERROR([The sysroot must be an absolute path.])
12481271 ;;
12491272 esac
12501273
12511274 AC_MSG_RESULT([${lt_sysroot:-no}])
12521275 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
1253 [dependent libraries, and in which our libraries should be installed.])])
1276 [dependent libraries, and where our libraries should be installed.])])
12541277
12551278 # _LT_ENABLE_LOCK
12561279 # ---------------
12581281 [AC_ARG_ENABLE([libtool-lock],
12591282 [AS_HELP_STRING([--disable-libtool-lock],
12601283 [avoid locking (might break parallel builds)])])
1261 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1284 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
12621285
12631286 # Some flags need to be propagated to the compiler or linker for good
12641287 # libtool support.
12651288 case $host in
12661289 ia64-*-hpux*)
1267 # Find out which ABI we are using.
1290 # Find out what ABI is being produced by ac_compile, and set mode
1291 # options accordingly.
12681292 echo 'int i;' > conftest.$ac_ext
12691293 if AC_TRY_EVAL(ac_compile); then
12701294 case `/usr/bin/file conftest.$ac_objext` in
12711295 *ELF-32*)
1272 HPUX_IA64_MODE="32"
1296 HPUX_IA64_MODE=32
12731297 ;;
12741298 *ELF-64*)
1275 HPUX_IA64_MODE="64"
1299 HPUX_IA64_MODE=64
12761300 ;;
12771301 esac
12781302 fi
12791303 rm -rf conftest*
12801304 ;;
12811305 *-*-irix6*)
1282 # Find out which ABI we are using.
1306 # Find out what ABI is being produced by ac_compile, and set linker
1307 # options accordingly.
12831308 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
12841309 if AC_TRY_EVAL(ac_compile); then
1285 if test "$lt_cv_prog_gnu_ld" = yes; then
1310 if test yes = "$lt_cv_prog_gnu_ld"; then
12861311 case `/usr/bin/file conftest.$ac_objext` in
12871312 *32-bit*)
12881313 LD="${LD-ld} -melf32bsmip"
13111336 rm -rf conftest*
13121337 ;;
13131338
1339 mips64*-*linux*)
1340 # Find out what ABI is being produced by ac_compile, and set linker
1341 # options accordingly.
1342 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
1343 if AC_TRY_EVAL(ac_compile); then
1344 emul=elf
1345 case `/usr/bin/file conftest.$ac_objext` in
1346 *32-bit*)
1347 emul="${emul}32"
1348 ;;
1349 *64-bit*)
1350 emul="${emul}64"
1351 ;;
1352 esac
1353 case `/usr/bin/file conftest.$ac_objext` in
1354 *MSB*)
1355 emul="${emul}btsmip"
1356 ;;
1357 *LSB*)
1358 emul="${emul}ltsmip"
1359 ;;
1360 esac
1361 case `/usr/bin/file conftest.$ac_objext` in
1362 *N32*)
1363 emul="${emul}n32"
1364 ;;
1365 esac
1366 LD="${LD-ld} -m $emul"
1367 fi
1368 rm -rf conftest*
1369 ;;
1370
13141371 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
13151372 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
1316 # Find out which ABI we are using.
1373 # Find out what ABI is being produced by ac_compile, and set linker
1374 # options accordingly. Note that the listed cases only cover the
1375 # situations where additional linker options are needed (such as when
1376 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
1377 # vice versa); the common cases where no linker options are needed do
1378 # not appear in the list.
13171379 echo 'int i;' > conftest.$ac_ext
13181380 if AC_TRY_EVAL(ac_compile); then
13191381 case `/usr/bin/file conftest.o` in
13231385 LD="${LD-ld} -m elf_i386_fbsd"
13241386 ;;
13251387 x86_64-*linux*)
1326 LD="${LD-ld} -m elf_i386"
1388 case `/usr/bin/file conftest.o` in
1389 *x86-64*)
1390 LD="${LD-ld} -m elf32_x86_64"
1391 ;;
1392 *)
1393 LD="${LD-ld} -m elf_i386"
1394 ;;
1395 esac
13271396 ;;
13281397 powerpc64le-*linux*)
13291398 LD="${LD-ld} -m elf32lppclinux"
13681437
13691438 *-*-sco3.2v5*)
13701439 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1371 SAVE_CFLAGS="$CFLAGS"
1440 SAVE_CFLAGS=$CFLAGS
13721441 CFLAGS="$CFLAGS -belf"
13731442 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
13741443 [AC_LANG_PUSH(C)
13751444 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
13761445 AC_LANG_POP])
1377 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1446 if test yes != "$lt_cv_cc_needs_belf"; then
13781447 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1379 CFLAGS="$SAVE_CFLAGS"
1448 CFLAGS=$SAVE_CFLAGS
13801449 fi
13811450 ;;
13821451 *-*solaris*)
1383 # Find out which ABI we are using.
1452 # Find out what ABI is being produced by ac_compile, and set linker
1453 # options accordingly.
13841454 echo 'int i;' > conftest.$ac_ext
13851455 if AC_TRY_EVAL(ac_compile); then
13861456 case `/usr/bin/file conftest.o` in
13881458 case $lt_cv_prog_gnu_ld in
13891459 yes*)
13901460 case $host in
1391 i?86-*-solaris*)
1461 i?86-*-solaris*|x86_64-*-solaris*)
13921462 LD="${LD-ld} -m elf_x86_64"
13931463 ;;
13941464 sparc*-*-solaris*)
13971467 esac
13981468 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
13991469 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
1400 LD="${LD-ld}_sol2"
1470 LD=${LD-ld}_sol2
14011471 fi
14021472 ;;
14031473 *)
14131483 ;;
14141484 esac
14151485
1416 need_locks="$enable_libtool_lock"
1486 need_locks=$enable_libtool_lock
14171487 ])# _LT_ENABLE_LOCK
14181488
14191489
14321502 [echo conftest.$ac_objext > conftest.lst
14331503 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
14341504 AC_TRY_EVAL([lt_ar_try])
1435 if test "$ac_status" -eq 0; then
1505 if test 0 -eq "$ac_status"; then
14361506 # Ensure the archiver fails upon bogus file names.
14371507 rm -f conftest.$ac_objext libconftest.a
14381508 AC_TRY_EVAL([lt_ar_try])
1439 if test "$ac_status" -ne 0; then
1509 if test 0 -ne "$ac_status"; then
14401510 lt_cv_ar_at_file=@
14411511 fi
14421512 fi
14441514 ])
14451515 ])
14461516
1447 if test "x$lt_cv_ar_at_file" = xno; then
1517 if test no = "$lt_cv_ar_at_file"; then
14481518 archiver_list_spec=
14491519 else
14501520 archiver_list_spec=$lt_cv_ar_at_file
14751545
14761546 if test -n "$RANLIB"; then
14771547 case $host_os in
1478 openbsd*)
1548 bitrig* | openbsd*)
14791549 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
14801550 ;;
14811551 *)
15111581 [$2=no
15121582 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
15131583 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1514 lt_compiler_flag="$3"
1584 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
15151585 # Insert the option either (1) after the last *FLAGS variable, or
15161586 # (2) before a word containing "conftest.", or (3) at the end.
15171587 # Note that $ac_compile itself does not contain backslashes and begins
15381608 $RM conftest*
15391609 ])
15401610
1541 if test x"[$]$2" = xyes; then
1611 if test yes = "[$]$2"; then
15421612 m4_if([$5], , :, [$5])
15431613 else
15441614 m4_if([$6], , :, [$6])
15601630 m4_require([_LT_DECL_SED])dnl
15611631 AC_CACHE_CHECK([$1], [$2],
15621632 [$2=no
1563 save_LDFLAGS="$LDFLAGS"
1633 save_LDFLAGS=$LDFLAGS
15641634 LDFLAGS="$LDFLAGS $3"
15651635 echo "$lt_simple_link_test_code" > conftest.$ac_ext
15661636 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
15791649 fi
15801650 fi
15811651 $RM -r conftest*
1582 LDFLAGS="$save_LDFLAGS"
1652 LDFLAGS=$save_LDFLAGS
15831653 ])
15841654
1585 if test x"[$]$2" = xyes; then
1655 if test yes = "[$]$2"; then
15861656 m4_if([$4], , :, [$4])
15871657 else
15881658 m4_if([$5], , :, [$5])
16031673 AC_MSG_CHECKING([the maximum length of command line arguments])
16041674 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
16051675 i=0
1606 teststring="ABCD"
1676 teststring=ABCD
16071677
16081678 case $build_os in
16091679 msdosdjgpp*)
16431713 lt_cv_sys_max_cmd_len=8192;
16441714 ;;
16451715
1646 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1716 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
16471717 # This has been around since 386BSD, at least. Likely further.
16481718 if test -x /sbin/sysctl; then
16491719 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
16931763 ;;
16941764 *)
16951765 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1696 if test -n "$lt_cv_sys_max_cmd_len"; then
1766 if test -n "$lt_cv_sys_max_cmd_len" && \
1767 test undefined != "$lt_cv_sys_max_cmd_len"; then
16971768 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
16981769 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
16991770 else
17001771 # Make teststring a little bigger before we do anything with it.
17011772 # a 1K string should be a reasonable start.
1702 for i in 1 2 3 4 5 6 7 8 ; do
1773 for i in 1 2 3 4 5 6 7 8; do
17031774 teststring=$teststring$teststring
17041775 done
17051776 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
17061777 # If test is not a shell built-in, we'll probably end up computing a
17071778 # maximum length that is only half of the actual maximum length, but
17081779 # we can't tell.
1709 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
1780 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
17101781 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
1711 test $i != 17 # 1/2 MB should be enough
1782 test 17 != "$i" # 1/2 MB should be enough
17121783 do
17131784 i=`expr $i + 1`
17141785 teststring=$teststring$teststring
17241795 ;;
17251796 esac
17261797 ])
1727 if test -n $lt_cv_sys_max_cmd_len ; then
1798 if test -n "$lt_cv_sys_max_cmd_len"; then
17281799 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
17291800 else
17301801 AC_MSG_RESULT(none)
17521823 # ----------------------------------------------------------------
17531824 m4_defun([_LT_TRY_DLOPEN_SELF],
17541825 [m4_require([_LT_HEADER_DLFCN])dnl
1755 if test "$cross_compiling" = yes; then :
1826 if test yes = "$cross_compiling"; then :
17561827 [$4]
17571828 else
17581829 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
17991870 # endif
18001871 #endif
18011872
1802 /* When -fvisbility=hidden is used, assume the code has been annotated
1873 /* When -fvisibility=hidden is used, assume the code has been annotated
18031874 correspondingly for the symbols needed. */
1804 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
1875 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
18051876 int fnord () __attribute__((visibility("default")));
18061877 #endif
18071878
18271898 return status;
18281899 }]
18291900 _LT_EOF
1830 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1901 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
18311902 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
18321903 lt_status=$?
18331904 case x$lt_status in
18481919 # ------------------
18491920 AC_DEFUN([LT_SYS_DLOPEN_SELF],
18501921 [m4_require([_LT_HEADER_DLFCN])dnl
1851 if test "x$enable_dlopen" != xyes; then
1922 if test yes != "$enable_dlopen"; then
18521923 enable_dlopen=unknown
18531924 enable_dlopen_self=unknown
18541925 enable_dlopen_self_static=unknown
18581929
18591930 case $host_os in
18601931 beos*)
1861 lt_cv_dlopen="load_add_on"
1932 lt_cv_dlopen=load_add_on
18621933 lt_cv_dlopen_libs=
18631934 lt_cv_dlopen_self=yes
18641935 ;;
18651936
18661937 mingw* | pw32* | cegcc*)
1867 lt_cv_dlopen="LoadLibrary"
1938 lt_cv_dlopen=LoadLibrary
18681939 lt_cv_dlopen_libs=
18691940 ;;
18701941
18711942 cygwin*)
1872 lt_cv_dlopen="dlopen"
1943 lt_cv_dlopen=dlopen
18731944 lt_cv_dlopen_libs=
18741945 ;;
18751946
18761947 darwin*)
1877 # if libdl is installed we need to link against it
1948 # if libdl is installed we need to link against it
18781949 AC_CHECK_LIB([dl], [dlopen],
1879 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1880 lt_cv_dlopen="dyld"
1950 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
1951 lt_cv_dlopen=dyld
18811952 lt_cv_dlopen_libs=
18821953 lt_cv_dlopen_self=yes
18831954 ])
18841955 ;;
18851956
1957 tpf*)
1958 # Don't try to run any link tests for TPF. We know it's impossible
1959 # because TPF is a cross-compiler, and we know how we open DSOs.
1960 lt_cv_dlopen=dlopen
1961 lt_cv_dlopen_libs=
1962 lt_cv_dlopen_self=no
1963 ;;
1964
18861965 *)
18871966 AC_CHECK_FUNC([shl_load],
1888 [lt_cv_dlopen="shl_load"],
1967 [lt_cv_dlopen=shl_load],
18891968 [AC_CHECK_LIB([dld], [shl_load],
1890 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1969 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
18911970 [AC_CHECK_FUNC([dlopen],
1892 [lt_cv_dlopen="dlopen"],
1971 [lt_cv_dlopen=dlopen],
18931972 [AC_CHECK_LIB([dl], [dlopen],
1894 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1973 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
18951974 [AC_CHECK_LIB([svld], [dlopen],
1896 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1975 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
18971976 [AC_CHECK_LIB([dld], [dld_link],
1898 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1977 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
18991978 ])
19001979 ])
19011980 ])
19041983 ;;
19051984 esac
19061985
1907 if test "x$lt_cv_dlopen" != xno; then
1986 if test no = "$lt_cv_dlopen"; then
1987 enable_dlopen=no
1988 else
19081989 enable_dlopen=yes
1909 else
1910 enable_dlopen=no
19111990 fi
19121991
19131992 case $lt_cv_dlopen in
19141993 dlopen)
1915 save_CPPFLAGS="$CPPFLAGS"
1916 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1917
1918 save_LDFLAGS="$LDFLAGS"
1994 save_CPPFLAGS=$CPPFLAGS
1995 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1996
1997 save_LDFLAGS=$LDFLAGS
19191998 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
19201999
1921 save_LIBS="$LIBS"
2000 save_LIBS=$LIBS
19222001 LIBS="$lt_cv_dlopen_libs $LIBS"
19232002
19242003 AC_CACHE_CHECK([whether a program can dlopen itself],
19282007 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
19292008 ])
19302009
1931 if test "x$lt_cv_dlopen_self" = xyes; then
2010 if test yes = "$lt_cv_dlopen_self"; then
19322011 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
19332012 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
19342013 lt_cv_dlopen_self_static, [dnl
19382017 ])
19392018 fi
19402019
1941 CPPFLAGS="$save_CPPFLAGS"
1942 LDFLAGS="$save_LDFLAGS"
1943 LIBS="$save_LIBS"
2020 CPPFLAGS=$save_CPPFLAGS
2021 LDFLAGS=$save_LDFLAGS
2022 LIBS=$save_LIBS
19442023 ;;
19452024 esac
19462025
20322111 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
20332112 _LT_COMPILER_C_O([$1])
20342113
2035 hard_links="nottested"
2036 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2114 hard_links=nottested
2115 if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
20372116 # do not overwrite the value of need_locks provided by the user
20382117 AC_MSG_CHECKING([if we can lock with hard links])
20392118 hard_links=yes
20432122 ln conftest.a conftest.b 2>&5 || hard_links=no
20442123 ln conftest.a conftest.b 2>/dev/null && hard_links=no
20452124 AC_MSG_RESULT([$hard_links])
2046 if test "$hard_links" = no; then
2047 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2125 if test no = "$hard_links"; then
2126 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
20482127 need_locks=warn
20492128 fi
20502129 else
20712150 _LT_DECL([], [objdir], [0],
20722151 [The name of the directory that contains temporary libtool files])dnl
20732152 m4_pattern_allow([LT_OBJDIR])dnl
2074 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
2075 [Define to the sub-directory in which libtool stores uninstalled libraries.])
2153 AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
2154 [Define to the sub-directory where libtool stores uninstalled libraries.])
20762155 ])# _LT_CHECK_OBJDIR
20772156
20782157
20842163 _LT_TAGVAR(hardcode_action, $1)=
20852164 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
20862165 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
2087 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2166 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
20882167
20892168 # We can hardcode non-existent directories.
2090 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
2169 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
20912170 # If the only mechanism to avoid hardcoding is shlibpath_var, we
20922171 # have to relink, otherwise we might link with an installed library
20932172 # when we should be linking with a yet-to-be-installed one
2094 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2095 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
2173 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
2174 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
20962175 # Linking always hardcodes the temporary library directory.
20972176 _LT_TAGVAR(hardcode_action, $1)=relink
20982177 else
21062185 fi
21072186 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
21082187
2109 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
2110 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
2188 if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
2189 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
21112190 # Fast installation is not supported
21122191 enable_fast_install=no
2113 elif test "$shlibpath_overrides_runpath" = yes ||
2114 test "$enable_shared" = no; then
2192 elif test yes = "$shlibpath_overrides_runpath" ||
2193 test no = "$enable_shared"; then
21152194 # Fast installation is not necessary
21162195 enable_fast_install=needless
21172196 fi
21352214 # FIXME - insert some real tests, host_os isn't really good enough
21362215 case $host_os in
21372216 darwin*)
2138 if test -n "$STRIP" ; then
2217 if test -n "$STRIP"; then
21392218 striplib="$STRIP -x"
21402219 old_striplib="$STRIP -S"
21412220 AC_MSG_RESULT([yes])
21532232 ])# _LT_CMD_STRIPLIB
21542233
21552234
2235 # _LT_PREPARE_MUNGE_PATH_LIST
2236 # ---------------------------
2237 # Make sure func_munge_path_list() is defined correctly.
2238 m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
2239 [[# func_munge_path_list VARIABLE PATH
2240 # -----------------------------------
2241 # VARIABLE is name of variable containing _space_ separated list of
2242 # directories to be munged by the contents of PATH, which is string
2243 # having a format:
2244 # "DIR[:DIR]:"
2245 # string "DIR[ DIR]" will be prepended to VARIABLE
2246 # ":DIR[:DIR]"
2247 # string "DIR[ DIR]" will be appended to VARIABLE
2248 # "DIRP[:DIRP]::[DIRA:]DIRA"
2249 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
2250 # "DIRA[ DIRA]" will be appended to VARIABLE
2251 # "DIR[:DIR]"
2252 # VARIABLE will be replaced by "DIR[ DIR]"
2253 func_munge_path_list ()
2254 {
2255 case x@S|@2 in
2256 x)
2257 ;;
2258 *:)
2259 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
2260 ;;
2261 x:*)
2262 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
2263 ;;
2264 *::*)
2265 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
2266 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
2267 ;;
2268 *)
2269 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
2270 ;;
2271 esac
2272 }
2273 ]])# _LT_PREPARE_PATH_LIST
2274
2275
21562276 # _LT_SYS_DYNAMIC_LINKER([TAG])
21572277 # -----------------------------
21582278 # PORTME Fill in your ld.so characteristics
21632283 m4_require([_LT_DECL_OBJDUMP])dnl
21642284 m4_require([_LT_DECL_SED])dnl
21652285 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2286 m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
21662287 AC_MSG_CHECKING([dynamic linker characteristics])
21672288 m4_if([$1],
21682289 [], [
2169 if test "$GCC" = yes; then
2290 if test yes = "$GCC"; then
21702291 case $host_os in
2171 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2172 *) lt_awk_arg="/^libraries:/" ;;
2292 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
2293 *) lt_awk_arg='/^libraries:/' ;;
21732294 esac
21742295 case $host_os in
2175 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
2176 *) lt_sed_strip_eq="s,=/,/,g" ;;
2296 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
2297 *) lt_sed_strip_eq='s|=/|/|g' ;;
21772298 esac
21782299 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
21792300 case $lt_search_path_spec in
21892310 ;;
21902311 esac
21912312 # Ok, now we have the path, separated by spaces, we can step through it
2192 # and add multilib dir if necessary.
2313 # and add multilib dir if necessary...
21932314 lt_tmp_lt_search_path_spec=
2194 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2315 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2316 # ...but if some path component already ends with the multilib dir we assume
2317 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
2318 case "$lt_multi_os_dir; $lt_search_path_spec " in
2319 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
2320 lt_multi_os_dir=
2321 ;;
2322 esac
21952323 for lt_sys_path in $lt_search_path_spec; do
2196 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2197 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2198 else
2324 if test -d "$lt_sys_path$lt_multi_os_dir"; then
2325 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
2326 elif test -n "$lt_multi_os_dir"; then
21992327 test -d "$lt_sys_path" && \
22002328 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
22012329 fi
22022330 done
22032331 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
2204 BEGIN {RS=" "; FS="/|\n";} {
2205 lt_foo="";
2206 lt_count=0;
2332 BEGIN {RS = " "; FS = "/|\n";} {
2333 lt_foo = "";
2334 lt_count = 0;
22072335 for (lt_i = NF; lt_i > 0; lt_i--) {
22082336 if ($lt_i != "" && $lt_i != ".") {
22092337 if ($lt_i == "..") {
22102338 lt_count++;
22112339 } else {
22122340 if (lt_count == 0) {
2213 lt_foo="/" $lt_i lt_foo;
2341 lt_foo = "/" $lt_i lt_foo;
22142342 } else {
22152343 lt_count--;
22162344 }
22242352 # for these hosts.
22252353 case $host_os in
22262354 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
2227 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
2355 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
22282356 esac
22292357 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
22302358 else
22332361 library_names_spec=
22342362 libname_spec='lib$name'
22352363 soname_spec=
2236 shrext_cmds=".so"
2364 shrext_cmds=.so
22372365 postinstall_cmds=
22382366 postuninstall_cmds=
22392367 finish_cmds=
22502378 # flags to be left without arguments
22512379 need_version=unknown
22522380
2381 AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
2382 [User-defined run-time library search path.])
2383
22532384 case $host_os in
22542385 aix3*)
22552386 version_type=linux # correct to gnu/linux during the next big refactor
2256 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2387 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
22572388 shlibpath_var=LIBPATH
22582389
22592390 # AIX 3 has no versioning support, so we append a major version to the name.
2260 soname_spec='${libname}${release}${shared_ext}$major'
2391 soname_spec='$libname$release$shared_ext$major'
22612392 ;;
22622393
22632394 aix[[4-9]]*)
22652396 need_lib_prefix=no
22662397 need_version=no
22672398 hardcode_into_libs=yes
2268 if test "$host_cpu" = ia64; then
2399 if test ia64 = "$host_cpu"; then
22692400 # AIX 5 supports IA64
2270 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2401 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
22712402 shlibpath_var=LD_LIBRARY_PATH
22722403 else
22732404 # With GCC up to 2.95.x, collect2 would create an import file
22742405 # for dependence libraries. The import file would start with
2275 # the line `#! .'. This would cause the generated library to
2276 # depend on `.', always an invalid library. This was fixed in
2406 # the line '#! .'. This would cause the generated library to
2407 # depend on '.', always an invalid library. This was fixed in
22772408 # development snapshots of GCC prior to 3.0.
22782409 case $host_os in
22792410 aix4 | aix4.[[01]] | aix4.[[01]].*)
22802411 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
22812412 echo ' yes '
2282 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
2413 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
22832414 :
22842415 else
22852416 can_build_shared=no
22862417 fi
22872418 ;;
22882419 esac
2289 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2420 # Using Import Files as archive members, it is possible to support
2421 # filename-based versioning of shared library archives on AIX. While
2422 # this would work for both with and without runtime linking, it will
2423 # prevent static linking of such archives. So we do filename-based
2424 # shared library versioning with .so extension only, which is used
2425 # when both runtime linking and shared linking is enabled.
2426 # Unfortunately, runtime linking may impact performance, so we do
2427 # not want this to be the default eventually. Also, we use the
2428 # versioned .so libs for executables only if there is the -brtl
2429 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
2430 # To allow for filename-based versioning support, we need to create
2431 # libNAME.so.V as an archive file, containing:
2432 # *) an Import File, referring to the versioned filename of the
2433 # archive as well as the shared archive member, telling the
2434 # bitwidth (32 or 64) of that shared object, and providing the
2435 # list of exported symbols of that shared object, eventually
2436 # decorated with the 'weak' keyword
2437 # *) the shared object with the F_LOADONLY flag set, to really avoid
2438 # it being seen by the linker.
2439 # At run time we better use the real file rather than another symlink,
2440 # but for link time we create the symlink libNAME.so -> libNAME.so.V
2441
2442 case $with_aix_soname,$aix_use_runtimelinking in
2443 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
22902444 # soname into executable. Probably we can add versioning support to
22912445 # collect2, so additional links can be useful in future.
2292 if test "$aix_use_runtimelinking" = yes; then
2446 aix,yes) # traditional libtool
2447 dynamic_linker='AIX unversionable lib.so'
22932448 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
22942449 # instead of lib<name>.a to let people know that these are not
22952450 # typical AIX shared libraries.
2296 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2297 else
2451 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2452 ;;
2453 aix,no) # traditional AIX only
2454 dynamic_linker='AIX lib.a[(]lib.so.V[)]'
22982455 # We preserve .a as extension for shared libraries through AIX4.2
22992456 # and later when we are not doing run time linking.
2300 library_names_spec='${libname}${release}.a $libname.a'
2301 soname_spec='${libname}${release}${shared_ext}$major'
2302 fi
2457 library_names_spec='$libname$release.a $libname.a'
2458 soname_spec='$libname$release$shared_ext$major'
2459 ;;
2460 svr4,*) # full svr4 only
2461 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
2462 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2463 # We do not specify a path in Import Files, so LIBPATH fires.
2464 shlibpath_overrides_runpath=yes
2465 ;;
2466 *,yes) # both, prefer svr4
2467 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
2468 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
2469 # unpreferred sharedlib libNAME.a needs extra handling
2470 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
2471 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
2472 # We do not specify a path in Import Files, so LIBPATH fires.
2473 shlibpath_overrides_runpath=yes
2474 ;;
2475 *,no) # both, prefer aix
2476 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
2477 library_names_spec='$libname$release.a $libname.a'
2478 soname_spec='$libname$release$shared_ext$major'
2479 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
2480 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
2481 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
2482 ;;
2483 esac
23032484 shlibpath_var=LIBPATH
23042485 fi
23052486 ;;
23092490 powerpc)
23102491 # Since July 2007 AmigaOS4 officially supports .so libraries.
23112492 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
2312 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2493 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
23132494 ;;
23142495 m68k)
23152496 library_names_spec='$libname.ixlibrary $libname.a'
23162497 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2317 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2498 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
23182499 ;;
23192500 esac
23202501 ;;
23212502
23222503 beos*)
2323 library_names_spec='${libname}${shared_ext}'
2504 library_names_spec='$libname$shared_ext'
23242505 dynamic_linker="$host_os ld.so"
23252506 shlibpath_var=LIBRARY_PATH
23262507 ;;
23282509 bsdi[[45]]*)
23292510 version_type=linux # correct to gnu/linux during the next big refactor
23302511 need_version=no
2331 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2332 soname_spec='${libname}${release}${shared_ext}$major'
2512 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2513 soname_spec='$libname$release$shared_ext$major'
23332514 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
23342515 shlibpath_var=LD_LIBRARY_PATH
23352516 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
23412522
23422523 cygwin* | mingw* | pw32* | cegcc*)
23432524 version_type=windows
2344 shrext_cmds=".dll"
2525 shrext_cmds=.dll
23452526 need_version=no
23462527 need_lib_prefix=no
23472528
23502531 # gcc
23512532 library_names_spec='$libname.dll.a'
23522533 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2353 postinstall_cmds='base_file=`basename \${file}`~
2354 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2534 postinstall_cmds='base_file=`basename \$file`~
2535 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
23552536 dldir=$destdir/`dirname \$dlpath`~
23562537 test -d \$dldir || mkdir -p \$dldir~
23572538 $install_prog $dir/$dlname \$dldir/$dlname~
23672548 case $host_os in
23682549 cygwin*)
23692550 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2370 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2551 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
23712552 m4_if([$1], [],[
23722553 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
23732554 ;;
23742555 mingw* | cegcc*)
23752556 # MinGW DLLs use traditional 'lib' prefix
2376 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2557 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
23772558 ;;
23782559 pw32*)
23792560 # pw32 DLLs use 'pw' prefix rather than 'lib'
2380 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2561 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
23812562 ;;
23822563 esac
23832564 dynamic_linker='Win32 ld.exe'
23862567 *,cl*)
23872568 # Native MSVC
23882569 libname_spec='$name'
2389 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2390 library_names_spec='${libname}.dll.lib'
2570 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
2571 library_names_spec='$libname.dll.lib'
23912572
23922573 case $build_os in
23932574 mingw*)
24142595 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
24152596 ;;
24162597 *)
2417 sys_lib_search_path_spec="$LIB"
2598 sys_lib_search_path_spec=$LIB
24182599 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
24192600 # It is most probably a Windows format PATH.
24202601 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
24272608 esac
24282609
24292610 # DLL is installed to $(libdir)/../bin by postinstall_cmds
2430 postinstall_cmds='base_file=`basename \${file}`~
2431 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
2611 postinstall_cmds='base_file=`basename \$file`~
2612 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
24322613 dldir=$destdir/`dirname \$dlpath`~
24332614 test -d \$dldir || mkdir -p \$dldir~
24342615 $install_prog $dir/$dlname \$dldir/$dlname'
24412622
24422623 *)
24432624 # Assume MSVC wrapper
2444 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2625 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
24452626 dynamic_linker='Win32 ld.exe'
24462627 ;;
24472628 esac
24542635 version_type=darwin
24552636 need_lib_prefix=no
24562637 need_version=no
2457 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2458 soname_spec='${libname}${release}${major}$shared_ext'
2638 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
2639 soname_spec='$libname$release$major$shared_ext'
24592640 shlibpath_overrides_runpath=yes
24602641 shlibpath_var=DYLD_LIBRARY_PATH
24612642 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
24682649 version_type=linux # correct to gnu/linux during the next big refactor
24692650 need_lib_prefix=no
24702651 need_version=no
2471 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2472 soname_spec='${libname}${release}${shared_ext}$major'
2652 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2653 soname_spec='$libname$release$shared_ext$major'
24732654 shlibpath_var=LD_LIBRARY_PATH
24742655 ;;
24752656
24872668 version_type=freebsd-$objformat
24882669 case $version_type in
24892670 freebsd-elf*)
2490 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2671 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2672 soname_spec='$libname$release$shared_ext$major'
24912673 need_version=no
24922674 need_lib_prefix=no
24932675 ;;
24942676 freebsd-*)
2495 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2677 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
24962678 need_version=yes
24972679 ;;
24982680 esac
25172699 esac
25182700 ;;
25192701
2520 gnu*)
2521 version_type=linux # correct to gnu/linux during the next big refactor
2522 need_lib_prefix=no
2523 need_version=no
2524 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2525 soname_spec='${libname}${release}${shared_ext}$major'
2526 shlibpath_var=LD_LIBRARY_PATH
2527 shlibpath_overrides_runpath=no
2528 hardcode_into_libs=yes
2529 ;;
2530
25312702 haiku*)
25322703 version_type=linux # correct to gnu/linux during the next big refactor
25332704 need_lib_prefix=no
25342705 need_version=no
25352706 dynamic_linker="$host_os runtime_loader"
2536 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2537 soname_spec='${libname}${release}${shared_ext}$major'
2707 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2708 soname_spec='$libname$release$shared_ext$major'
25382709 shlibpath_var=LIBRARY_PATH
2539 shlibpath_overrides_runpath=yes
2710 shlibpath_overrides_runpath=no
25402711 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
25412712 hardcode_into_libs=yes
25422713 ;;
25542725 dynamic_linker="$host_os dld.so"
25552726 shlibpath_var=LD_LIBRARY_PATH
25562727 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2557 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2558 soname_spec='${libname}${release}${shared_ext}$major'
2559 if test "X$HPUX_IA64_MODE" = X32; then
2728 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2729 soname_spec='$libname$release$shared_ext$major'
2730 if test 32 = "$HPUX_IA64_MODE"; then
25602731 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2732 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
25612733 else
25622734 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2735 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
25632736 fi
2564 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
25652737 ;;
25662738 hppa*64*)
25672739 shrext_cmds='.sl'
25692741 dynamic_linker="$host_os dld.sl"
25702742 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
25712743 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2572 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2573 soname_spec='${libname}${release}${shared_ext}$major'
2744 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2745 soname_spec='$libname$release$shared_ext$major'
25742746 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
25752747 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
25762748 ;;
25792751 dynamic_linker="$host_os dld.sl"
25802752 shlibpath_var=SHLIB_PATH
25812753 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2582 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2583 soname_spec='${libname}${release}${shared_ext}$major'
2754 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2755 soname_spec='$libname$release$shared_ext$major'
25842756 ;;
25852757 esac
25862758 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
25932765 version_type=linux # correct to gnu/linux during the next big refactor
25942766 need_lib_prefix=no
25952767 need_version=no
2596 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2597 soname_spec='${libname}${release}${shared_ext}$major'
2768 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2769 soname_spec='$libname$release$shared_ext$major'
25982770 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
25992771 shlibpath_var=LD_LIBRARY_PATH
26002772 shlibpath_overrides_runpath=no
26052777 case $host_os in
26062778 nonstopux*) version_type=nonstopux ;;
26072779 *)
2608 if test "$lt_cv_prog_gnu_ld" = yes; then
2780 if test yes = "$lt_cv_prog_gnu_ld"; then
26092781 version_type=linux # correct to gnu/linux during the next big refactor
26102782 else
26112783 version_type=irix
26132785 esac
26142786 need_lib_prefix=no
26152787 need_version=no
2616 soname_spec='${libname}${release}${shared_ext}$major'
2617 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2788 soname_spec='$libname$release$shared_ext$major'
2789 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
26182790 case $host_os in
26192791 irix5* | nonstopux*)
26202792 libsuff= shlibsuff=
26332805 esac
26342806 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
26352807 shlibpath_overrides_runpath=no
2636 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2637 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2808 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
2809 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
26382810 hardcode_into_libs=yes
26392811 ;;
26402812
26432815 dynamic_linker=no
26442816 ;;
26452817
2818 linux*android*)
2819 version_type=none # Android doesn't support versioned libraries.
2820 need_lib_prefix=no
2821 need_version=no
2822 library_names_spec='$libname$release$shared_ext'
2823 soname_spec='$libname$release$shared_ext'
2824 finish_cmds=
2825 shlibpath_var=LD_LIBRARY_PATH
2826 shlibpath_overrides_runpath=yes
2827
2828 # This implies no fast_install, which is unacceptable.
2829 # Some rework will be needed to allow for fast_install
2830 # before this can be enabled.
2831 hardcode_into_libs=yes
2832
2833 dynamic_linker='Android linker'
2834 # Don't embed -rpath directories since the linker doesn't support them.
2835 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2836 ;;
2837
26462838 # This must be glibc/ELF.
2647 linux* | k*bsd*-gnu | kopensolaris*-gnu)
2839 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
26482840 version_type=linux # correct to gnu/linux during the next big refactor
26492841 need_lib_prefix=no
26502842 need_version=no
2651 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2652 soname_spec='${libname}${release}${shared_ext}$major'
2843 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2844 soname_spec='$libname$release$shared_ext$major'
26532845 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
26542846 shlibpath_var=LD_LIBRARY_PATH
26552847 shlibpath_overrides_runpath=no
26772869 # Add ABI-specific directories to the system library path.
26782870 sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
26792871
2680 # Append ld.so.conf contents to the search path
2872 # Ideally, we could use ldconfig to report *all* directores which are
2873 # searched for libraries, however this is still not possible. Aside from not
2874 # being certain /sbin/ldconfig is available, command
2875 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
2876 # even though it is searched at run-time. Try to do the best guess by
2877 # appending ld.so.conf contents (and includes) to the search path.
26812878 if test -f /etc/ld.so.conf; then
26822879 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
26832880 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
2684
26852881 fi
26862882
26872883 # We used to test for /lib/ld.so.1 and disable shared libraries on
26982894 need_lib_prefix=no
26992895 need_version=no
27002896 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
2701 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2897 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
27022898 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
27032899 dynamic_linker='NetBSD (a.out) ld.so'
27042900 else
2705 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2706 soname_spec='${libname}${release}${shared_ext}$major'
2901 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2902 soname_spec='$libname$release$shared_ext$major'
27072903 dynamic_linker='NetBSD ld.elf_so'
27082904 fi
27092905 shlibpath_var=LD_LIBRARY_PATH
27132909
27142910 newsos6)
27152911 version_type=linux # correct to gnu/linux during the next big refactor
2716 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2912 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27172913 shlibpath_var=LD_LIBRARY_PATH
27182914 shlibpath_overrides_runpath=yes
27192915 ;;
27222918 version_type=qnx
27232919 need_lib_prefix=no
27242920 need_version=no
2725 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2726 soname_spec='${libname}${release}${shared_ext}$major'
2921 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2922 soname_spec='$libname$release$shared_ext$major'
27272923 shlibpath_var=LD_LIBRARY_PATH
27282924 shlibpath_overrides_runpath=no
27292925 hardcode_into_libs=yes
27302926 dynamic_linker='ldqnx.so'
27312927 ;;
27322928
2733 openbsd*)
2929 openbsd* | bitrig*)
27342930 version_type=sunos
2735 sys_lib_dlsearch_path_spec="/usr/lib"
2931 sys_lib_dlsearch_path_spec=/usr/lib
27362932 need_lib_prefix=no
2737 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2738 case $host_os in
2739 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2740 *) need_version=no ;;
2741 esac
2742 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2933 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
2934 need_version=no
2935 else
2936 need_version=yes
2937 fi
2938 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
27432939 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
27442940 shlibpath_var=LD_LIBRARY_PATH
2745 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2746 case $host_os in
2747 openbsd2.[[89]] | openbsd2.[[89]].*)
2748 shlibpath_overrides_runpath=no
2749 ;;
2750 *)
2751 shlibpath_overrides_runpath=yes
2752 ;;
2753 esac
2754 else
2755 shlibpath_overrides_runpath=yes
2756 fi
2941 shlibpath_overrides_runpath=yes
27572942 ;;
27582943
27592944 os2*)
27602945 libname_spec='$name'
2761 shrext_cmds=".dll"
2946 version_type=windows
2947 shrext_cmds=.dll
2948 need_version=no
27622949 need_lib_prefix=no
2763 library_names_spec='$libname${shared_ext} $libname.a'
2950 # OS/2 can only load a DLL with a base name of 8 characters or less.
2951 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
2952 v=$($ECHO $release$versuffix | tr -d .-);
2953 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
2954 $ECHO $n$v`$shared_ext'
2955 library_names_spec='${libname}_dll.$libext'
27642956 dynamic_linker='OS/2 ld.exe'
2765 shlibpath_var=LIBPATH
2957 shlibpath_var=BEGINLIBPATH
2958 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2959 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2960 postinstall_cmds='base_file=`basename \$file`~
2961 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
2962 dldir=$destdir/`dirname \$dlpath`~
2963 test -d \$dldir || mkdir -p \$dldir~
2964 $install_prog $dir/$dlname \$dldir/$dlname~
2965 chmod a+x \$dldir/$dlname~
2966 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
2967 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
2968 fi'
2969 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
2970 dlpath=$dir/\$dldll~
2971 $RM \$dlpath'
27662972 ;;
27672973
27682974 osf3* | osf4* | osf5*)
27692975 version_type=osf
27702976 need_lib_prefix=no
27712977 need_version=no
2772 soname_spec='${libname}${release}${shared_ext}$major'
2773 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2978 soname_spec='$libname$release$shared_ext$major'
2979 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
27742980 shlibpath_var=LD_LIBRARY_PATH
27752981 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2776 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2982 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
27772983 ;;
27782984
27792985 rdos*)
27842990 version_type=linux # correct to gnu/linux during the next big refactor
27852991 need_lib_prefix=no
27862992 need_version=no
2787 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2788 soname_spec='${libname}${release}${shared_ext}$major'
2993 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
2994 soname_spec='$libname$release$shared_ext$major'
27892995 shlibpath_var=LD_LIBRARY_PATH
27902996 shlibpath_overrides_runpath=yes
27912997 hardcode_into_libs=yes
27953001
27963002 sunos4*)
27973003 version_type=sunos
2798 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3004 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
27993005 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
28003006 shlibpath_var=LD_LIBRARY_PATH
28013007 shlibpath_overrides_runpath=yes
2802 if test "$with_gnu_ld" = yes; then
3008 if test yes = "$with_gnu_ld"; then
28033009 need_lib_prefix=no
28043010 fi
28053011 need_version=yes
28073013
28083014 sysv4 | sysv4.3*)
28093015 version_type=linux # correct to gnu/linux during the next big refactor
2810 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2811 soname_spec='${libname}${release}${shared_ext}$major'
3016 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3017 soname_spec='$libname$release$shared_ext$major'
28123018 shlibpath_var=LD_LIBRARY_PATH
28133019 case $host_vendor in
28143020 sni)
28293035 ;;
28303036
28313037 sysv4*MP*)
2832 if test -d /usr/nec ;then
3038 if test -d /usr/nec; then
28333039 version_type=linux # correct to gnu/linux during the next big refactor
2834 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2835 soname_spec='$libname${shared_ext}.$major'
3040 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
3041 soname_spec='$libname$shared_ext.$major'
28363042 shlibpath_var=LD_LIBRARY_PATH
28373043 fi
28383044 ;;
28393045
28403046 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2841 version_type=freebsd-elf
3047 version_type=sco
28423048 need_lib_prefix=no
28433049 need_version=no
2844 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2845 soname_spec='${libname}${release}${shared_ext}$major'
3050 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
3051 soname_spec='$libname$release$shared_ext$major'
28463052 shlibpath_var=LD_LIBRARY_PATH
28473053 shlibpath_overrides_runpath=yes
28483054 hardcode_into_libs=yes
2849 if test "$with_gnu_ld" = yes; then
3055 if test yes = "$with_gnu_ld"; then
28503056 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
28513057 else
28523058 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
28643070 version_type=linux # correct to gnu/linux during the next big refactor
28653071 need_lib_prefix=no
28663072 need_version=no
2867 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3073 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
28683074 shlibpath_var=LD_LIBRARY_PATH
28693075 shlibpath_overrides_runpath=no
28703076 hardcode_into_libs=yes
28723078
28733079 uts4*)
28743080 version_type=linux # correct to gnu/linux during the next big refactor
2875 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2876 soname_spec='${libname}${release}${shared_ext}$major'
3081 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
3082 soname_spec='$libname$release$shared_ext$major'
28773083 shlibpath_var=LD_LIBRARY_PATH
28783084 ;;
28793085
28823088 ;;
28833089 esac
28843090 AC_MSG_RESULT([$dynamic_linker])
2885 test "$dynamic_linker" = no && can_build_shared=no
3091 test no = "$dynamic_linker" && can_build_shared=no
28863092
28873093 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2888 if test "$GCC" = yes; then
3094 if test yes = "$GCC"; then
28893095 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
28903096 fi
28913097
2892 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
2893 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3098 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
3099 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
28943100 fi
2895 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
2896 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3101
3102 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
3103 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
28973104 fi
3105
3106 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
3107 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
3108
3109 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
3110 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
3111
3112 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
3113 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
28983114
28993115 _LT_DECL([], [variables_saved_for_relink], [1],
29003116 [Variables whose values should be saved in libtool wrapper scripts and
29283144 [Whether we should hardcode library paths into libraries])
29293145 _LT_DECL([], [sys_lib_search_path_spec], [2],
29303146 [Compile-time system search path for libraries])
2931 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
2932 [Run-time system search path for libraries])
3147 _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
3148 [Detected run-time system search path for libraries])
3149 _LT_DECL([], [configure_time_lt_sys_library_path], [2],
3150 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
29333151 ])# _LT_SYS_DYNAMIC_LINKER
29343152
29353153
29363154 # _LT_PATH_TOOL_PREFIX(TOOL)
29373155 # --------------------------
2938 # find a file program which can recognize shared library
3156 # find a file program that can recognize shared library
29393157 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
29403158 [m4_require([_LT_DECL_EGREP])dnl
29413159 AC_MSG_CHECKING([for $1])
29423160 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
29433161 [case $MAGIC_CMD in
29443162 [[\\/*] | ?:[\\/]*])
2945 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3163 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
29463164 ;;
29473165 *)
2948 lt_save_MAGIC_CMD="$MAGIC_CMD"
2949 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3166 lt_save_MAGIC_CMD=$MAGIC_CMD
3167 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
29503168 dnl $ac_dummy forces splitting on constant user-supplied paths.
29513169 dnl POSIX.2 word splitting is done only on the output of word expansions,
29523170 dnl not every word. This closes a longstanding sh security hole.
29533171 ac_dummy="m4_if([$2], , $PATH, [$2])"
29543172 for ac_dir in $ac_dummy; do
2955 IFS="$lt_save_ifs"
3173 IFS=$lt_save_ifs
29563174 test -z "$ac_dir" && ac_dir=.
2957 if test -f $ac_dir/$1; then
2958 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3175 if test -f "$ac_dir/$1"; then
3176 lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
29593177 if test -n "$file_magic_test_file"; then
29603178 case $deplibs_check_method in
29613179 "file_magic "*)
29623180 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2963 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3181 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
29643182 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
29653183 $EGREP "$file_magic_regex" > /dev/null; then
29663184 :
29833201 break
29843202 fi
29853203 done
2986 IFS="$lt_save_ifs"
2987 MAGIC_CMD="$lt_save_MAGIC_CMD"
3204 IFS=$lt_save_ifs
3205 MAGIC_CMD=$lt_save_MAGIC_CMD
29883206 ;;
29893207 esac])
2990 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3208 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
29913209 if test -n "$MAGIC_CMD"; then
29923210 AC_MSG_RESULT($MAGIC_CMD)
29933211 else
30053223
30063224 # _LT_PATH_MAGIC
30073225 # --------------
3008 # find a file program which can recognize a shared library
3226 # find a file program that can recognize a shared library
30093227 m4_defun([_LT_PATH_MAGIC],
30103228 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
30113229 if test -z "$lt_cv_path_MAGIC_CMD"; then
30323250 AC_ARG_WITH([gnu-ld],
30333251 [AS_HELP_STRING([--with-gnu-ld],
30343252 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
3035 [test "$withval" = no || with_gnu_ld=yes],
3253 [test no = "$withval" || with_gnu_ld=yes],
30363254 [with_gnu_ld=no])dnl
30373255
30383256 ac_prog=ld
3039 if test "$GCC" = yes; then
3257 if test yes = "$GCC"; then
30403258 # Check if gcc -print-prog-name=ld gives a path.
30413259 AC_MSG_CHECKING([for ld used by $CC])
30423260 case $host in
30433261 *-*-mingw*)
3044 # gcc leaves a trailing carriage return which upsets mingw
3262 # gcc leaves a trailing carriage return, which upsets mingw
30453263 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
30463264 *)
30473265 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
30553273 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
30563274 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
30573275 done
3058 test -z "$LD" && LD="$ac_prog"
3276 test -z "$LD" && LD=$ac_prog
30593277 ;;
30603278 "")
30613279 # If it fails, then pretend we aren't using GCC.
30663284 with_gnu_ld=unknown
30673285 ;;
30683286 esac
3069 elif test "$with_gnu_ld" = yes; then
3287 elif test yes = "$with_gnu_ld"; then
30703288 AC_MSG_CHECKING([for GNU ld])
30713289 else
30723290 AC_MSG_CHECKING([for non-GNU ld])
30733291 fi
30743292 AC_CACHE_VAL(lt_cv_path_LD,
30753293 [if test -z "$LD"; then
3076 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3294 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
30773295 for ac_dir in $PATH; do
3078 IFS="$lt_save_ifs"
3296 IFS=$lt_save_ifs
30793297 test -z "$ac_dir" && ac_dir=.
30803298 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3081 lt_cv_path_LD="$ac_dir/$ac_prog"
3299 lt_cv_path_LD=$ac_dir/$ac_prog
30823300 # Check to see if the program is GNU ld. I'd rather use --version,
30833301 # but apparently some variants of GNU ld only accept -v.
30843302 # Break only if it was the GNU/non-GNU ld that we prefer.
30853303 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
30863304 *GNU* | *'with BFD'*)
3087 test "$with_gnu_ld" != no && break
3305 test no != "$with_gnu_ld" && break
30883306 ;;
30893307 *)
3090 test "$with_gnu_ld" != yes && break
3308 test yes != "$with_gnu_ld" && break
30913309 ;;
30923310 esac
30933311 fi
30943312 done
3095 IFS="$lt_save_ifs"
3313 IFS=$lt_save_ifs
30963314 else
3097 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3315 lt_cv_path_LD=$LD # Let the user override the test with a path.
30983316 fi])
3099 LD="$lt_cv_path_LD"
3317 LD=$lt_cv_path_LD
31003318 if test -n "$LD"; then
31013319 AC_MSG_RESULT($LD)
31023320 else
31503368 reload_cmds='$LD$reload_flag -o $output$reload_objs'
31513369 case $host_os in
31523370 cygwin* | mingw* | pw32* | cegcc*)
3153 if test "$GCC" != yes; then
3371 if test yes != "$GCC"; then
31543372 reload_cmds=false
31553373 fi
31563374 ;;
31573375 darwin*)
3158 if test "$GCC" = yes; then
3159 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3376 if test yes = "$GCC"; then
3377 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
31603378 else
31613379 reload_cmds='$LD$reload_flag -o $output$reload_objs'
31623380 fi
31653383 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
31663384 _LT_TAGDECL([], [reload_cmds], [2])dnl
31673385 ])# _LT_CMD_RELOAD
3386
3387
3388 # _LT_PATH_DD
3389 # -----------
3390 # find a working dd
3391 m4_defun([_LT_PATH_DD],
3392 [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
3393 [printf 0123456789abcdef0123456789abcdef >conftest.i
3394 cat conftest.i conftest.i >conftest2.i
3395 : ${lt_DD:=$DD}
3396 AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
3397 [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3398 cmp -s conftest.i conftest.out \
3399 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
3400 fi])
3401 rm -f conftest.i conftest2.i conftest.out])
3402 ])# _LT_PATH_DD
3403
3404
3405 # _LT_CMD_TRUNCATE
3406 # ----------------
3407 # find command to truncate a binary pipe
3408 m4_defun([_LT_CMD_TRUNCATE],
3409 [m4_require([_LT_PATH_DD])
3410 AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
3411 [printf 0123456789abcdef0123456789abcdef >conftest.i
3412 cat conftest.i conftest.i >conftest2.i
3413 lt_cv_truncate_bin=
3414 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
3415 cmp -s conftest.i conftest.out \
3416 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
3417 fi
3418 rm -f conftest.i conftest2.i conftest.out
3419 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
3420 _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
3421 [Command to truncate a binary pipe])
3422 ])# _LT_CMD_TRUNCATE
31683423
31693424
31703425 # _LT_CHECK_MAGIC_METHOD
31823437 # Need to set the preceding variable on all platforms that support
31833438 # interlibrary dependencies.
31843439 # 'none' -- dependencies not supported.
3185 # `unknown' -- same as none, but documents that we really don't know.
3440 # 'unknown' -- same as none, but documents that we really don't know.
31863441 # 'pass_all' -- all dependencies passed with no checks.
31873442 # 'test_compile' -- check by making test program.
31883443 # 'file_magic [[regex]]' -- check by looking for files in library path
3189 # which responds to the $file_magic_cmd with a given extended regex.
3190 # If you have `file' or equivalent on your system and you're not sure
3191 # whether `pass_all' will *always* work, you probably want this one.
3444 # that responds to the $file_magic_cmd with a given extended regex.
3445 # If you have 'file' or equivalent on your system and you're not sure
3446 # whether 'pass_all' will *always* work, you probably want this one.
31923447
31933448 case $host_os in
31943449 aix[[4-9]]*)
32153470 # Base MSYS/MinGW do not provide the 'file' command needed by
32163471 # func_win32_libid shell function, so use a weaker test based on 'objdump',
32173472 # unless we find 'file', for example because we are cross-compiling.
3218 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
3219 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
3473 if ( file / ) >/dev/null 2>&1; then
32203474 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
32213475 lt_cv_file_magic_cmd='func_win32_libid'
32223476 else
32503504 else
32513505 lt_cv_deplibs_check_method=pass_all
32523506 fi
3253 ;;
3254
3255 gnu*)
3256 lt_cv_deplibs_check_method=pass_all
32573507 ;;
32583508
32593509 haiku*)
32943544 ;;
32953545
32963546 # This must be glibc/ELF.
3297 linux* | k*bsd*-gnu | kopensolaris*-gnu)
3547 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
32983548 lt_cv_deplibs_check_method=pass_all
32993549 ;;
33003550
33163566 lt_cv_deplibs_check_method=pass_all
33173567 ;;
33183568
3319 openbsd*)
3320 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3569 openbsd* | bitrig*)
3570 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
33213571 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
33223572 else
33233573 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
33703620 tpf*)
33713621 lt_cv_deplibs_check_method=pass_all
33723622 ;;
3623 os2*)
3624 lt_cv_deplibs_check_method=pass_all
3625 ;;
33733626 esac
33743627 ])
33753628
34103663 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
34113664 [if test -n "$NM"; then
34123665 # Let the user override the test.
3413 lt_cv_path_NM="$NM"
3666 lt_cv_path_NM=$NM
34143667 else
3415 lt_nm_to_check="${ac_tool_prefix}nm"
3668 lt_nm_to_check=${ac_tool_prefix}nm
34163669 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
34173670 lt_nm_to_check="$lt_nm_to_check nm"
34183671 fi
34193672 for lt_tmp_nm in $lt_nm_to_check; do
3420 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3673 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
34213674 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3422 IFS="$lt_save_ifs"
3675 IFS=$lt_save_ifs
34233676 test -z "$ac_dir" && ac_dir=.
3424 tmp_nm="$ac_dir/$lt_tmp_nm"
3425 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3677 tmp_nm=$ac_dir/$lt_tmp_nm
3678 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
34263679 # Check to see if the nm accepts a BSD-compat flag.
3427 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3680 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
34283681 # nm: unknown option "B" ignored
34293682 # Tru64's nm complains that /dev/null is an invalid object file
3430 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3431 */dev/null* | *'Invalid file or object type'*)
3683 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
3684 case $build_os in
3685 mingw*) lt_bad_file=conftest.nm/nofile ;;
3686 *) lt_bad_file=/dev/null ;;
3687 esac
3688 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
3689 *$lt_bad_file* | *'Invalid file or object type'*)
34323690 lt_cv_path_NM="$tmp_nm -B"
3433 break
3691 break 2
34343692 ;;
34353693 *)
34363694 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
34373695 */dev/null*)
34383696 lt_cv_path_NM="$tmp_nm -p"
3439 break
3697 break 2
34403698 ;;
34413699 *)
34423700 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
34473705 esac
34483706 fi
34493707 done
3450 IFS="$lt_save_ifs"
3708 IFS=$lt_save_ifs
34513709 done
34523710 : ${lt_cv_path_NM=no}
34533711 fi])
3454 if test "$lt_cv_path_NM" != "no"; then
3455 NM="$lt_cv_path_NM"
3712 if test no != "$lt_cv_path_NM"; then
3713 NM=$lt_cv_path_NM
34563714 else
34573715 # Didn't find any BSD compatible name lister, look for dumpbin.
34583716 if test -n "$DUMPBIN"; then :
34593717 # Let the user override the test.
34603718 else
34613719 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
3462 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
3720 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
34633721 *COFF*)
3464 DUMPBIN="$DUMPBIN -symbols"
3722 DUMPBIN="$DUMPBIN -symbols -headers"
34653723 ;;
34663724 *)
34673725 DUMPBIN=:
34693727 esac
34703728 fi
34713729 AC_SUBST([DUMPBIN])
3472 if test "$DUMPBIN" != ":"; then
3473 NM="$DUMPBIN"
3730 if test : != "$DUMPBIN"; then
3731 NM=$DUMPBIN
34743732 fi
34753733 fi
34763734 test -z "$NM" && NM=nm
35163774
35173775 case $host_os in
35183776 cygwin* | mingw* | pw32* | cegcc*)
3519 # two different shell functions defined in ltmain.sh
3520 # decide which to use based on capabilities of $DLLTOOL
3777 # two different shell functions defined in ltmain.sh;
3778 # decide which one to use based on capabilities of $DLLTOOL
35213779 case `$DLLTOOL --help 2>&1` in
35223780 *--identify-strict*)
35233781 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
35293787 ;;
35303788 *)
35313789 # fallback: assume linklib IS sharedlib
3532 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
3790 lt_cv_sharedlib_from_linklib_cmd=$ECHO
35333791 ;;
35343792 esac
35353793 ])
35563814 lt_cv_path_mainfest_tool=yes
35573815 fi
35583816 rm -f conftest*])
3559 if test "x$lt_cv_path_mainfest_tool" != xyes; then
3817 if test yes != "$lt_cv_path_mainfest_tool"; then
35603818 MANIFEST_TOOL=:
35613819 fi
35623820 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
35633821 ])# _LT_PATH_MANIFEST_TOOL
3822
3823
3824 # _LT_DLL_DEF_P([FILE])
3825 # ---------------------
3826 # True iff FILE is a Windows DLL '.def' file.
3827 # Keep in sync with func_dll_def_p in the libtool script
3828 AC_DEFUN([_LT_DLL_DEF_P],
3829 [dnl
3830 test DEF = "`$SED -n dnl
3831 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
3832 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
3833 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
3834 -e q dnl Only consider the first "real" line
3835 $1`" dnl
3836 ])# _LT_DLL_DEF_P
35643837
35653838
35663839 # LT_LIB_M
35743847 # These system don't have libm, or don't need it
35753848 ;;
35763849 *-ncr-sysv4.3*)
3577 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3850 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
35783851 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
35793852 ;;
35803853 *)
3581 AC_CHECK_LIB(m, cos, LIBM="-lm")
3854 AC_CHECK_LIB(m, cos, LIBM=-lm)
35823855 ;;
35833856 esac
35843857 AC_SUBST([LIBM])
35973870
35983871 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
35993872
3600 if test "$GCC" = yes; then
3873 if test yes = "$GCC"; then
36013874 case $cc_basename in
36023875 nvcc*)
36033876 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
36493922 symcode='[[ABCDGISTW]]'
36503923 ;;
36513924 hpux*)
3652 if test "$host_cpu" = ia64; then
3925 if test ia64 = "$host_cpu"; then
36533926 symcode='[[ABCDEGRST]]'
36543927 fi
36553928 ;;
36823955 symcode='[[ABCDGIRSTW]]' ;;
36833956 esac
36843957
3958 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3959 # Gets list of data symbols to import.
3960 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
3961 # Adjust the below global symbol transforms to fixup imported variables.
3962 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
3963 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
3964 lt_c_name_lib_hook="\
3965 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
3966 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
3967 else
3968 # Disable hooks by default.
3969 lt_cv_sys_global_symbol_to_import=
3970 lt_cdecl_hook=
3971 lt_c_name_hook=
3972 lt_c_name_lib_hook=
3973 fi
3974
36853975 # Transform an extracted symbol line into a proper C declaration.
36863976 # Some systems (esp. on ia64) link data and code symbols differently,
36873977 # so use this general approach.
3688 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3978 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
3979 $lt_cdecl_hook\
3980 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
3981 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
36893982
36903983 # Transform an extracted symbol line into symbol name and symbol address
3691 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
3692 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
3984 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
3985 $lt_c_name_hook\
3986 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
3987 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
3988
3989 # Transform an extracted symbol line into symbol name with lib prefix and
3990 # symbol address.
3991 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
3992 $lt_c_name_lib_hook\
3993 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
3994 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
3995 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
36933996
36943997 # Handle CRLF in mingw tool chain
36953998 opt_cr=
37074010
37084011 # Write the raw and C identifiers.
37094012 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
3710 # Fake it for dumpbin and say T for any non-static function
3711 # and D for any global variable.
4013 # Fake it for dumpbin and say T for any non-static function,
4014 # D for any global variable and I for any imported variable.
37124015 # Also find C++ and __fastcall symbols from MSVC++,
37134016 # which start with @ or ?.
37144017 lt_cv_sys_global_symbol_pipe="$AWK ['"\
37154018 " {last_section=section; section=\$ 3};"\
37164019 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
37174020 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4021 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
4022 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
4023 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
37184024 " \$ 0!~/External *\|/{next};"\
37194025 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
37204026 " {if(hide[section]) next};"\
3721 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
3722 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
3723 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
3724 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4027 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
4028 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
4029 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
4030 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
37254031 " ' prfx=^$ac_symprfx]"
37264032 else
37274033 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
37614067 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
37624068 cat <<_LT_EOF > conftest.$ac_ext
37634069 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
3764 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
3765 /* DATA imports from DLLs on WIN32 con't be const, because runtime
4070 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
4071 /* DATA imports from DLLs on WIN32 can't be const, because runtime
37664072 relocations are performed -- see ld's documentation on pseudo-relocs. */
37674073 # define LT@&t@_DLSYM_CONST
3768 #elif defined(__osf__)
4074 #elif defined __osf__
37694075 /* This system does not cope well with relocations in const data. */
37704076 # define LT@&t@_DLSYM_CONST
37714077 #else
37914097 {
37924098 { "@PROGRAM@", (void *) 0 },
37934099 _LT_EOF
3794 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4100 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
37954101 cat <<\_LT_EOF >> conftest.$ac_ext
37964102 {0, (void *) 0}
37974103 };
38114117 mv conftest.$ac_objext conftstm.$ac_objext
38124118 lt_globsym_save_LIBS=$LIBS
38134119 lt_globsym_save_CFLAGS=$CFLAGS
3814 LIBS="conftstm.$ac_objext"
4120 LIBS=conftstm.$ac_objext
38154121 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
3816 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4122 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
38174123 pipe_works=yes
38184124 fi
38194125 LIBS=$lt_globsym_save_LIBS
38344140 rm -rf conftest* conftst*
38354141
38364142 # Do not use the global_symbol_pipe unless it works.
3837 if test "$pipe_works" = yes; then
4143 if test yes = "$pipe_works"; then
38384144 break
38394145 else
38404146 lt_cv_sys_global_symbol_pipe=
38614167 [Take the output of nm and produce a listing of raw symbols and C names])
38624168 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
38634169 [Transform the output of nm in a proper C declaration])
4170 _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
4171 [Transform the output of nm into a list of symbols to manually relocate])
38644172 _LT_DECL([global_symbol_to_c_name_address],
38654173 [lt_cv_sys_global_symbol_to_c_name_address], [1],
38664174 [Transform the output of nm in a C name address pair])
38674175 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
38684176 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
38694177 [Transform the output of nm in a C name address pair when lib prefix is needed])
4178 _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
4179 [The name lister interface])
38704180 _LT_DECL([], [nm_file_list_spec], [1],
38714181 [Specify filename containing input files for $NM])
38724182 ]) # _LT_CMD_GLOBAL_SYMBOLS
38824192
38834193 m4_if([$1], [CXX], [
38844194 # C++ specific cases for pic, static, wl, etc.
3885 if test "$GXX" = yes; then
4195 if test yes = "$GXX"; then
38864196 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
38874197 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
38884198
38894199 case $host_os in
38904200 aix*)
38914201 # All AIX code is PIC.
3892 if test "$host_cpu" = ia64; then
4202 if test ia64 = "$host_cpu"; then
38934203 # AIX 5 now supports IA64 processor
38944204 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
38954205 fi
4206 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
38964207 ;;
38974208
38984209 amigaos*)
39034214 ;;
39044215 m68k)
39054216 # FIXME: we need at least 68020 code to build shared libraries, but
3906 # adding the `-m68020' flag to GCC prevents building anything better,
3907 # like `-m68040'.
4217 # adding the '-m68020' flag to GCC prevents building anything better,
4218 # like '-m68040'.
39084219 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
39094220 ;;
39104221 esac
39204231 # (--disable-auto-import) libraries
39214232 m4_if([$1], [GCJ], [],
39224233 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4234 case $host_os in
4235 os2*)
4236 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4237 ;;
4238 esac
39234239 ;;
39244240 darwin* | rhapsody*)
39254241 # PIC is the default on this platform
39694285 case $host_os in
39704286 aix[[4-9]]*)
39714287 # All AIX code is PIC.
3972 if test "$host_cpu" = ia64; then
4288 if test ia64 = "$host_cpu"; then
39734289 # AIX 5 now supports IA64 processor
39744290 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
39754291 else
40104326 case $cc_basename in
40114327 CC*)
40124328 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4013 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4014 if test "$host_cpu" != ia64; then
4329 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
4330 if test ia64 != "$host_cpu"; then
40154331 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
40164332 fi
40174333 ;;
40184334 aCC*)
40194335 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4020 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4336 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
40214337 case $host_cpu in
40224338 hppa*64*|ia64*)
40234339 # +Z the default
40464362 ;;
40474363 esac
40484364 ;;
4049 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4365 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
40504366 case $cc_basename in
40514367 KCC*)
40524368 # KAI C++ Compiler
40544370 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
40554371 ;;
40564372 ecpc* )
4057 # old Intel C++ for x86_64 which still supported -KPIC.
4373 # old Intel C++ for x86_64, which still supported -KPIC.
40584374 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
40594375 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
40604376 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
41994515 fi
42004516 ],
42014517 [
4202 if test "$GCC" = yes; then
4518 if test yes = "$GCC"; then
42034519 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
42044520 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
42054521
42064522 case $host_os in
42074523 aix*)
42084524 # All AIX code is PIC.
4209 if test "$host_cpu" = ia64; then
4525 if test ia64 = "$host_cpu"; then
42104526 # AIX 5 now supports IA64 processor
42114527 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
42124528 fi
4529 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
42134530 ;;
42144531
42154532 amigaos*)
42204537 ;;
42214538 m68k)
42224539 # FIXME: we need at least 68020 code to build shared libraries, but
4223 # adding the `-m68020' flag to GCC prevents building anything better,
4224 # like `-m68040'.
4540 # adding the '-m68020' flag to GCC prevents building anything better,
4541 # like '-m68040'.
42254542 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
42264543 ;;
42274544 esac
42384555 # (--disable-auto-import) libraries
42394556 m4_if([$1], [GCJ], [],
42404557 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4558 case $host_os in
4559 os2*)
4560 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4561 ;;
4562 esac
42414563 ;;
42424564
42434565 darwin* | rhapsody*)
43084630 case $host_os in
43094631 aix*)
43104632 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4311 if test "$host_cpu" = ia64; then
4633 if test ia64 = "$host_cpu"; then
43124634 # AIX 5 now supports IA64 processor
43134635 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
43144636 else
43164638 fi
43174639 ;;
43184640
4641 darwin* | rhapsody*)
4642 # PIC is the default on this platform
4643 # Common symbols not allowed in MH_DYLIB files
4644 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4645 case $cc_basename in
4646 nagfor*)
4647 # NAG Fortran compiler
4648 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
4649 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4650 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4651 ;;
4652 esac
4653 ;;
4654
43194655 mingw* | cygwin* | pw32* | os2* | cegcc*)
43204656 # This hack is so that the source file can tell whether it is being
43214657 # built for inclusion in a dll (and should export symbols for example).
43224658 m4_if([$1], [GCJ], [],
43234659 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4660 case $host_os in
4661 os2*)
4662 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
4663 ;;
4664 esac
43244665 ;;
43254666
43264667 hpux9* | hpux10* | hpux11*)
43364677 ;;
43374678 esac
43384679 # Is there a better lt_prog_compiler_static that works with the bundled CC?
4339 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4680 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
43404681 ;;
43414682
43424683 irix5* | irix6* | nonstopux*)
43454686 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
43464687 ;;
43474688
4348 linux* | k*bsd*-gnu | kopensolaris*-gnu)
4689 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
43494690 case $cc_basename in
4350 # old Intel for x86_64 which still supported -KPIC.
4691 # old Intel for x86_64, which still supported -KPIC.
43514692 ecc*)
43524693 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
43534694 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
43714712 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
43724713 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
43734714 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4715 ;;
4716 tcc*)
4717 # Fabrice Bellard et al's Tiny C Compiler
4718 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4719 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4720 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
43744721 ;;
43754722 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
43764723 # Portland Group compilers (*not* the Pentium gcc compiler,
44694816 ;;
44704817
44714818 sysv4*MP*)
4472 if test -d /usr/nec ;then
4819 if test -d /usr/nec; then
44734820 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
44744821 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
44754822 fi
44984845 fi
44994846 ])
45004847 case $host_os in
4501 # For platforms which do not support PIC, -DPIC is meaningless:
4848 # For platforms that do not support PIC, -DPIC is meaningless:
45024849 *djgpp*)
45034850 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
45044851 ;;
45644911 case $host_os in
45654912 aix[[4-9]]*)
45664913 # If we're using GNU nm, then we don't want the "-C" option.
4567 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4568 # Also, AIX nm treats weak defined symbols like other global defined
4569 # symbols, whereas GNU nm marks them as "W".
4914 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
4915 # Without the "-l" option, or with the "-B" option, AIX nm treats
4916 # weak defined symbols like other global defined symbols, whereas
4917 # GNU nm marks them as "W".
4918 # While the 'weak' keyword is ignored in the Export File, we need
4919 # it in the Import File for the 'aix-soname' feature, so we have
4920 # to replace the "-B" option with "-P" for AIX nm.
45704921 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4571 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4922 _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'
45724923 else
4573 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
4924 _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'
45744925 fi
45754926 ;;
45764927 pw32*)
4577 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4928 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
45784929 ;;
45794930 cygwin* | mingw* | cegcc*)
45804931 case $cc_basename in
46204971 # included in the symbol list
46214972 _LT_TAGVAR(include_expsyms, $1)=
46224973 # exclude_expsyms can be an extended regexp of symbols to exclude
4623 # it will be wrapped by ` (' and `)$', so one must not match beginning or
4624 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
4625 # as well as any symbol that contains `d'.
4974 # it will be wrapped by ' (' and ')$', so one must not match beginning or
4975 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
4976 # as well as any symbol that contains 'd'.
46264977 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
46274978 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
46284979 # platforms (ab)use it in PIC code, but their linkers get confused if
46384989 # FIXME: the MSVC++ port hasn't been tested in a loooong time
46394990 # When not using gcc, we currently assume that we are using
46404991 # Microsoft Visual C++.
4641 if test "$GCC" != yes; then
4992 if test yes != "$GCC"; then
46424993 with_gnu_ld=no
46434994 fi
46444995 ;;
46464997 # we just hope/assume this is gcc and not c89 (= MSVC++)
46474998 with_gnu_ld=yes
46484999 ;;
4649 openbsd*)
5000 openbsd* | bitrig*)
46505001 with_gnu_ld=no
46515002 ;;
46525003 esac
46565007 # On some targets, GNU ld is compatible enough with the native linker
46575008 # that we're better off using the native interface for both.
46585009 lt_use_gnu_ld_interface=no
4659 if test "$with_gnu_ld" = yes; then
5010 if test yes = "$with_gnu_ld"; then
46605011 case $host_os in
46615012 aix*)
46625013 # The AIX port of GNU ld has always aspired to compatibility
46785029 esac
46795030 fi
46805031
4681 if test "$lt_use_gnu_ld_interface" = yes; then
5032 if test yes = "$lt_use_gnu_ld_interface"; then
46825033 # If archive_cmds runs LD, not CC, wlarc should be empty
4683 wlarc='${wl}'
5034 wlarc='$wl'
46845035
46855036 # Set some defaults for GNU ld with shared library support. These
46865037 # are reset later if shared libraries are not supported. Putting them
46875038 # here allows them to be overridden if necessary.
46885039 runpath_var=LD_RUN_PATH
4689 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4690 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5040 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5041 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
46915042 # ancient GNU ld didn't support --whole-archive et. al.
46925043 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
4693 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5044 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
46945045 else
46955046 _LT_TAGVAR(whole_archive_flag_spec, $1)=
46965047 fi
46975048 supports_anon_versioning=no
4698 case `$LD -v 2>&1` in
5049 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
46995050 *GNU\ gold*) supports_anon_versioning=yes ;;
47005051 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
47015052 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
47085059 case $host_os in
47095060 aix[[3-9]]*)
47105061 # On AIX/PPC, the GNU linker is very broken
4711 if test "$host_cpu" != ia64; then
5062 if test ia64 != "$host_cpu"; then
47125063 _LT_TAGVAR(ld_shlibs, $1)=no
47135064 cat <<_LT_EOF 1>&2
47145065
47275078 case $host_cpu in
47285079 powerpc)
47295080 # see comment about AmigaOS4 .so support
4730 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5081 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
47315082 _LT_TAGVAR(archive_expsym_cmds, $1)=''
47325083 ;;
47335084 m68k)
47435094 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
47445095 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
47455096 # support --undefined. This deserves some investigation. FIXME
4746 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5097 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
47475098 else
47485099 _LT_TAGVAR(ld_shlibs, $1)=no
47495100 fi
47535104 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
47545105 # as there is no search path for DLLs.
47555106 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4756 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5107 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
47575108 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
47585109 _LT_TAGVAR(always_export_symbols, $1)=no
47595110 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
47615112 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
47625113
47635114 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
4764 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
4765 # If the export-symbols file already is a .def file (1st line
4766 # is EXPORTS), use it as is; otherwise, prepend...
4767 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4768 cp $export_symbols $output_objdir/$soname.def;
4769 else
4770 echo EXPORTS > $output_objdir/$soname.def;
4771 cat $export_symbols >> $output_objdir/$soname.def;
4772 fi~
4773 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5115 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5116 # If the export-symbols file already is a .def file, use it as
5117 # is; otherwise, prepend EXPORTS...
5118 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5119 cp $export_symbols $output_objdir/$soname.def;
5120 else
5121 echo EXPORTS > $output_objdir/$soname.def;
5122 cat $export_symbols >> $output_objdir/$soname.def;
5123 fi~
5124 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
47745125 else
47755126 _LT_TAGVAR(ld_shlibs, $1)=no
47765127 fi
47775128 ;;
47785129
47795130 haiku*)
4780 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5131 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
47815132 _LT_TAGVAR(link_all_deplibs, $1)=yes
5133 ;;
5134
5135 os2*)
5136 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5137 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5138 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5139 shrext_cmds=.dll
5140 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5141 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5142 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5143 $ECHO EXPORTS >> $output_objdir/$libname.def~
5144 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5145 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5146 emximp -o $lib $output_objdir/$libname.def'
5147 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5148 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5149 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5150 $ECHO EXPORTS >> $output_objdir/$libname.def~
5151 prefix_cmds="$SED"~
5152 if test EXPORTS = "`$SED 1q $export_symbols`"; then
5153 prefix_cmds="$prefix_cmds -e 1d";
5154 fi~
5155 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5156 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5157 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5158 emximp -o $lib $output_objdir/$libname.def'
5159 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5160 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
47825161 ;;
47835162
47845163 interix[[3-9]]*)
47855164 _LT_TAGVAR(hardcode_direct, $1)=no
47865165 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
4787 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4788 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5166 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5167 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
47895168 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
47905169 # Instead, shared libraries are loaded at an image base (0x10000000 by
47915170 # default) and relocated if they conflict, which is a slow very memory
47925171 # consuming and fragmenting process. To avoid this, we pick a random,
47935172 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
47945173 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
4795 _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'
4796 _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'
5174 _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'
5175 _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'
47975176 ;;
47985177
47995178 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
48005179 tmp_diet=no
4801 if test "$host_os" = linux-dietlibc; then
5180 if test linux-dietlibc = "$host_os"; then
48025181 case $cc_basename in
48035182 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
48045183 esac
48055184 fi
48065185 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
4807 && test "$tmp_diet" = no
5186 && test no = "$tmp_diet"
48085187 then
48095188 tmp_addflag=' $pic_flag'
48105189 tmp_sharedflag='-shared'
48115190 case $cc_basename,$host_cpu in
48125191 pgcc*) # Portland Group C compiler
4813 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5192 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
48145193 tmp_addflag=' $pic_flag'
48155194 ;;
48165195 pgf77* | pgf90* | pgf95* | pgfortran*)
48175196 # Portland Group f77 and f90 compilers
4818 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5197 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
48195198 tmp_addflag=' $pic_flag -Mnomain' ;;
48205199 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
48215200 tmp_addflag=' -i_dynamic' ;;
48265205 lf95*) # Lahey Fortran 8.1
48275206 _LT_TAGVAR(whole_archive_flag_spec, $1)=
48285207 tmp_sharedflag='--shared' ;;
5208 nagfor*) # NAGFOR 5.3
5209 tmp_sharedflag='-Wl,-shared' ;;
48295210 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
48305211 tmp_sharedflag='-qmkshrobj'
48315212 tmp_addflag= ;;
48325213 nvcc*) # Cuda Compiler Driver 2.2
4833 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5214 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
48345215 _LT_TAGVAR(compiler_needs_object, $1)=yes
48355216 ;;
48365217 esac
48375218 case `$CC -V 2>&1 | sed 5q` in
48385219 *Sun\ C*) # Sun C 5.9
4839 _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'
5220 _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'
48405221 _LT_TAGVAR(compiler_needs_object, $1)=yes
48415222 tmp_sharedflag='-G' ;;
48425223 *Sun\ F*) # Sun Fortran 8.3
48435224 tmp_sharedflag='-G' ;;
48445225 esac
4845 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4846
4847 if test "x$supports_anon_versioning" = xyes; then
5226 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5227
5228 if test yes = "$supports_anon_versioning"; then
48485229 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4849 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4850 echo "local: *; };" >> $output_objdir/$libname.ver~
4851 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5230 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5231 echo "local: *; };" >> $output_objdir/$libname.ver~
5232 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
48525233 fi
48535234
48545235 case $cc_basename in
5236 tcc*)
5237 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
5238 ;;
48555239 xlf* | bgf* | bgxlf* | mpixlf*)
48565240 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
48575241 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
4858 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5242 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
48595243 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
4860 if test "x$supports_anon_versioning" = xyes; then
5244 if test yes = "$supports_anon_versioning"; then
48615245 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
4862 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
4863 echo "local: *; };" >> $output_objdir/$libname.ver~
4864 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5246 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5247 echo "local: *; };" >> $output_objdir/$libname.ver~
5248 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
48655249 fi
48665250 ;;
48675251 esac
48755259 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
48765260 wlarc=
48775261 else
4878 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4879 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5262 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5263 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
48805264 fi
48815265 ;;
48825266
48945278
48955279 _LT_EOF
48965280 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4897 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4898 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5281 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5282 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
48995283 else
49005284 _LT_TAGVAR(ld_shlibs, $1)=no
49015285 fi
49075291 _LT_TAGVAR(ld_shlibs, $1)=no
49085292 cat <<_LT_EOF 1>&2
49095293
4910 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5294 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
49115295 *** reliably create shared libraries on SCO systems. Therefore, libtool
49125296 *** is disabling shared libraries support. We urge you to upgrade GNU
49135297 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
49225306 # DT_RUNPATH tag from executables and libraries. But doing so
49235307 # requires that you compile everything twice, which is a pain.
49245308 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4925 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4926 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4927 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5309 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
5310 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5311 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
49285312 else
49295313 _LT_TAGVAR(ld_shlibs, $1)=no
49305314 fi
49415325
49425326 *)
49435327 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
4944 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4945 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5328 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
5329 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
49465330 else
49475331 _LT_TAGVAR(ld_shlibs, $1)=no
49485332 fi
49495333 ;;
49505334 esac
49515335
4952 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5336 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
49535337 runpath_var=
49545338 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
49555339 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
49655349 # Note: this linker hardcodes the directories in LIBPATH if there
49665350 # are no directories specified by -L.
49675351 _LT_TAGVAR(hardcode_minus_L, $1)=yes
4968 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5352 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
49695353 # Neither direct hardcoding nor static linking is supported with a
49705354 # broken collect2.
49715355 _LT_TAGVAR(hardcode_direct, $1)=unsupported
49735357 ;;
49745358
49755359 aix[[4-9]]*)
4976 if test "$host_cpu" = ia64; then
5360 if test ia64 = "$host_cpu"; then
49775361 # On IA64, the linker does run time linking by default, so we don't
49785362 # have to do anything special.
49795363 aix_use_runtimelinking=no
49805364 exp_sym_flag='-Bexport'
4981 no_entry_flag=""
5365 no_entry_flag=
49825366 else
49835367 # If we're using GNU nm, then we don't want the "-C" option.
4984 # -C means demangle to AIX nm, but means don't demangle with GNU nm
4985 # Also, AIX nm treats weak defined symbols like other global
4986 # defined symbols, whereas GNU nm marks them as "W".
5368 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
5369 # Without the "-l" option, or with the "-B" option, AIX nm treats
5370 # weak defined symbols like other global defined symbols, whereas
5371 # GNU nm marks them as "W".
5372 # While the 'weak' keyword is ignored in the Export File, we need
5373 # it in the Import File for the 'aix-soname' feature, so we have
5374 # to replace the "-B" option with "-P" for AIX nm.
49875375 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
4988 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5376 _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'
49895377 else
4990 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5378 _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'
49915379 fi
49925380 aix_use_runtimelinking=no
49935381
49945382 # Test if we are trying to use run time linking or normal
49955383 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4996 # need to do runtime linking.
5384 # have runtime linking enabled, and use it for executables.
5385 # For shared libraries, we enable/disable runtime linking
5386 # depending on the kind of the shared library created -
5387 # when "with_aix_soname,aix_use_runtimelinking" is:
5388 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
5389 # "aix,yes" lib.so shared, rtl:yes, for executables
5390 # lib.a static archive
5391 # "both,no" lib.so.V(shr.o) shared, rtl:yes
5392 # lib.a(lib.so.V) shared, rtl:no, for executables
5393 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
5394 # lib.a(lib.so.V) shared, rtl:no
5395 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
5396 # lib.a static archive
49975397 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
49985398 for ld_flag in $LDFLAGS; do
4999 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5399 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
50005400 aix_use_runtimelinking=yes
50015401 break
50025402 fi
50035403 done
5404 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
5405 # With aix-soname=svr4, we create the lib.so.V shared archives only,
5406 # so we don't have lib.a shared libs to link our executables.
5407 # We have to force runtime linking in this case.
5408 aix_use_runtimelinking=yes
5409 LDFLAGS="$LDFLAGS -Wl,-brtl"
5410 fi
50045411 ;;
50055412 esac
50065413
50195426 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
50205427 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
50215428 _LT_TAGVAR(link_all_deplibs, $1)=yes
5022 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5023
5024 if test "$GCC" = yes; then
5429 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
5430 case $with_aix_soname,$aix_use_runtimelinking in
5431 aix,*) ;; # traditional, no import file
5432 svr4,* | *,yes) # use import file
5433 # The Import File defines what to hardcode.
5434 _LT_TAGVAR(hardcode_direct, $1)=no
5435 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5436 ;;
5437 esac
5438
5439 if test yes = "$GCC"; then
50255440 case $host_os in aix4.[[012]]|aix4.[[012]].*)
50265441 # We only want to do this on AIX 4.2 and lower, the check
50275442 # below for broken collect2 doesn't work under 4.3+
5028 collect2name=`${CC} -print-prog-name=collect2`
5443 collect2name=`$CC -print-prog-name=collect2`
50295444 if test -f "$collect2name" &&
50305445 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
50315446 then
50445459 ;;
50455460 esac
50465461 shared_flag='-shared'
5047 if test "$aix_use_runtimelinking" = yes; then
5048 shared_flag="$shared_flag "'${wl}-G'
5462 if test yes = "$aix_use_runtimelinking"; then
5463 shared_flag="$shared_flag "'$wl-G'
50495464 fi
5465 # Need to ensure runtime linking is disabled for the traditional
5466 # shared library, or the linker may eventually find shared libraries
5467 # /with/ Import File - we do not want to mix them.
5468 shared_flag_aix='-shared'
5469 shared_flag_svr4='-shared $wl-G'
50505470 else
50515471 # not using gcc
5052 if test "$host_cpu" = ia64; then
5472 if test ia64 = "$host_cpu"; then
50535473 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
50545474 # chokes on -Wl,-G. The following line is correct:
50555475 shared_flag='-G'
50565476 else
5057 if test "$aix_use_runtimelinking" = yes; then
5058 shared_flag='${wl}-G'
5477 if test yes = "$aix_use_runtimelinking"; then
5478 shared_flag='$wl-G'
50595479 else
5060 shared_flag='${wl}-bM:SRE'
5480 shared_flag='$wl-bM:SRE'
50615481 fi
5482 shared_flag_aix='$wl-bM:SRE'
5483 shared_flag_svr4='$wl-G'
50625484 fi
50635485 fi
50645486
5065 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5487 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
50665488 # It seems that -bexpall does not export symbols beginning with
50675489 # underscore (_), so it is better to generate a list of symbols to export.
50685490 _LT_TAGVAR(always_export_symbols, $1)=yes
5069 if test "$aix_use_runtimelinking" = yes; then
5491 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
50705492 # Warning - without using the other runtime loading flags (-brtl),
50715493 # -berok will link without error, but may produce a broken library.
50725494 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
50735495 # Determine the default libpath from the value encoded in an
50745496 # empty executable.
50755497 _LT_SYS_MODULE_PATH_AIX([$1])
5076 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5077 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5498 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
5499 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
50785500 else
5079 if test "$host_cpu" = ia64; then
5080 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5501 if test ia64 = "$host_cpu"; then
5502 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
50815503 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5082 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5504 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
50835505 else
50845506 # Determine the default libpath from the value encoded in an
50855507 # empty executable.
50865508 _LT_SYS_MODULE_PATH_AIX([$1])
5087 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5509 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
50885510 # Warning - without using the other run time loading flags,
50895511 # -berok will link without error, but may produce a broken library.
5090 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5091 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5092 if test "$with_gnu_ld" = yes; then
5512 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
5513 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
5514 if test yes = "$with_gnu_ld"; then
50935515 # We only use this code for GNU lds that support --whole-archive.
5094 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5516 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
50955517 else
50965518 # Exported symbols can be pulled into shared objects from archives
50975519 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
50985520 fi
50995521 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
5100 # This is similar to how AIX traditionally builds its shared libraries.
5101 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5522 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
5523 # -brtl affects multiple linker settings, -berok does not and is overridden later
5524 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
5525 if test svr4 != "$with_aix_soname"; then
5526 # This is similar to how AIX traditionally builds its shared libraries.
5527 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
5528 fi
5529 if test aix != "$with_aix_soname"; then
5530 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
5531 else
5532 # used by -dlpreopen to get the symbols
5533 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
5534 fi
5535 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
51025536 fi
51035537 fi
51045538 ;;
51075541 case $host_cpu in
51085542 powerpc)
51095543 # see comment about AmigaOS4 .so support
5110 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5544 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
51115545 _LT_TAGVAR(archive_expsym_cmds, $1)=''
51125546 ;;
51135547 m68k)
51375571 # Tell ltmain to make .lib files, not .a files.
51385572 libext=lib
51395573 # Tell ltmain to make .dll files, not .so files.
5140 shrext_cmds=".dll"
5574 shrext_cmds=.dll
51415575 # FIXME: Setting linknames here is a bad hack.
5142 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
5143 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5144 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
5145 else
5146 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
5147 fi~
5148 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5149 linknames='
5576 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
5577 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
5578 cp "$export_symbols" "$output_objdir/$soname.def";
5579 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
5580 else
5581 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
5582 fi~
5583 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
5584 linknames='
51505585 # The linker will not automatically build a static lib if we build a DLL.
51515586 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
51525587 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
51555590 # Don't use ranlib
51565591 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
51575592 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
5158 lt_tool_outputfile="@TOOL_OUTPUT@"~
5159 case $lt_outputfile in
5160 *.exe|*.EXE) ;;
5161 *)
5162 lt_outputfile="$lt_outputfile.exe"
5163 lt_tool_outputfile="$lt_tool_outputfile.exe"
5164 ;;
5165 esac~
5166 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
5167 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5168 $RM "$lt_outputfile.manifest";
5169 fi'
5593 lt_tool_outputfile="@TOOL_OUTPUT@"~
5594 case $lt_outputfile in
5595 *.exe|*.EXE) ;;
5596 *)
5597 lt_outputfile=$lt_outputfile.exe
5598 lt_tool_outputfile=$lt_tool_outputfile.exe
5599 ;;
5600 esac~
5601 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
5602 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
5603 $RM "$lt_outputfile.manifest";
5604 fi'
51705605 ;;
51715606 *)
51725607 # Assume MSVC wrapper
51755610 # Tell ltmain to make .lib files, not .a files.
51765611 libext=lib
51775612 # Tell ltmain to make .dll files, not .so files.
5178 shrext_cmds=".dll"
5613 shrext_cmds=.dll
51795614 # FIXME: Setting linknames here is a bad hack.
51805615 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
51815616 # The linker will automatically build a .lib file if we build a DLL.
52255660 ;;
52265661
52275662 hpux9*)
5228 if test "$GCC" = yes; then
5229 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5663 if test yes = "$GCC"; then
5664 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
52305665 else
5231 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5666 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
52325667 fi
5233 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5668 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
52345669 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
52355670 _LT_TAGVAR(hardcode_direct, $1)=yes
52365671
52375672 # hardcode_minus_L: Not really in the search PATH,
52385673 # but as the default location of the library.
52395674 _LT_TAGVAR(hardcode_minus_L, $1)=yes
5240 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5675 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
52415676 ;;
52425677
52435678 hpux10*)
5244 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5245 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5679 if test yes,no = "$GCC,$with_gnu_ld"; then
5680 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
52465681 else
52475682 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
52485683 fi
5249 if test "$with_gnu_ld" = no; then
5250 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5684 if test no = "$with_gnu_ld"; then
5685 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
52515686 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
52525687 _LT_TAGVAR(hardcode_direct, $1)=yes
52535688 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5254 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5689 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
52555690 # hardcode_minus_L: Not really in the search PATH,
52565691 # but as the default location of the library.
52575692 _LT_TAGVAR(hardcode_minus_L, $1)=yes
52595694 ;;
52605695
52615696 hpux11*)
5262 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
5697 if test yes,no = "$GCC,$with_gnu_ld"; then
52635698 case $host_cpu in
52645699 hppa*64*)
5265 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5700 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
52665701 ;;
52675702 ia64*)
5268 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5703 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
52695704 ;;
52705705 *)
5271 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5706 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
52725707 ;;
52735708 esac
52745709 else
52755710 case $host_cpu in
52765711 hppa*64*)
5277 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5712 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
52785713 ;;
52795714 ia64*)
5280 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5715 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
52815716 ;;
52825717 *)
52835718 m4_if($1, [], [
52855720 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
52865721 _LT_LINKER_OPTION([if $CC understands -b],
52875722 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
5288 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
5723 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
52895724 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
5290 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
5725 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
52915726 ;;
52925727 esac
52935728 fi
5294 if test "$with_gnu_ld" = no; then
5295 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5729 if test no = "$with_gnu_ld"; then
5730 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
52965731 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
52975732
52985733 case $host_cpu in
53035738 *)
53045739 _LT_TAGVAR(hardcode_direct, $1)=yes
53055740 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5306 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5741 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
53075742
53085743 # hardcode_minus_L: Not really in the search PATH,
53095744 # but as the default location of the library.
53145749 ;;
53155750
53165751 irix5* | irix6* | nonstopux*)
5317 if test "$GCC" = yes; then
5318 _LT_TAGVAR(archive_cmds, $1)='$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 -o $lib'
5752 if test yes = "$GCC"; then
5753 _LT_TAGVAR(archive_cmds, $1)='$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 -o $lib'
53195754 # Try to use the -exported_symbol ld option, if it does not
53205755 # work, assume that -exports_file does not work either and
53215756 # implicitly export all symbols.
53225757 # This should be the same for all languages, so no per-tag cache variable.
53235758 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
53245759 [lt_cv_irix_exported_symbol],
5325 [save_LDFLAGS="$LDFLAGS"
5326 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
5760 [save_LDFLAGS=$LDFLAGS
5761 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
53275762 AC_LINK_IFELSE(
53285763 [AC_LANG_SOURCE(
53295764 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
53365771 end]])])],
53375772 [lt_cv_irix_exported_symbol=yes],
53385773 [lt_cv_irix_exported_symbol=no])
5339 LDFLAGS="$save_LDFLAGS"])
5340 if test "$lt_cv_irix_exported_symbol" = yes; then
5341 _LT_TAGVAR(archive_expsym_cmds, $1)='$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'
5774 LDFLAGS=$save_LDFLAGS])
5775 if test yes = "$lt_cv_irix_exported_symbol"; then
5776 _LT_TAGVAR(archive_expsym_cmds, $1)='$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'
53425777 fi
53435778 else
5344 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5345 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
5779 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
5780 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
53465781 fi
53475782 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5348 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5783 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
53495784 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
53505785 _LT_TAGVAR(inherit_rpath, $1)=yes
53515786 _LT_TAGVAR(link_all_deplibs, $1)=yes
5787 ;;
5788
5789 linux*)
5790 case $cc_basename in
5791 tcc*)
5792 # Fabrice Bellard et al's Tiny C Compiler
5793 _LT_TAGVAR(ld_shlibs, $1)=yes
5794 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5795 ;;
5796 esac
53525797 ;;
53535798
53545799 netbsd*)
53655810 newsos6)
53665811 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
53675812 _LT_TAGVAR(hardcode_direct, $1)=yes
5368 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5813 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
53695814 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
53705815 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
53715816 ;;
53735818 *nto* | *qnx*)
53745819 ;;
53755820
5376 openbsd*)
5821 openbsd* | bitrig*)
53775822 if test -f /usr/libexec/ld.so; then
53785823 _LT_TAGVAR(hardcode_direct, $1)=yes
53795824 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
53805825 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5381 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5826 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
53825827 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5383 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5384 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5385 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5828 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
5829 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
5830 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
53865831 else
5387 case $host_os in
5388 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5389 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5390 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5391 ;;
5392 *)
5393 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5394 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5395 ;;
5396 esac
5832 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5833 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
53975834 fi
53985835 else
53995836 _LT_TAGVAR(ld_shlibs, $1)=no
54045841 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
54055842 _LT_TAGVAR(hardcode_minus_L, $1)=yes
54065843 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5407 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
5408 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5844 shrext_cmds=.dll
5845 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5846 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5847 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5848 $ECHO EXPORTS >> $output_objdir/$libname.def~
5849 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
5850 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5851 emximp -o $lib $output_objdir/$libname.def'
5852 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
5853 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
5854 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
5855 $ECHO EXPORTS >> $output_objdir/$libname.def~
5856 prefix_cmds="$SED"~
5857 if test EXPORTS = "`$SED 1q $export_symbols`"; then
5858 prefix_cmds="$prefix_cmds -e 1d";
5859 fi~
5860 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
5861 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
5862 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
5863 emximp -o $lib $output_objdir/$libname.def'
5864 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
5865 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
54095866 ;;
54105867
54115868 osf3*)
5412 if test "$GCC" = yes; then
5413 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5414 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_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 -o $lib'
5869 if test yes = "$GCC"; then
5870 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5871 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_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 -o $lib'
54155872 else
54165873 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5417 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5874 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
54185875 fi
54195876 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
5420 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5877 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
54215878 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
54225879 ;;
54235880
54245881 osf4* | osf5*) # as osf3* with the addition of -msym flag
5425 if test "$GCC" = yes; then
5426 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5427 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5428 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5882 if test yes = "$GCC"; then
5883 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
5884 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
5885 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
54295886 else
54305887 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5431 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
5888 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
54325889 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
5433 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
5890 $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
54345891
54355892 # Both c and cxx compiler support -rpath directly
54365893 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
54415898
54425899 solaris*)
54435900 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
5444 if test "$GCC" = yes; then
5445 wlarc='${wl}'
5446 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5901 if test yes = "$GCC"; then
5902 wlarc='$wl'
5903 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
54475904 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5448 $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5905 $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
54495906 else
54505907 case `$CC -V 2>&1` in
54515908 *"Compilers 5.0"*)
54525909 wlarc=''
5453 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5910 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
54545911 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5455 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
5912 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
54565913 ;;
54575914 *)
5458 wlarc='${wl}'
5459 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
5915 wlarc='$wl'
5916 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
54605917 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
5461 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
5918 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
54625919 ;;
54635920 esac
54645921 fi
54685925 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
54695926 *)
54705927 # The compiler driver will combine and reorder linker options,
5471 # but understands `-z linker_flag'. GCC discards it without `$wl',
5928 # but understands '-z linker_flag'. GCC discards it without '$wl',
54725929 # but is careful enough not to reorder.
54735930 # Supported since Solaris 2.6 (maybe 2.5.1?)
5474 if test "$GCC" = yes; then
5475 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5931 if test yes = "$GCC"; then
5932 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
54765933 else
54775934 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
54785935 fi
54825939 ;;
54835940
54845941 sunos4*)
5485 if test "x$host_vendor" = xsequent; then
5942 if test sequent = "$host_vendor"; then
54865943 # Use $CC to link under sequent, because it throws in some extra .o
54875944 # files that make .init and .fini sections work.
5488 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5945 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
54895946 else
54905947 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
54915948 fi
55345991 ;;
55355992
55365993 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5537 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5994 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
55385995 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
55395996 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
55405997 runpath_var='LD_RUN_PATH'
55415998
5542 if test "$GCC" = yes; then
5543 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5544 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5999 if test yes = "$GCC"; then
6000 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6001 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
55456002 else
5546 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5547 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6003 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6004 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
55486005 fi
55496006 ;;
55506007
55516008 sysv5* | sco3.2v5* | sco5v6*)
5552 # Note: We can NOT use -z defs as we might desire, because we do not
6009 # Note: We CANNOT use -z defs as we might desire, because we do not
55536010 # link with -lc, and that would cause any symbols used from libc to
55546011 # always be unresolved, which means just about no library would
55556012 # ever link correctly. If we're not using GNU ld we use -z text
55566013 # though, which does catch some bad symbols but isn't as heavy-handed
55576014 # as -z defs.
5558 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5559 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6015 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
6016 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
55606017 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
55616018 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5562 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6019 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
55636020 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
55646021 _LT_TAGVAR(link_all_deplibs, $1)=yes
5565 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6022 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
55666023 runpath_var='LD_RUN_PATH'
55676024
5568 if test "$GCC" = yes; then
5569 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5570 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6025 if test yes = "$GCC"; then
6026 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6027 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
55716028 else
5572 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5573 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6029 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6030 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
55746031 fi
55756032 ;;
55766033
55856042 ;;
55866043 esac
55876044
5588 if test x$host_vendor = xsni; then
6045 if test sni = "$host_vendor"; then
55896046 case $host in
55906047 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5591 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6048 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
55926049 ;;
55936050 esac
55946051 fi
55956052 fi
55966053 ])
55976054 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
5598 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6055 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
55996056
56006057 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
56016058
56126069 # Assume -lc should be added
56136070 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
56146071
5615 if test "$enable_shared" = yes && test "$GCC" = yes; then
6072 if test yes,yes = "$GCC,$enable_shared"; then
56166073 case $_LT_TAGVAR(archive_cmds, $1) in
56176074 *'~'*)
56186075 # FIXME: we may have to deal with multi-command sequences.
56926149 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
56936150 [Whether we need a single "-rpath" flag with a separated argument])
56946151 _LT_TAGDECL([], [hardcode_direct], [0],
5695 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6152 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
56966153 DIR into the resulting binary])
56976154 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
5698 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6155 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
56996156 DIR into the resulting binary and the resulting library dependency is
5700 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6157 "absolute", i.e impossible to change by setting $shlibpath_var if the
57016158 library is relocated])
57026159 _LT_TAGDECL([], [hardcode_minus_L], [0],
57036160 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
57386195 # ------------------------
57396196 # Ensure that the configuration variables for a C compiler are suitably
57406197 # defined. These variables are subsequently used by _LT_CONFIG to write
5741 # the compiler configuration to `libtool'.
6198 # the compiler configuration to 'libtool'.
57426199 m4_defun([_LT_LANG_C_CONFIG],
57436200 [m4_require([_LT_DECL_EGREP])dnl
5744 lt_save_CC="$CC"
6201 lt_save_CC=$CC
57456202 AC_LANG_PUSH(C)
57466203
57476204 # Source file extension for C test sources.
57816238 LT_SYS_DLOPEN_SELF
57826239 _LT_CMD_STRIPLIB
57836240
5784 # Report which library types will actually be built
6241 # Report what library types will actually be built
57856242 AC_MSG_CHECKING([if libtool supports shared libraries])
57866243 AC_MSG_RESULT([$can_build_shared])
57876244
57886245 AC_MSG_CHECKING([whether to build shared libraries])
5789 test "$can_build_shared" = "no" && enable_shared=no
6246 test no = "$can_build_shared" && enable_shared=no
57906247
57916248 # On AIX, shared libraries and static libraries use the same namespace, and
57926249 # are all built from PIC.
57936250 case $host_os in
57946251 aix3*)
5795 test "$enable_shared" = yes && enable_static=no
6252 test yes = "$enable_shared" && enable_static=no
57966253 if test -n "$RANLIB"; then
57976254 archive_cmds="$archive_cmds~\$RANLIB \$lib"
57986255 postinstall_cmds='$RANLIB $lib'
58006257 ;;
58016258
58026259 aix[[4-9]]*)
5803 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5804 test "$enable_shared" = yes && enable_static=no
6260 if test ia64 != "$host_cpu"; then
6261 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
6262 yes,aix,yes) ;; # shared object as lib.so file only
6263 yes,svr4,*) ;; # shared object as lib.so archive member only
6264 yes,*) enable_static=no ;; # shared object in lib.a archive as well
6265 esac
58056266 fi
58066267 ;;
58076268 esac
58096270
58106271 AC_MSG_CHECKING([whether to build static libraries])
58116272 # Make sure either enable_shared or enable_static is yes.
5812 test "$enable_shared" = yes || enable_static=yes
6273 test yes = "$enable_shared" || enable_static=yes
58136274 AC_MSG_RESULT([$enable_static])
58146275
58156276 _LT_CONFIG($1)
58166277 fi
58176278 AC_LANG_POP
5818 CC="$lt_save_CC"
6279 CC=$lt_save_CC
58196280 ])# _LT_LANG_C_CONFIG
58206281
58216282
58236284 # --------------------------
58246285 # Ensure that the configuration variables for a C++ compiler are suitably
58256286 # defined. These variables are subsequently used by _LT_CONFIG to write
5826 # the compiler configuration to `libtool'.
6287 # the compiler configuration to 'libtool'.
58276288 m4_defun([_LT_LANG_CXX_CONFIG],
58286289 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
58296290 m4_require([_LT_DECL_EGREP])dnl
58306291 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5831 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
5832 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
5833 (test "X$CXX" != "Xg++"))) ; then
6292 if test -n "$CXX" && ( test no != "$CXX" &&
6293 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
6294 (test g++ != "$CXX"))); then
58346295 AC_PROG_CXXCPP
58356296 else
58366297 _lt_caught_CXX_error=yes
58726333 # the CXX compiler isn't working. Some variables (like enable_shared)
58736334 # are currently assumed to apply to all compilers on this platform,
58746335 # and will be corrupted by setting them based on a non-working compiler.
5875 if test "$_lt_caught_CXX_error" != yes; then
6336 if test yes != "$_lt_caught_CXX_error"; then
58766337 # Code to be used in simple compile tests
58776338 lt_simple_compile_test_code="int some_variable = 0;"
58786339
59146375 if test -n "$compiler"; then
59156376 # We don't want -fno-exception when compiling C++ code, so set the
59166377 # no_builtin_flag separately
5917 if test "$GXX" = yes; then
6378 if test yes = "$GXX"; then
59186379 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
59196380 else
59206381 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
59216382 fi
59226383
5923 if test "$GXX" = yes; then
6384 if test yes = "$GXX"; then
59246385 # Set up default GNU C++ configuration
59256386
59266387 LT_PATH_LD
59276388
59286389 # Check if GNU C++ uses GNU ld as the underlying linker, since the
59296390 # archiving commands below assume that GNU ld is being used.
5930 if test "$with_gnu_ld" = yes; then
5931 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5932 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5933
5934 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5935 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6391 if test yes = "$with_gnu_ld"; then
6392 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6393 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
6394
6395 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
6396 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
59366397
59376398 # If archive_cmds runs LD, not CC, wlarc should be empty
59386399 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
59396400 # investigate it a little bit more. (MM)
5940 wlarc='${wl}'
6401 wlarc='$wl'
59416402
59426403 # ancient GNU ld didn't support --whole-archive et. al.
59436404 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
59446405 $GREP 'no-whole-archive' > /dev/null; then
5945 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6406 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
59466407 else
59476408 _LT_TAGVAR(whole_archive_flag_spec, $1)=
59486409 fi
59786439 _LT_TAGVAR(ld_shlibs, $1)=no
59796440 ;;
59806441 aix[[4-9]]*)
5981 if test "$host_cpu" = ia64; then
6442 if test ia64 = "$host_cpu"; then
59826443 # On IA64, the linker does run time linking by default, so we don't
59836444 # have to do anything special.
59846445 aix_use_runtimelinking=no
59856446 exp_sym_flag='-Bexport'
5986 no_entry_flag=""
6447 no_entry_flag=
59876448 else
59886449 aix_use_runtimelinking=no
59896450
59906451 # Test if we are trying to use run time linking or normal
59916452 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5992 # need to do runtime linking.
6453 # have runtime linking enabled, and use it for executables.
6454 # For shared libraries, we enable/disable runtime linking
6455 # depending on the kind of the shared library created -
6456 # when "with_aix_soname,aix_use_runtimelinking" is:
6457 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
6458 # "aix,yes" lib.so shared, rtl:yes, for executables
6459 # lib.a static archive
6460 # "both,no" lib.so.V(shr.o) shared, rtl:yes
6461 # lib.a(lib.so.V) shared, rtl:no, for executables
6462 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
6463 # lib.a(lib.so.V) shared, rtl:no
6464 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
6465 # lib.a static archive
59936466 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
59946467 for ld_flag in $LDFLAGS; do
59956468 case $ld_flag in
59996472 ;;
60006473 esac
60016474 done
6475 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
6476 # With aix-soname=svr4, we create the lib.so.V shared archives only,
6477 # so we don't have lib.a shared libs to link our executables.
6478 # We have to force runtime linking in this case.
6479 aix_use_runtimelinking=yes
6480 LDFLAGS="$LDFLAGS -Wl,-brtl"
6481 fi
60026482 ;;
60036483 esac
60046484
60176497 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
60186498 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
60196499 _LT_TAGVAR(link_all_deplibs, $1)=yes
6020 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6021
6022 if test "$GXX" = yes; then
6500 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
6501 case $with_aix_soname,$aix_use_runtimelinking in
6502 aix,*) ;; # no import file
6503 svr4,* | *,yes) # use import file
6504 # The Import File defines what to hardcode.
6505 _LT_TAGVAR(hardcode_direct, $1)=no
6506 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6507 ;;
6508 esac
6509
6510 if test yes = "$GXX"; then
60236511 case $host_os in aix4.[[012]]|aix4.[[012]].*)
60246512 # We only want to do this on AIX 4.2 and lower, the check
60256513 # below for broken collect2 doesn't work under 4.3+
6026 collect2name=`${CC} -print-prog-name=collect2`
6514 collect2name=`$CC -print-prog-name=collect2`
60276515 if test -f "$collect2name" &&
60286516 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
60296517 then
60416529 fi
60426530 esac
60436531 shared_flag='-shared'
6044 if test "$aix_use_runtimelinking" = yes; then
6045 shared_flag="$shared_flag "'${wl}-G'
6532 if test yes = "$aix_use_runtimelinking"; then
6533 shared_flag=$shared_flag' $wl-G'
60466534 fi
6535 # Need to ensure runtime linking is disabled for the traditional
6536 # shared library, or the linker may eventually find shared libraries
6537 # /with/ Import File - we do not want to mix them.
6538 shared_flag_aix='-shared'
6539 shared_flag_svr4='-shared $wl-G'
60476540 else
60486541 # not using gcc
6049 if test "$host_cpu" = ia64; then
6542 if test ia64 = "$host_cpu"; then
60506543 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
60516544 # chokes on -Wl,-G. The following line is correct:
60526545 shared_flag='-G'
60536546 else
6054 if test "$aix_use_runtimelinking" = yes; then
6055 shared_flag='${wl}-G'
6547 if test yes = "$aix_use_runtimelinking"; then
6548 shared_flag='$wl-G'
60566549 else
6057 shared_flag='${wl}-bM:SRE'
6550 shared_flag='$wl-bM:SRE'
60586551 fi
6552 shared_flag_aix='$wl-bM:SRE'
6553 shared_flag_svr4='$wl-G'
60596554 fi
60606555 fi
60616556
6062 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6557 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
60636558 # It seems that -bexpall does not export symbols beginning with
60646559 # underscore (_), so it is better to generate a list of symbols to
60656560 # export.
60666561 _LT_TAGVAR(always_export_symbols, $1)=yes
6067 if test "$aix_use_runtimelinking" = yes; then
6562 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
60686563 # Warning - without using the other runtime loading flags (-brtl),
60696564 # -berok will link without error, but may produce a broken library.
6070 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6565 # The "-G" linker flag allows undefined symbols.
6566 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
60716567 # Determine the default libpath from the value encoded in an empty
60726568 # executable.
60736569 _LT_SYS_MODULE_PATH_AIX([$1])
6074 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6075
6076 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6570 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
6571
6572 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
60776573 else
6078 if test "$host_cpu" = ia64; then
6079 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6574 if test ia64 = "$host_cpu"; then
6575 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
60806576 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6081 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6577 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
60826578 else
60836579 # Determine the default libpath from the value encoded in an
60846580 # empty executable.
60856581 _LT_SYS_MODULE_PATH_AIX([$1])
6086 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6582 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
60876583 # Warning - without using the other run time loading flags,
60886584 # -berok will link without error, but may produce a broken library.
6089 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6090 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6091 if test "$with_gnu_ld" = yes; then
6585 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
6586 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
6587 if test yes = "$with_gnu_ld"; then
60926588 # We only use this code for GNU lds that support --whole-archive.
6093 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6589 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
60946590 else
60956591 # Exported symbols can be pulled into shared objects from archives
60966592 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
60976593 fi
60986594 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6099 # This is similar to how AIX traditionally builds its shared
6100 # libraries.
6101 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6595 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
6596 # -brtl affects multiple linker settings, -berok does not and is overridden later
6597 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
6598 if test svr4 != "$with_aix_soname"; then
6599 # This is similar to how AIX traditionally builds its shared
6600 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
6601 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
6602 fi
6603 if test aix != "$with_aix_soname"; then
6604 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
6605 else
6606 # used by -dlpreopen to get the symbols
6607 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
6608 fi
6609 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
61026610 fi
61036611 fi
61046612 ;;
61086616 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
61096617 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
61106618 # support --undefined. This deserves some investigation. FIXME
6111 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6619 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
61126620 else
61136621 _LT_TAGVAR(ld_shlibs, $1)=no
61146622 fi
61366644 # Tell ltmain to make .lib files, not .a files.
61376645 libext=lib
61386646 # Tell ltmain to make .dll files, not .so files.
6139 shrext_cmds=".dll"
6647 shrext_cmds=.dll
61406648 # FIXME: Setting linknames here is a bad hack.
6141 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6142 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6143 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6144 else
6145 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6146 fi~
6147 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6148 linknames='
6649 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
6650 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6651 cp "$export_symbols" "$output_objdir/$soname.def";
6652 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
6653 else
6654 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
6655 fi~
6656 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6657 linknames='
61496658 # The linker will not automatically build a static lib if we build a DLL.
61506659 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
61516660 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
61526661 # Don't use ranlib
61536662 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
61546663 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6155 lt_tool_outputfile="@TOOL_OUTPUT@"~
6156 case $lt_outputfile in
6157 *.exe|*.EXE) ;;
6158 *)
6159 lt_outputfile="$lt_outputfile.exe"
6160 lt_tool_outputfile="$lt_tool_outputfile.exe"
6161 ;;
6162 esac~
6163 func_to_tool_file "$lt_outputfile"~
6164 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6165 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6166 $RM "$lt_outputfile.manifest";
6167 fi'
6664 lt_tool_outputfile="@TOOL_OUTPUT@"~
6665 case $lt_outputfile in
6666 *.exe|*.EXE) ;;
6667 *)
6668 lt_outputfile=$lt_outputfile.exe
6669 lt_tool_outputfile=$lt_tool_outputfile.exe
6670 ;;
6671 esac~
6672 func_to_tool_file "$lt_outputfile"~
6673 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
6674 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6675 $RM "$lt_outputfile.manifest";
6676 fi'
61686677 ;;
61696678 *)
61706679 # g++
61716680 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
61726681 # as there is no search path for DLLs.
61736682 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6174 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6683 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
61756684 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
61766685 _LT_TAGVAR(always_export_symbols, $1)=no
61776686 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
61786687
61796688 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6180 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6181 # If the export-symbols file already is a .def file (1st line
6182 # is EXPORTS), use it as is; otherwise, prepend...
6183 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6184 cp $export_symbols $output_objdir/$soname.def;
6185 else
6186 echo EXPORTS > $output_objdir/$soname.def;
6187 cat $export_symbols >> $output_objdir/$soname.def;
6188 fi~
6189 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6689 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6690 # If the export-symbols file already is a .def file, use it as
6691 # is; otherwise, prepend EXPORTS...
6692 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
6693 cp $export_symbols $output_objdir/$soname.def;
6694 else
6695 echo EXPORTS > $output_objdir/$soname.def;
6696 cat $export_symbols >> $output_objdir/$soname.def;
6697 fi~
6698 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
61906699 else
61916700 _LT_TAGVAR(ld_shlibs, $1)=no
61926701 fi
61956704 ;;
61966705 darwin* | rhapsody*)
61976706 _LT_DARWIN_LINKER_FEATURES($1)
6707 ;;
6708
6709 os2*)
6710 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6711 _LT_TAGVAR(hardcode_minus_L, $1)=yes
6712 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6713 shrext_cmds=.dll
6714 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6715 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6716 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6717 $ECHO EXPORTS >> $output_objdir/$libname.def~
6718 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
6719 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6720 emximp -o $lib $output_objdir/$libname.def'
6721 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
6722 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
6723 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
6724 $ECHO EXPORTS >> $output_objdir/$libname.def~
6725 prefix_cmds="$SED"~
6726 if test EXPORTS = "`$SED 1q $export_symbols`"; then
6727 prefix_cmds="$prefix_cmds -e 1d";
6728 fi~
6729 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
6730 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
6731 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
6732 emximp -o $lib $output_objdir/$libname.def'
6733 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
6734 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
61986735 ;;
61996736
62006737 dgux*)
62316768 _LT_TAGVAR(ld_shlibs, $1)=yes
62326769 ;;
62336770
6234 gnu*)
6235 ;;
6236
62376771 haiku*)
6238 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6772 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
62396773 _LT_TAGVAR(link_all_deplibs, $1)=yes
62406774 ;;
62416775
62426776 hpux9*)
6243 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6777 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
62446778 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6245 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6779 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
62466780 _LT_TAGVAR(hardcode_direct, $1)=yes
62476781 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
62486782 # but as the default
62546788 _LT_TAGVAR(ld_shlibs, $1)=no
62556789 ;;
62566790 aCC*)
6257 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6791 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
62586792 # Commands to make compiler produce verbose output that lists
62596793 # what "hidden" libraries, object files and flags are used when
62606794 # linking a shared library.
62636797 # explicitly linking system object files so we need to strip them
62646798 # from the output so that they don't get included in the library
62656799 # dependencies.
6266 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6800 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
62676801 ;;
62686802 *)
6269 if test "$GXX" = yes; then
6270 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6803 if test yes = "$GXX"; then
6804 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
62716805 else
62726806 # FIXME: insert proper C++ library support
62736807 _LT_TAGVAR(ld_shlibs, $1)=no
62776811 ;;
62786812
62796813 hpux10*|hpux11*)
6280 if test $with_gnu_ld = no; then
6281 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6814 if test no = "$with_gnu_ld"; then
6815 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
62826816 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
62836817
62846818 case $host_cpu in
62856819 hppa*64*|ia64*)
62866820 ;;
62876821 *)
6288 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6822 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
62896823 ;;
62906824 esac
62916825 fi
63116845 aCC*)
63126846 case $host_cpu in
63136847 hppa*64*)
6314 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6848 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
63156849 ;;
63166850 ia64*)
6317 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6851 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
63186852 ;;
63196853 *)
6320 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6854 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
63216855 ;;
63226856 esac
63236857 # Commands to make compiler produce verbose output that lists
63286862 # explicitly linking system object files so we need to strip them
63296863 # from the output so that they don't get included in the library
63306864 # dependencies.
6331 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6865 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
63326866 ;;
63336867 *)
6334 if test "$GXX" = yes; then
6335 if test $with_gnu_ld = no; then
6868 if test yes = "$GXX"; then
6869 if test no = "$with_gnu_ld"; then
63366870 case $host_cpu in
63376871 hppa*64*)
6338 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6872 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
63396873 ;;
63406874 ia64*)
6341 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6875 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
63426876 ;;
63436877 *)
6344 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6878 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
63456879 ;;
63466880 esac
63476881 fi
63566890 interix[[3-9]]*)
63576891 _LT_TAGVAR(hardcode_direct, $1)=no
63586892 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6359 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6360 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6893 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6894 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
63616895 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
63626896 # Instead, shared libraries are loaded at an image base (0x10000000 by
63636897 # default) and relocated if they conflict, which is a slow very memory
63646898 # consuming and fragmenting process. To avoid this, we pick a random,
63656899 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
63666900 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
6367 _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'
6368 _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'
6901 _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'
6902 _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'
63696903 ;;
63706904 irix5* | irix6*)
63716905 case $cc_basename in
63726906 CC*)
63736907 # SGI C++
6374 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6908 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
63756909
63766910 # Archives containing C++ object files must be created using
63776911 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
63806914 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
63816915 ;;
63826916 *)
6383 if test "$GXX" = yes; then
6384 if test "$with_gnu_ld" = no; then
6385 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $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 -o $lib'
6917 if test yes = "$GXX"; then
6918 if test no = "$with_gnu_ld"; then
6919 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $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 -o $lib'
63866920 else
6387 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
6921 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
63886922 fi
63896923 fi
63906924 _LT_TAGVAR(link_all_deplibs, $1)=yes
63916925 ;;
63926926 esac
6393 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6927 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
63946928 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
63956929 _LT_TAGVAR(inherit_rpath, $1)=yes
63966930 ;;
63976931
6398 linux* | k*bsd*-gnu | kopensolaris*-gnu)
6932 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
63996933 case $cc_basename in
64006934 KCC*)
64016935 # Kuck and Associates, Inc. (KAI) C++ Compiler
64036937 # KCC will only create a shared library if the output file
64046938 # ends with ".so" (or ".sl" for HP-UX), so rename the library
64056939 # to its proper name (with version) after linking.
6406 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6407 _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
6940 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6941 _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
64086942 # Commands to make compiler produce verbose output that lists
64096943 # what "hidden" libraries, object files and flags are used when
64106944 # linking a shared library.
64136947 # explicitly linking system object files so we need to strip them
64146948 # from the output so that they don't get included in the library
64156949 # dependencies.
6416 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6417
6418 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6419 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6950 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
6951
6952 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6953 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
64206954
64216955 # Archives containing C++ object files must be created using
64226956 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
64306964 # earlier do not add the objects themselves.
64316965 case `$CC -V 2>&1` in
64326966 *"Version 7."*)
6433 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6434 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6967 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
6968 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
64356969 ;;
64366970 *) # Version 8.0 or newer
64376971 tmp_idyn=
64386972 case $host_cpu in
64396973 ia64*) tmp_idyn=' -i_dynamic';;
64406974 esac
6441 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6442 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6975 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
6976 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
64436977 ;;
64446978 esac
64456979 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6446 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6447 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6448 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6980 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
6981 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
6982 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
64496983 ;;
64506984 pgCC* | pgcpp*)
64516985 # Portland Group C++ compiler
64526986 case `$CC -V` in
64536987 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
64546988 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
6455 rm -rf $tpldir~
6456 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6457 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
6989 rm -rf $tpldir~
6990 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
6991 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
64586992 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
6459 rm -rf $tpldir~
6460 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6461 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
6462 $RANLIB $oldlib'
6993 rm -rf $tpldir~
6994 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
6995 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
6996 $RANLIB $oldlib'
64636997 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
6464 rm -rf $tpldir~
6465 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6466 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6998 rm -rf $tpldir~
6999 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7000 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
64677001 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
6468 rm -rf $tpldir~
6469 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
6470 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7002 rm -rf $tpldir~
7003 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7004 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
64717005 ;;
64727006 *) # Version 6 and above use weak symbols
6473 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
6474 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7007 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7008 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
64757009 ;;
64767010 esac
64777011
6478 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6479 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6480 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7012 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
7013 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7014 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
64817015 ;;
64827016 cxx*)
64837017 # Compaq C++
6484 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6485 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
7018 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
7019 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols'
64867020
64877021 runpath_var=LD_RUN_PATH
64887022 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
64967030 # explicitly linking system object files so we need to strip them
64977031 # from the output so that they don't get included in the library
64987032 # dependencies.
6499 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
7033 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
65007034 ;;
65017035 xl* | mpixl* | bgxl*)
65027036 # IBM XL 8.0 on PPC, with GNU ld
6503 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6504 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6505 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6506 if test "x$supports_anon_versioning" = xyes; then
7037 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
7038 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
7039 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
7040 if test yes = "$supports_anon_versioning"; then
65077041 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6508 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6509 echo "local: *; };" >> $output_objdir/$libname.ver~
6510 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7042 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7043 echo "local: *; };" >> $output_objdir/$libname.ver~
7044 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
65117045 fi
65127046 ;;
65137047 *)
65157049 *Sun\ C*)
65167050 # Sun C++ 5.9
65177051 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6518 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
6519 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
7052 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7053 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
65207054 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6521 _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'
7055 _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'
65227056 _LT_TAGVAR(compiler_needs_object, $1)=yes
65237057
65247058 # Not sure whether something based on
65767110 _LT_TAGVAR(ld_shlibs, $1)=yes
65777111 ;;
65787112
6579 openbsd2*)
6580 # C++ shared libraries are fairly broken
6581 _LT_TAGVAR(ld_shlibs, $1)=no
6582 ;;
6583
6584 openbsd*)
7113 openbsd* | bitrig*)
65857114 if test -f /usr/libexec/ld.so; then
65867115 _LT_TAGVAR(hardcode_direct, $1)=yes
65877116 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
65887117 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
65897118 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6590 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6591 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6592 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
6593 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6594 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7119 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
7120 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
7121 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
7122 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
7123 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
65957124 fi
65967125 output_verbose_link_cmd=func_echo_all
65977126 else
66077136 # KCC will only create a shared library if the output file
66087137 # ends with ".so" (or ".sl" for HP-UX), so rename the library
66097138 # to its proper name (with version) after linking.
6610 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
6611
6612 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7139 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
7140
7141 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
66137142 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
66147143
66157144 # Archives containing C++ object files must be created using
66277156 cxx*)
66287157 case $host in
66297158 osf3*)
6630 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6631 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6632 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7159 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
7160 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
7161 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
66337162 ;;
66347163 *)
66357164 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6636 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7165 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
66377166 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
6638 echo "-hidden">> $lib.exp~
6639 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
6640 $RM $lib.exp'
7167 echo "-hidden">> $lib.exp~
7168 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
7169 $RM $lib.exp'
66417170 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
66427171 ;;
66437172 esac
66527181 # explicitly linking system object files so we need to strip them
66537182 # from the output so that they don't get included in the library
66547183 # dependencies.
6655 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7184 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
66567185 ;;
66577186 *)
6658 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6659 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7187 if test yes,no = "$GXX,$with_gnu_ld"; then
7188 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
66607189 case $host in
66617190 osf3*)
6662 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $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 -o $lib'
7191 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $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 -o $lib'
66637192 ;;
66647193 *)
6665 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7194 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
66667195 ;;
66677196 esac
66687197
6669 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7198 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
66707199 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
66717200
66727201 # Commands to make compiler produce verbose output that lists
67127241 # Sun C++ 4.2, 5.x and Centerline C++
67137242 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
67147243 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
6715 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7244 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
67167245 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6717 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7246 $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
67187247
67197248 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
67207249 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
67227251 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
67237252 *)
67247253 # The compiler driver will combine and reorder linker options,
6725 # but understands `-z linker_flag'.
7254 # but understands '-z linker_flag'.
67267255 # Supported since Solaris 2.6 (maybe 2.5.1?)
67277256 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
67287257 ;;
67397268 ;;
67407269 gcx*)
67417270 # Green Hills C++ Compiler
6742 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7271 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
67437272
67447273 # The C++ compiler must be used to create the archive.
67457274 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
67467275 ;;
67477276 *)
67487277 # GNU C++ compiler with Solaris linker
6749 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
6750 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7278 if test yes,no = "$GXX,$with_gnu_ld"; then
7279 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
67517280 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
6752 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7281 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
67537282 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6754 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7283 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
67557284
67567285 # Commands to make compiler produce verbose output that lists
67577286 # what "hidden" libraries, object files and flags are used when
67587287 # linking a shared library.
67597288 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
67607289 else
6761 # g++ 2.7 appears to require `-G' NOT `-shared' on this
7290 # g++ 2.7 appears to require '-G' NOT '-shared' on this
67627291 # platform.
6763 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7292 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
67647293 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6765 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7294 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
67667295
67677296 # Commands to make compiler produce verbose output that lists
67687297 # what "hidden" libraries, object files and flags are used when
67707299 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
67717300 fi
67727301
6773 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7302 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
67747303 case $host_os in
67757304 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
67767305 *)
6777 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7306 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
67787307 ;;
67797308 esac
67807309 fi
67837312 ;;
67847313
67857314 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6786 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7315 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
67877316 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
67887317 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
67897318 runpath_var='LD_RUN_PATH'
67907319
67917320 case $cc_basename in
67927321 CC*)
6793 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6794 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7322 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7323 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
67957324 ;;
67967325 *)
6797 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6798 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7326 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7327 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
67997328 ;;
68007329 esac
68017330 ;;
68027331
68037332 sysv5* | sco3.2v5* | sco5v6*)
6804 # Note: We can NOT use -z defs as we might desire, because we do not
7333 # Note: We CANNOT use -z defs as we might desire, because we do not
68057334 # link with -lc, and that would cause any symbols used from libc to
68067335 # always be unresolved, which means just about no library would
68077336 # ever link correctly. If we're not using GNU ld we use -z text
68087337 # though, which does catch some bad symbols but isn't as heavy-handed
68097338 # as -z defs.
6810 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6811 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7339 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
7340 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
68127341 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
68137342 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6814 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7343 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
68157344 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
68167345 _LT_TAGVAR(link_all_deplibs, $1)=yes
6817 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7346 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
68187347 runpath_var='LD_RUN_PATH'
68197348
68207349 case $cc_basename in
68217350 CC*)
6822 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6823 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7351 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7352 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
68247353 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
6825 '"$_LT_TAGVAR(old_archive_cmds, $1)"
7354 '"$_LT_TAGVAR(old_archive_cmds, $1)"
68267355 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
6827 '"$_LT_TAGVAR(reload_cmds, $1)"
7356 '"$_LT_TAGVAR(reload_cmds, $1)"
68287357 ;;
68297358 *)
6830 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6831 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7359 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7360 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
68327361 ;;
68337362 esac
68347363 ;;
68597388 esac
68607389
68617390 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6862 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6863
6864 _LT_TAGVAR(GCC, $1)="$GXX"
6865 _LT_TAGVAR(LD, $1)="$LD"
7391 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
7392
7393 _LT_TAGVAR(GCC, $1)=$GXX
7394 _LT_TAGVAR(LD, $1)=$LD
68667395
68677396 ## CAVEAT EMPTOR:
68687397 ## There is no encapsulation within the following macros, do not change
68897418 lt_cv_path_LD=$lt_save_path_LD
68907419 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
68917420 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
6892 fi # test "$_lt_caught_CXX_error" != yes
7421 fi # test yes != "$_lt_caught_CXX_error"
68937422
68947423 AC_LANG_POP
68957424 ])# _LT_LANG_CXX_CONFIG
69117440 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
69127441 func_stripname_cnf ()
69137442 {
6914 case ${2} in
6915 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
6916 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
7443 case @S|@2 in
7444 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
7445 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
69177446 esac
69187447 } # func_stripname_cnf
69197448 ])# _LT_FUNC_STRIPNAME_CNF
7449
69207450
69217451 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
69227452 # ---------------------------------
70017531 pre_test_object_deps_done=no
70027532
70037533 for p in `eval "$output_verbose_link_cmd"`; do
7004 case ${prev}${p} in
7534 case $prev$p in
70057535
70067536 -L* | -R* | -l*)
70077537 # Some compilers place space between "-{L,R}" and the path.
70087538 # Remove the space.
7009 if test $p = "-L" ||
7010 test $p = "-R"; then
7539 if test x-L = "$p" ||
7540 test x-R = "$p"; then
70117541 prev=$p
70127542 continue
70137543 fi
70237553 case $p in
70247554 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
70257555 esac
7026 if test "$pre_test_object_deps_done" = no; then
7027 case ${prev} in
7556 if test no = "$pre_test_object_deps_done"; then
7557 case $prev in
70287558 -L | -R)
70297559 # Internal compiler library paths should come after those
70307560 # provided the user. The postdeps already come after the
70317561 # user supplied libs so there is no need to process them.
70327562 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7033 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7563 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
70347564 else
7035 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7565 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
70367566 fi
70377567 ;;
70387568 # The "-l" case would never come before the object being
70407570 esac
70417571 else
70427572 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7043 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7573 _LT_TAGVAR(postdeps, $1)=$prev$p
70447574 else
7045 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7575 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
70467576 fi
70477577 fi
70487578 prev=
70577587 continue
70587588 fi
70597589
7060 if test "$pre_test_object_deps_done" = no; then
7590 if test no = "$pre_test_object_deps_done"; then
70617591 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7062 _LT_TAGVAR(predep_objects, $1)="$p"
7592 _LT_TAGVAR(predep_objects, $1)=$p
70637593 else
70647594 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
70657595 fi
70667596 else
70677597 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7068 _LT_TAGVAR(postdep_objects, $1)="$p"
7598 _LT_TAGVAR(postdep_objects, $1)=$p
70697599 else
70707600 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
70717601 fi
70967626 _LT_TAGVAR(postdep_objects,$1)=
70977627 _LT_TAGVAR(postdeps,$1)=
70987628 ;;
7099
7100 linux*)
7101 case `$CC -V 2>&1 | sed 5q` in
7102 *Sun\ C*)
7103 # Sun C++ 5.9
7104
7105 # The more standards-conforming stlport4 library is
7106 # incompatible with the Cstd library. Avoid specifying
7107 # it if it's in CXXFLAGS. Ignore libCrun as
7108 # -library=stlport4 depends on it.
7109 case " $CXX $CXXFLAGS " in
7110 *" -library=stlport4 "*)
7111 solaris_use_stlport4=yes
7112 ;;
7113 esac
7114
7115 if test "$solaris_use_stlport4" != yes; then
7116 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7117 fi
7118 ;;
7119 esac
7120 ;;
7121
7122 solaris*)
7123 case $cc_basename in
7124 CC* | sunCC*)
7125 # The more standards-conforming stlport4 library is
7126 # incompatible with the Cstd library. Avoid specifying
7127 # it if it's in CXXFLAGS. Ignore libCrun as
7128 # -library=stlport4 depends on it.
7129 case " $CXX $CXXFLAGS " in
7130 *" -library=stlport4 "*)
7131 solaris_use_stlport4=yes
7132 ;;
7133 esac
7134
7135 # Adding this requires a known-good setup of shared libraries for
7136 # Sun compiler versions before 5.6, else PIC objects from an old
7137 # archive will be linked into the output, leading to subtle bugs.
7138 if test "$solaris_use_stlport4" != yes; then
7139 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
7140 fi
7141 ;;
7142 esac
7143 ;;
71447629 esac
71457630 ])
71467631
71497634 esac
71507635 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
71517636 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
7152 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
7637 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
71537638 fi
71547639 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
71557640 [The directories searched by this compiler when creating a shared library])
71697654 # --------------------------
71707655 # Ensure that the configuration variables for a Fortran 77 compiler are
71717656 # suitably defined. These variables are subsequently used by _LT_CONFIG
7172 # to write the compiler configuration to `libtool'.
7657 # to write the compiler configuration to 'libtool'.
71737658 m4_defun([_LT_LANG_F77_CONFIG],
71747659 [AC_LANG_PUSH(Fortran 77)
7175 if test -z "$F77" || test "X$F77" = "Xno"; then
7660 if test -z "$F77" || test no = "$F77"; then
71767661 _lt_disable_F77=yes
71777662 fi
71787663
72097694 # the F77 compiler isn't working. Some variables (like enable_shared)
72107695 # are currently assumed to apply to all compilers on this platform,
72117696 # and will be corrupted by setting them based on a non-working compiler.
7212 if test "$_lt_disable_F77" != yes; then
7697 if test yes != "$_lt_disable_F77"; then
72137698 # Code to be used in simple compile tests
72147699 lt_simple_compile_test_code="\
72157700 subroutine t
72317716 _LT_LINKER_BOILERPLATE
72327717
72337718 # Allow CC to be a program name with arguments.
7234 lt_save_CC="$CC"
7719 lt_save_CC=$CC
72357720 lt_save_GCC=$GCC
72367721 lt_save_CFLAGS=$CFLAGS
72377722 CC=${F77-"f77"}
72457730 AC_MSG_RESULT([$can_build_shared])
72467731
72477732 AC_MSG_CHECKING([whether to build shared libraries])
7248 test "$can_build_shared" = "no" && enable_shared=no
7733 test no = "$can_build_shared" && enable_shared=no
72497734
72507735 # On AIX, shared libraries and static libraries use the same namespace, and
72517736 # are all built from PIC.
72527737 case $host_os in
72537738 aix3*)
7254 test "$enable_shared" = yes && enable_static=no
7739 test yes = "$enable_shared" && enable_static=no
72557740 if test -n "$RANLIB"; then
72567741 archive_cmds="$archive_cmds~\$RANLIB \$lib"
72577742 postinstall_cmds='$RANLIB $lib'
72587743 fi
72597744 ;;
72607745 aix[[4-9]]*)
7261 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7262 test "$enable_shared" = yes && enable_static=no
7746 if test ia64 != "$host_cpu"; then
7747 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7748 yes,aix,yes) ;; # shared object as lib.so file only
7749 yes,svr4,*) ;; # shared object as lib.so archive member only
7750 yes,*) enable_static=no ;; # shared object in lib.a archive as well
7751 esac
72637752 fi
72647753 ;;
72657754 esac
72677756
72687757 AC_MSG_CHECKING([whether to build static libraries])
72697758 # Make sure either enable_shared or enable_static is yes.
7270 test "$enable_shared" = yes || enable_static=yes
7759 test yes = "$enable_shared" || enable_static=yes
72717760 AC_MSG_RESULT([$enable_static])
72727761
7273 _LT_TAGVAR(GCC, $1)="$G77"
7274 _LT_TAGVAR(LD, $1)="$LD"
7762 _LT_TAGVAR(GCC, $1)=$G77
7763 _LT_TAGVAR(LD, $1)=$LD
72757764
72767765 ## CAVEAT EMPTOR:
72777766 ## There is no encapsulation within the following macros, do not change
72887777 fi # test -n "$compiler"
72897778
72907779 GCC=$lt_save_GCC
7291 CC="$lt_save_CC"
7292 CFLAGS="$lt_save_CFLAGS"
7293 fi # test "$_lt_disable_F77" != yes
7780 CC=$lt_save_CC
7781 CFLAGS=$lt_save_CFLAGS
7782 fi # test yes != "$_lt_disable_F77"
72947783
72957784 AC_LANG_POP
72967785 ])# _LT_LANG_F77_CONFIG
73007789 # -------------------------
73017790 # Ensure that the configuration variables for a Fortran compiler are
73027791 # suitably defined. These variables are subsequently used by _LT_CONFIG
7303 # to write the compiler configuration to `libtool'.
7792 # to write the compiler configuration to 'libtool'.
73047793 m4_defun([_LT_LANG_FC_CONFIG],
73057794 [AC_LANG_PUSH(Fortran)
73067795
7307 if test -z "$FC" || test "X$FC" = "Xno"; then
7796 if test -z "$FC" || test no = "$FC"; then
73087797 _lt_disable_FC=yes
73097798 fi
73107799
73417830 # the FC compiler isn't working. Some variables (like enable_shared)
73427831 # are currently assumed to apply to all compilers on this platform,
73437832 # and will be corrupted by setting them based on a non-working compiler.
7344 if test "$_lt_disable_FC" != yes; then
7833 if test yes != "$_lt_disable_FC"; then
73457834 # Code to be used in simple compile tests
73467835 lt_simple_compile_test_code="\
73477836 subroutine t
73637852 _LT_LINKER_BOILERPLATE
73647853
73657854 # Allow CC to be a program name with arguments.
7366 lt_save_CC="$CC"
7855 lt_save_CC=$CC
73677856 lt_save_GCC=$GCC
73687857 lt_save_CFLAGS=$CFLAGS
73697858 CC=${FC-"f95"}
73797868 AC_MSG_RESULT([$can_build_shared])
73807869
73817870 AC_MSG_CHECKING([whether to build shared libraries])
7382 test "$can_build_shared" = "no" && enable_shared=no
7871 test no = "$can_build_shared" && enable_shared=no
73837872
73847873 # On AIX, shared libraries and static libraries use the same namespace, and
73857874 # are all built from PIC.
73867875 case $host_os in
73877876 aix3*)
7388 test "$enable_shared" = yes && enable_static=no
7877 test yes = "$enable_shared" && enable_static=no
73897878 if test -n "$RANLIB"; then
73907879 archive_cmds="$archive_cmds~\$RANLIB \$lib"
73917880 postinstall_cmds='$RANLIB $lib'
73927881 fi
73937882 ;;
73947883 aix[[4-9]]*)
7395 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7396 test "$enable_shared" = yes && enable_static=no
7884 if test ia64 != "$host_cpu"; then
7885 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
7886 yes,aix,yes) ;; # shared object as lib.so file only
7887 yes,svr4,*) ;; # shared object as lib.so archive member only
7888 yes,*) enable_static=no ;; # shared object in lib.a archive as well
7889 esac
73977890 fi
73987891 ;;
73997892 esac
74017894
74027895 AC_MSG_CHECKING([whether to build static libraries])
74037896 # Make sure either enable_shared or enable_static is yes.
7404 test "$enable_shared" = yes || enable_static=yes
7897 test yes = "$enable_shared" || enable_static=yes
74057898 AC_MSG_RESULT([$enable_static])
74067899
7407 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
7408 _LT_TAGVAR(LD, $1)="$LD"
7900 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
7901 _LT_TAGVAR(LD, $1)=$LD
74097902
74107903 ## CAVEAT EMPTOR:
74117904 ## There is no encapsulation within the following macros, do not change
74257918 GCC=$lt_save_GCC
74267919 CC=$lt_save_CC
74277920 CFLAGS=$lt_save_CFLAGS
7428 fi # test "$_lt_disable_FC" != yes
7921 fi # test yes != "$_lt_disable_FC"
74297922
74307923 AC_LANG_POP
74317924 ])# _LT_LANG_FC_CONFIG
74357928 # --------------------------
74367929 # Ensure that the configuration variables for the GNU Java Compiler compiler
74377930 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7438 # to write the compiler configuration to `libtool'.
7931 # to write the compiler configuration to 'libtool'.
74397932 m4_defun([_LT_LANG_GCJ_CONFIG],
74407933 [AC_REQUIRE([LT_PROG_GCJ])dnl
74417934 AC_LANG_SAVE
74697962 CFLAGS=$GCJFLAGS
74707963 compiler=$CC
74717964 _LT_TAGVAR(compiler, $1)=$CC
7472 _LT_TAGVAR(LD, $1)="$LD"
7965 _LT_TAGVAR(LD, $1)=$LD
74737966 _LT_CC_BASENAME([$compiler])
74747967
74757968 # GCJ did not exist at the time GCC didn't implicitly link libc in.
75067999 # --------------------------
75078000 # Ensure that the configuration variables for the GNU Go compiler
75088001 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7509 # to write the compiler configuration to `libtool'.
8002 # to write the compiler configuration to 'libtool'.
75108003 m4_defun([_LT_LANG_GO_CONFIG],
75118004 [AC_REQUIRE([LT_PROG_GO])dnl
75128005 AC_LANG_SAVE
75408033 CFLAGS=$GOFLAGS
75418034 compiler=$CC
75428035 _LT_TAGVAR(compiler, $1)=$CC
7543 _LT_TAGVAR(LD, $1)="$LD"
8036 _LT_TAGVAR(LD, $1)=$LD
75448037 _LT_CC_BASENAME([$compiler])
75458038
75468039 # Go did not exist at the time GCC didn't implicitly link libc in.
75778070 # -------------------------
75788071 # Ensure that the configuration variables for the Windows resource compiler
75798072 # are suitably defined. These variables are subsequently used by _LT_CONFIG
7580 # to write the compiler configuration to `libtool'.
8073 # to write the compiler configuration to 'libtool'.
75818074 m4_defun([_LT_LANG_RC_CONFIG],
75828075 [AC_REQUIRE([LT_PROG_RC])dnl
75838076 AC_LANG_SAVE
75938086 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
75948087
75958088 # Code to be used in simple link tests
7596 lt_simple_link_test_code="$lt_simple_compile_test_code"
8089 lt_simple_link_test_code=$lt_simple_compile_test_code
75978090
75988091 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
75998092 _LT_TAG_COMPILER
76038096 _LT_LINKER_BOILERPLATE
76048097
76058098 # Allow CC to be a program name with arguments.
7606 lt_save_CC="$CC"
8099 lt_save_CC=$CC
76078100 lt_save_CFLAGS=$CFLAGS
76088101 lt_save_GCC=$GCC
76098102 GCC=
76328125 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
76338126 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
76348127 [AC_CHECK_TOOL(GCJ, gcj,)
7635 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8128 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
76368129 AC_SUBST(GCJFLAGS)])])[]dnl
76378130 ])
76388131
77438236 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
77448237 # along with /bin/sed that truncates output.
77458238 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7746 test ! -f $lt_ac_sed && continue
8239 test ! -f "$lt_ac_sed" && continue
77478240 cat /dev/null > conftest.in
77488241 lt_ac_count=0
77498242 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
77608253 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
77618254 cmp -s conftest.out conftest.nl || break
77628255 # 10000 chars as input seems more than enough
7763 test $lt_ac_count -gt 10 && break
8256 test 10 -lt "$lt_ac_count" && break
77648257 lt_ac_count=`expr $lt_ac_count + 1`
7765 if test $lt_ac_count -gt $lt_ac_max; then
8258 if test "$lt_ac_count" -gt "$lt_ac_max"; then
77668259 lt_ac_max=$lt_ac_count
77678260 lt_cv_path_SED=$lt_ac_sed
77688261 fi
77868279 # Find out whether the shell is Bourne or XSI compatible,
77878280 # or has some other useful features.
77888281 m4_defun([_LT_CHECK_SHELL_FEATURES],
7789 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
7790 # Try some XSI features
7791 xsi_shell=no
7792 ( _lt_dummy="a/b/c"
7793 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
7794 = c,a/b,b/c, \
7795 && eval 'test $(( 1 + 1 )) -eq 2 \
7796 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
7797 && xsi_shell=yes
7798 AC_MSG_RESULT([$xsi_shell])
7799 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
7800
7801 AC_MSG_CHECKING([whether the shell understands "+="])
7802 lt_shell_append=no
7803 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
7804 >/dev/null 2>&1 \
7805 && lt_shell_append=yes
7806 AC_MSG_RESULT([$lt_shell_append])
7807 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
7808
7809 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8282 [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
78108283 lt_unset=unset
78118284 else
78128285 lt_unset=false
78308303 ])# _LT_CHECK_SHELL_FEATURES
78318304
78328305
7833 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
7834 # ------------------------------------------------------
7835 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
7836 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
7837 m4_defun([_LT_PROG_FUNCTION_REPLACE],
7838 [dnl {
7839 sed -e '/^$1 ()$/,/^} # $1 /c\
7840 $1 ()\
7841 {\
7842 m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
7843 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
7844 && mv -f "$cfgfile.tmp" "$cfgfile" \
7845 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7846 test 0 -eq $? || _lt_function_replace_fail=:
7847 ])
7848
7849
7850 # _LT_PROG_REPLACE_SHELLFNS
7851 # -------------------------
7852 # Replace existing portable implementations of several shell functions with
7853 # equivalent extended shell implementations where those features are available..
7854 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
7855 [if test x"$xsi_shell" = xyes; then
7856 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
7857 case ${1} in
7858 */*) func_dirname_result="${1%/*}${2}" ;;
7859 * ) func_dirname_result="${3}" ;;
7860 esac])
7861
7862 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
7863 func_basename_result="${1##*/}"])
7864
7865 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
7866 case ${1} in
7867 */*) func_dirname_result="${1%/*}${2}" ;;
7868 * ) func_dirname_result="${3}" ;;
7869 esac
7870 func_basename_result="${1##*/}"])
7871
7872 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
7873 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
7874 # positional parameters, so assign one to ordinary parameter first.
7875 func_stripname_result=${3}
7876 func_stripname_result=${func_stripname_result#"${1}"}
7877 func_stripname_result=${func_stripname_result%"${2}"}])
7878
7879 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
7880 func_split_long_opt_name=${1%%=*}
7881 func_split_long_opt_arg=${1#*=}])
7882
7883 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
7884 func_split_short_opt_arg=${1#??}
7885 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
7886
7887 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
7888 case ${1} in
7889 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
7890 *) func_lo2o_result=${1} ;;
7891 esac])
7892
7893 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
7894
7895 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
7896
7897 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
7898 fi
7899
7900 if test x"$lt_shell_append" = xyes; then
7901 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
7902
7903 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
7904 func_quote_for_eval "${2}"
7905 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
7906 eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
7907
7908 # Save a `func_append' function call where possible by direct use of '+='
7909 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
7910 && mv -f "$cfgfile.tmp" "$cfgfile" \
7911 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7912 test 0 -eq $? || _lt_function_replace_fail=:
7913 else
7914 # Save a `func_append' function call even when '+=' is not available
7915 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
7916 && mv -f "$cfgfile.tmp" "$cfgfile" \
7917 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
7918 test 0 -eq $? || _lt_function_replace_fail=:
7919 fi
7920
7921 if test x"$_lt_function_replace_fail" = x":"; then
7922 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
7923 fi
7924 ])
7925
79268306 # _LT_PATH_CONVERSION_FUNCTIONS
79278307 # -----------------------------
7928 # Determine which file name conversion functions should be used by
8308 # Determine what file name conversion functions should be used by
79298309 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
79308310 # for certain cross-compile configurations and native mingw.
79318311 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
00 # Helper functions for option handling. -*- Autoconf -*-
11 #
2 # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
3 # Inc.
2 # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
3 # Foundation, Inc.
44 # Written by Gary V. Vaughan, 2004
55 #
66 # This file is free software; the Free Software Foundation gives
77 # unlimited permission to copy and/or distribute it, with or without
88 # modifications, as long as this notice is preserved.
99
10 # serial 7 ltoptions.m4
10 # serial 8 ltoptions.m4
1111
1212 # This is to help aclocal find these macros, as it can't see m4_define.
1313 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
2828 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
2929 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
3030 _LT_MANGLE_DEFUN([$1], [$2]),
31 [m4_warning([Unknown $1 option `$2'])])[]dnl
31 [m4_warning([Unknown $1 option '$2'])])[]dnl
3232 ])
3333
3434
7474 dnl
7575 dnl If no reference was made to various pairs of opposing options, then
7676 dnl we run the default mode handler for the pair. For example, if neither
77 dnl `shared' nor `disable-shared' was passed, we enable building of shared
77 dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
7878 dnl archives by default:
7979 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8080 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8181 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8282 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
83 [_LT_ENABLE_FAST_INSTALL])
83 [_LT_ENABLE_FAST_INSTALL])
84 _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
85 [_LT_WITH_AIX_SONAME([aix])])
8486 ])
8587 ])# _LT_SET_OPTIONS
8688
111113 [_LT_SET_OPTION([LT_INIT], [dlopen])
112114 AC_DIAGNOSE([obsolete],
113115 [$0: Remove this warning and the call to _LT_SET_OPTION when you
114 put the `dlopen' option into LT_INIT's first parameter.])
116 put the 'dlopen' option into LT_INIT's first parameter.])
115117 ])
116118
117119 dnl aclocal-1.4 backwards compatibility:
147149 _LT_SET_OPTION([LT_INIT], [win32-dll])
148150 AC_DIAGNOSE([obsolete],
149151 [$0: Remove this warning and the call to _LT_SET_OPTION when you
150 put the `win32-dll' option into LT_INIT's first parameter.])
152 put the 'win32-dll' option into LT_INIT's first parameter.])
151153 ])
152154
153155 dnl aclocal-1.4 backwards compatibility:
156158
157159 # _LT_ENABLE_SHARED([DEFAULT])
158160 # ----------------------------
159 # implement the --enable-shared flag, and supports the `shared' and
160 # `disable-shared' LT_INIT options.
161 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
161 # implement the --enable-shared flag, and supports the 'shared' and
162 # 'disable-shared' LT_INIT options.
163 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
162164 m4_define([_LT_ENABLE_SHARED],
163165 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
164166 AC_ARG_ENABLE([shared],
171173 *)
172174 enable_shared=no
173175 # Look at the argument we got. We use all the common list separators.
174 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
176 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
175177 for pkg in $enableval; do
176 IFS="$lt_save_ifs"
178 IFS=$lt_save_ifs
177179 if test "X$pkg" = "X$p"; then
178180 enable_shared=yes
179181 fi
180182 done
181 IFS="$lt_save_ifs"
183 IFS=$lt_save_ifs
182184 ;;
183185 esac],
184186 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
210212
211213 # _LT_ENABLE_STATIC([DEFAULT])
212214 # ----------------------------
213 # implement the --enable-static flag, and support the `static' and
214 # `disable-static' LT_INIT options.
215 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
215 # implement the --enable-static flag, and support the 'static' and
216 # 'disable-static' LT_INIT options.
217 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
216218 m4_define([_LT_ENABLE_STATIC],
217219 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
218220 AC_ARG_ENABLE([static],
225227 *)
226228 enable_static=no
227229 # Look at the argument we got. We use all the common list separators.
228 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
230 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
229231 for pkg in $enableval; do
230 IFS="$lt_save_ifs"
232 IFS=$lt_save_ifs
231233 if test "X$pkg" = "X$p"; then
232234 enable_static=yes
233235 fi
234236 done
235 IFS="$lt_save_ifs"
237 IFS=$lt_save_ifs
236238 ;;
237239 esac],
238240 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
264266
265267 # _LT_ENABLE_FAST_INSTALL([DEFAULT])
266268 # ----------------------------------
267 # implement the --enable-fast-install flag, and support the `fast-install'
268 # and `disable-fast-install' LT_INIT options.
269 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
269 # implement the --enable-fast-install flag, and support the 'fast-install'
270 # and 'disable-fast-install' LT_INIT options.
271 # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
270272 m4_define([_LT_ENABLE_FAST_INSTALL],
271273 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
272274 AC_ARG_ENABLE([fast-install],
279281 *)
280282 enable_fast_install=no
281283 # Look at the argument we got. We use all the common list separators.
282 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
284 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
283285 for pkg in $enableval; do
284 IFS="$lt_save_ifs"
286 IFS=$lt_save_ifs
285287 if test "X$pkg" = "X$p"; then
286288 enable_fast_install=yes
287289 fi
288290 done
289 IFS="$lt_save_ifs"
291 IFS=$lt_save_ifs
290292 ;;
291293 esac],
292294 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
303305 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
304306 AC_DIAGNOSE([obsolete],
305307 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
306 the `fast-install' option into LT_INIT's first parameter.])
308 the 'fast-install' option into LT_INIT's first parameter.])
307309 ])
308310
309311 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
310312 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
311313 AC_DIAGNOSE([obsolete],
312314 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
313 the `disable-fast-install' option into LT_INIT's first parameter.])
315 the 'disable-fast-install' option into LT_INIT's first parameter.])
314316 ])
315317
316318 dnl aclocal-1.4 backwards compatibility:
318320 dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
319321
320322
323 # _LT_WITH_AIX_SONAME([DEFAULT])
324 # ----------------------------------
325 # implement the --with-aix-soname flag, and support the `aix-soname=aix'
326 # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
327 # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
328 m4_define([_LT_WITH_AIX_SONAME],
329 [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
330 shared_archive_member_spec=
331 case $host,$enable_shared in
332 power*-*-aix[[5-9]]*,yes)
333 AC_MSG_CHECKING([which variant of shared library versioning to provide])
334 AC_ARG_WITH([aix-soname],
335 [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
336 [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
337 [case $withval in
338 aix|svr4|both)
339 ;;
340 *)
341 AC_MSG_ERROR([Unknown argument to --with-aix-soname])
342 ;;
343 esac
344 lt_cv_with_aix_soname=$with_aix_soname],
345 [AC_CACHE_VAL([lt_cv_with_aix_soname],
346 [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
347 with_aix_soname=$lt_cv_with_aix_soname])
348 AC_MSG_RESULT([$with_aix_soname])
349 if test aix != "$with_aix_soname"; then
350 # For the AIX way of multilib, we name the shared archive member
351 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
352 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
353 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
354 # the AIX toolchain works better with OBJECT_MODE set (default 32).
355 if test 64 = "${OBJECT_MODE-32}"; then
356 shared_archive_member_spec=shr_64
357 else
358 shared_archive_member_spec=shr
359 fi
360 fi
361 ;;
362 *)
363 with_aix_soname=aix
364 ;;
365 esac
366
367 _LT_DECL([], [shared_archive_member_spec], [0],
368 [Shared archive member basename, for filename based shared library versioning on AIX])dnl
369 ])# _LT_WITH_AIX_SONAME
370
371 LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
372 LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
373 LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
374
375
321376 # _LT_WITH_PIC([MODE])
322377 # --------------------
323 # implement the --with-pic flag, and support the `pic-only' and `no-pic'
378 # implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
324379 # LT_INIT options.
325 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
380 # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
326381 m4_define([_LT_WITH_PIC],
327382 [AC_ARG_WITH([pic],
328383 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
333388 *)
334389 pic_mode=default
335390 # Look at the argument we got. We use all the common list separators.
336 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
391 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
337392 for lt_pkg in $withval; do
338 IFS="$lt_save_ifs"
393 IFS=$lt_save_ifs
339394 if test "X$lt_pkg" = "X$lt_p"; then
340395 pic_mode=yes
341396 fi
342397 done
343 IFS="$lt_save_ifs"
398 IFS=$lt_save_ifs
344399 ;;
345400 esac],
346 [pic_mode=default])
347
348 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
401 [pic_mode=m4_default([$1], [default])])
349402
350403 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
351404 ])# _LT_WITH_PIC
358411 [_LT_SET_OPTION([LT_INIT], [pic-only])
359412 AC_DIAGNOSE([obsolete],
360413 [$0: Remove this warning and the call to _LT_SET_OPTION when you
361 put the `pic-only' option into LT_INIT's first parameter.])
414 put the 'pic-only' option into LT_INIT's first parameter.])
362415 ])
363416
364417 dnl aclocal-1.4 backwards compatibility:
00 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
11 #
2 # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
2 # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
3 # Foundation, Inc.
34 # Written by Gary V. Vaughan, 2004
45 #
56 # This file is free software; the Free Software Foundation gives
3233 # ------------
3334 # Manipulate m4 lists.
3435 # These macros are necessary as long as will still need to support
35 # Autoconf-2.59 which quotes differently.
36 # Autoconf-2.59, which quotes differently.
3637 m4_define([lt_car], [[$1]])
3738 m4_define([lt_cdr],
3839 [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
4344
4445 # lt_append(MACRO-NAME, STRING, [SEPARATOR])
4546 # ------------------------------------------
46 # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
47 # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
4748 # Note that neither SEPARATOR nor STRING are expanded; they are appended
4849 # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
4950 # No SEPARATOR is output if MACRO-NAME was previously undefined (different
00 # ltversion.m4 -- version numbers -*- Autoconf -*-
11 #
2 # Copyright (C) 2004 Free Software Foundation, Inc.
2 # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
33 # Written by Scott James Remnant, 2004
44 #
55 # This file is free software; the Free Software Foundation gives
88
99 # @configure_input@
1010
11 # serial 3337 ltversion.m4
11 # serial 4179 ltversion.m4
1212 # This file is part of GNU Libtool
1313
14 m4_define([LT_PACKAGE_VERSION], [2.4.2])
15 m4_define([LT_PACKAGE_REVISION], [1.3337])
14 m4_define([LT_PACKAGE_VERSION], [2.4.6])
15 m4_define([LT_PACKAGE_REVISION], [2.4.6])
1616
1717 AC_DEFUN([LTVERSION_VERSION],
18 [macro_version='2.4.2'
19 macro_revision='1.3337'
18 [macro_version='2.4.6'
19 macro_revision='2.4.6'
2020 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
2121 _LT_DECL(, macro_revision, 0)
2222 ])
00 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
11 #
2 # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
2 # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
3 # Foundation, Inc.
34 # Written by Scott James Remnant, 2004.
45 #
56 # This file is free software; the Free Software Foundation gives
1011
1112 # These exist entirely to fool aclocal when bootstrapping libtool.
1213 #
13 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
14 # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
1415 # which have later been changed to m4_define as they aren't part of the
1516 # exported API, or moved to Autoconf or Automake where they belong.
1617 #
2425 # included after everything else. This provides aclocal with the
2526 # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
2627 # because those macros already exist, or will be overwritten later.
27 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
28 # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
2829 #
2930 # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
3031 # Yes, that means every name once taken will need to remain here until
0 dnl Functions for testing
1 dnl
2 dnl Version: 20161212
3
4 dnl Function to detect if tests dependencies are available
5 AC_DEFUN([AX_TESTS_CHECK_LOCAL],
6 [AC_CHECK_HEADERS([dlfcn.h])
7
8 AC_CHECK_FUNCS([fmemopen getopt])
9
10 AC_CHECK_LIB(
11 dl,
12 dlsym)
13
14 AS_IF(
15 [test "x$lt_cv_prog_gnu_ld" = xyes && test "x$ac_cv_lib_dl_dlsym" = xyes],
16 [AC_DEFINE(
17 [HAVE_GNU_DL_DLSYM],
18 [1],
19 [Define to 1 if dlsym funtion is available in GNU dl.])
20 ])
21 ])
22
00 dnl Functions for type definitions
11 dnl
2 dnl Version: 20150413
2 dnl Version: 20161004
33
44 dnl Function to detect if type definitions are available
55 AC_DEFUN([AX_TYPES_CHECK_LOCAL],
1919 [AC_SUBST(
2020 [HAVE_WIDE_CHARACTER_TYPE],
2121 [0])
22 AC_SUBST(
23 [HAVE_WCHAR_H],
24 [0])
2522 ])
2623
27 AC_CHECK_HEADERS([sys/types.h inttypes.h stdint.h])
24 AC_CHECK_HEADERS([sys/types.h inttypes.h stdint.h wchar.h])
2825
2926 AS_IF(
3027 [test "x$ac_cv_header_sys_types_h" = xyes],
5350 [1])],
5451 [AC_SUBST(
5552 [HAVE_STDINT_H],
53 [0])
54 ])
55
56 AS_IF(
57 [test "x$ac_cv_header_wchar_h" = xyes],
58 [AC_SUBST(
59 [HAVE_WCHAR_H],
60 [1]) ],
61 [AC_SUBST(
62 [HAVE_WCHAR_H],
5663 [0])
5764 ])
5865
116123 AC_CHECK_SIZEOF([int])
117124 AC_CHECK_SIZEOF([off_t])
118125 AC_CHECK_SIZEOF([size_t])
119
126
120127 AS_IF(
121 [test "x$ac_cv_enable_wide_character_type" != xno],
122 [AC_CHECK_HEADERS(
123 [wchar.h],
124 [AC_DEFINE(
125 [HAVE_WCHAR_H],
126 [1],
127 [Define to 1 if you have the <wchar.h> header file.])
128 AC_SUBST(
129 [HAVE_WCHAR_H],
130 [1]) ],
131 [AC_MSG_FAILURE(
132 [Missing header: wchar.h],
133 [1]) ])
134
135 AC_CHECK_SIZEOF([wchar_t])
136 ])
137
128 [test "x$ac_cv_header_wchar_h" = xyes],
129 [AC_CHECK_SIZEOF([wchar_t])])
138130 ])
139131
9696 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9797 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9898 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
99 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
10099 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
101100 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
102101 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
107106 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
108107 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
109108 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
110 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
111 $(top_srcdir)/configure.ac
109 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
110 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
112111 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
113112 $(ACLOCAL_M4)
114113 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
211210 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
212211 HAVE_LIBCPATH = @HAVE_LIBCPATH@
213212 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
214 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
215 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
216213 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
217214 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
218215 HAVE_LIBFDATA = @HAVE_LIBFDATA@
231228 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
232229 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
233230 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
234 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
235 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
236231 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
237232 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
238233 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
279274 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
280275 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
281276 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
282 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
283 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
284 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
285 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
286277 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
287278 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
288279 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
315306 LTLIBICONV = @LTLIBICONV@
316307 LTLIBINTL = @LTLIBINTL@
317308 LTLIBOBJS = @LTLIBOBJS@
309 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
318310 MAKEINFO = @MAKEINFO@
319311 MANIFEST_TOOL = @MANIFEST_TOOL@
320312 MKDIR_P = @MKDIR_P@
421413 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
422414 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
423415 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
424 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
425 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
426 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
427 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
428 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
429 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
430416 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
431417 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
432418 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
495481 libcpath_LIBS = @libcpath_LIBS@
496482 libcsplit_CFLAGS = @libcsplit_CFLAGS@
497483 libcsplit_LIBS = @libcsplit_LIBS@
498 libcstring_CFLAGS = @libcstring_CFLAGS@
499 libcstring_LIBS = @libcstring_LIBS@
500 libcsystem_CFLAGS = @libcsystem_CFLAGS@
501 libcsystem_LIBS = @libcsystem_LIBS@
502484 libcthreads_CFLAGS = @libcthreads_CFLAGS@
503485 libcthreads_LIBS = @libcthreads_LIBS@
504486 libdir = @libdir@
0 .Dd February 23, 2016
0 .Dd January 21, 2017
11 .Dt libesedb 3
22 .Os libesedb
33 .Sh NAME
302302 .Sh AUTHOR
303303 These man pages are generated from "libesedb.h".
304304 .Sh COPYRIGHT
305 Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>.
305 Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>.
306306
307307 This is free software; see the source for copying conditions.
308308 There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00 MSVSCPP_FILES = \
1 esedb_test_get_version/esedb_test_get_version.vcproj \
2 esedb_test_open_close/esedb_test_open_close.vcproj \
1 esedb_test_catalog/esedb_test_catalog.vcproj \
2 esedb_test_catalog_definition/esedb_test_catalog_definition.vcproj \
3 esedb_test_column/esedb_test_column.vcproj \
4 esedb_test_column_type/esedb_test_column_type.vcproj \
5 esedb_test_data_definition/esedb_test_data_definition.vcproj \
6 esedb_test_data_segment/esedb_test_data_segment.vcproj \
7 esedb_test_database/esedb_test_database.vcproj \
8 esedb_test_error/esedb_test_error.vcproj \
9 esedb_test_file/esedb_test_file.vcproj \
10 esedb_test_index/esedb_test_index.vcproj \
11 esedb_test_io_handle/esedb_test_io_handle.vcproj \
12 esedb_test_key/esedb_test_key.vcproj \
13 esedb_test_long_value/esedb_test_long_value.vcproj \
14 esedb_test_multi_value/esedb_test_multi_value.vcproj \
15 esedb_test_notify/esedb_test_notify.vcproj \
16 esedb_test_page/esedb_test_page.vcproj \
17 esedb_test_page_tree/esedb_test_page_tree.vcproj \
18 esedb_test_page_value/esedb_test_page_value.vcproj \
19 esedb_test_record/esedb_test_record.vcproj \
20 esedb_test_support/esedb_test_support.vcproj \
21 esedb_test_table/esedb_test_table.vcproj \
22 esedb_test_table_definition/esedb_test_table_definition.vcproj \
323 esedbexport/esedbexport.vcproj \
424 esedbinfo/esedbinfo.vcproj \
525 libbfio/libbfio.vcproj \
1030 libcnotify/libcnotify.vcproj \
1131 libcpath/libcpath.vcproj \
1232 libcsplit/libcsplit.vcproj \
13 libcstring/libcstring.vcproj \
14 libcsystem/libcsystem.vcproj \
1533 libcthreads/libcthreads.vcproj \
1634 libesedb/libesedb.vcproj \
1735 libfcache/libfcache.vcproj \
2644 pyesedb/pyesedb.vcproj \
2745 libesedb.sln
2846
29 SCRIPT_FILES = \
30 scripts/vs2008_x64.sh \
31 scripts/vs2008_x64_sln.sed \
32 scripts/vs2008_x64_vcproj.sed \
33 scripts/vs2010_x64.sh \
34 scripts/vs2010_x64_sln.sed \
35 scripts/vs2010_x64_vcxproj.sed
36
3747 EXTRA_DIST = \
38 $(MSVSCPP_FILES) \
39 $(SCRIPT_FILES)
48 $(MSVSCPP_FILES)
4049
4150 MAINTAINERCLEANFILES = \
4251 Makefile.in
9696 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9797 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9898 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
99 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
10099 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
101100 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
102101 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
107106 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
108107 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
109108 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
110 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
111 $(top_srcdir)/configure.ac
109 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
110 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
112111 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
113112 $(ACLOCAL_M4)
114113 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
179178 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
180179 HAVE_LIBCPATH = @HAVE_LIBCPATH@
181180 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
182 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
183 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
184181 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
185182 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
186183 HAVE_LIBFDATA = @HAVE_LIBFDATA@
199196 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
200197 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
201198 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
202 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
203 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
204199 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
205200 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
206201 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
247242 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
248243 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
249244 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
250 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
251 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
252 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
253 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
254245 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
255246 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
256247 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
283274 LTLIBICONV = @LTLIBICONV@
284275 LTLIBINTL = @LTLIBINTL@
285276 LTLIBOBJS = @LTLIBOBJS@
277 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
286278 MAKEINFO = @MAKEINFO@
287279 MANIFEST_TOOL = @MANIFEST_TOOL@
288280 MKDIR_P = @MKDIR_P@
389381 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
390382 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
391383 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
392 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
393 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
394 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
395 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
396 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
397 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
398384 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
399385 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
400386 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
463449 libcpath_LIBS = @libcpath_LIBS@
464450 libcsplit_CFLAGS = @libcsplit_CFLAGS@
465451 libcsplit_LIBS = @libcsplit_LIBS@
466 libcstring_CFLAGS = @libcstring_CFLAGS@
467 libcstring_LIBS = @libcstring_LIBS@
468 libcsystem_CFLAGS = @libcsystem_CFLAGS@
469 libcsystem_LIBS = @libcsystem_LIBS@
470452 libcthreads_CFLAGS = @libcthreads_CFLAGS@
471453 libcthreads_LIBS = @libcthreads_LIBS@
472454 libdir = @libdir@
516498 top_builddir = @top_builddir@
517499 top_srcdir = @top_srcdir@
518500 MSVSCPP_FILES = \
519 esedb_test_get_version/esedb_test_get_version.vcproj \
520 esedb_test_open_close/esedb_test_open_close.vcproj \
501 esedb_test_catalog/esedb_test_catalog.vcproj \
502 esedb_test_catalog_definition/esedb_test_catalog_definition.vcproj \
503 esedb_test_column/esedb_test_column.vcproj \
504 esedb_test_column_type/esedb_test_column_type.vcproj \
505 esedb_test_data_definition/esedb_test_data_definition.vcproj \
506 esedb_test_data_segment/esedb_test_data_segment.vcproj \
507 esedb_test_database/esedb_test_database.vcproj \
508 esedb_test_error/esedb_test_error.vcproj \
509 esedb_test_file/esedb_test_file.vcproj \
510 esedb_test_index/esedb_test_index.vcproj \
511 esedb_test_io_handle/esedb_test_io_handle.vcproj \
512 esedb_test_key/esedb_test_key.vcproj \
513 esedb_test_long_value/esedb_test_long_value.vcproj \
514 esedb_test_multi_value/esedb_test_multi_value.vcproj \
515 esedb_test_notify/esedb_test_notify.vcproj \
516 esedb_test_page/esedb_test_page.vcproj \
517 esedb_test_page_tree/esedb_test_page_tree.vcproj \
518 esedb_test_page_value/esedb_test_page_value.vcproj \
519 esedb_test_record/esedb_test_record.vcproj \
520 esedb_test_support/esedb_test_support.vcproj \
521 esedb_test_table/esedb_test_table.vcproj \
522 esedb_test_table_definition/esedb_test_table_definition.vcproj \
521523 esedbexport/esedbexport.vcproj \
522524 esedbinfo/esedbinfo.vcproj \
523525 libbfio/libbfio.vcproj \
528530 libcnotify/libcnotify.vcproj \
529531 libcpath/libcpath.vcproj \
530532 libcsplit/libcsplit.vcproj \
531 libcstring/libcstring.vcproj \
532 libcsystem/libcsystem.vcproj \
533533 libcthreads/libcthreads.vcproj \
534534 libesedb/libesedb.vcproj \
535535 libfcache/libfcache.vcproj \
544544 pyesedb/pyesedb.vcproj \
545545 libesedb.sln
546546
547 SCRIPT_FILES = \
548 scripts/vs2008_x64.sh \
549 scripts/vs2008_x64_sln.sed \
550 scripts/vs2008_x64_vcproj.sed \
551 scripts/vs2010_x64.sh \
552 scripts/vs2010_x64_sln.sed \
553 scripts/vs2010_x64_vcxproj.sed
554
555547 EXTRA_DIST = \
556 $(MSVSCPP_FILES) \
557 $(SCRIPT_FILES)
548 $(MSVSCPP_FILES)
558549
559550 MAINTAINERCLEANFILES = \
560551 Makefile.in
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="esedb_test_catalog"
5 ProjectGUID="{4065F2DD-616C-4C2A-BCA5-7CF87383DB12}"
6 RootNamespace="esedb_test_catalog"
7 Keyword="Win32Proj"
8 TargetFrameworkVersion="131072"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Release|Win32"
20 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="1"
23 CharacterSet="1"
24 WholeProgramOptimization="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
45 RuntimeLibrary="2"
46 WarningLevel="4"
47 CompileAs="1"
48 />
49 <Tool
50 Name="VCManagedResourceCompilerTool"
51 />
52 <Tool
53 Name="VCResourceCompilerTool"
54 />
55 <Tool
56 Name="VCPreLinkEventTool"
57 />
58 <Tool
59 Name="VCLinkerTool"
60 LinkIncremental="1"
61 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
62 SubSystem="1"
63 OptimizeReferences="2"
64 EnableCOMDATFolding="2"
65 RandomizedBaseAddress="2"
66 DataExecutionPrevention="2"
67 TargetMachine="1"
68 />
69 <Tool
70 Name="VCALinkTool"
71 />
72 <Tool
73 Name="VCManifestTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCAppVerifierTool"
86 />
87 <Tool
88 Name="VCPostBuildEventTool"
89 />
90 </Configuration>
91 <Configuration
92 Name="VSDebug|Win32"
93 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
94 IntermediateDirectory="$(ConfigurationName)"
95 ConfigurationType="1"
96 CharacterSet="1"
97 >
98 <Tool
99 Name="VCPreBuildEventTool"
100 />
101 <Tool
102 Name="VCCustomBuildTool"
103 />
104 <Tool
105 Name="VCXMLDataGeneratorTool"
106 />
107 <Tool
108 Name="VCWebServiceProxyGeneratorTool"
109 />
110 <Tool
111 Name="VCMIDLTool"
112 />
113 <Tool
114 Name="VCCLCompilerTool"
115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
118 BasicRuntimeChecks="3"
119 SmallerTypeCheck="true"
120 RuntimeLibrary="3"
121 WarningLevel="4"
122 DebugInformationFormat="3"
123 CompileAs="1"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLinkerTool"
136 LinkIncremental="1"
137 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
138 GenerateDebugInformation="true"
139 SubSystem="1"
140 OptimizeReferences="2"
141 EnableCOMDATFolding="2"
142 RandomizedBaseAddress="1"
143 DataExecutionPrevention="1"
144 TargetMachine="1"
145 />
146 <Tool
147 Name="VCALinkTool"
148 />
149 <Tool
150 Name="VCManifestTool"
151 />
152 <Tool
153 Name="VCXDCMakeTool"
154 />
155 <Tool
156 Name="VCBscMakeTool"
157 />
158 <Tool
159 Name="VCFxCopTool"
160 />
161 <Tool
162 Name="VCAppVerifierTool"
163 />
164 <Tool
165 Name="VCPostBuildEventTool"
166 />
167 </Configuration>
168 </Configurations>
169 <References>
170 </References>
171 <Files>
172 <Filter
173 Name="Source Files"
174 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176 >
177 <File
178 RelativePath="..\..\tests\esedb_test_catalog.c"
179 >
180 </File>
181 <File
182 RelativePath="..\..\tests\esedb_test_memory.c"
183 >
184 </File>
185 </Filter>
186 <Filter
187 Name="Header Files"
188 Filter="h;hpp;hxx;hm;inl;inc;xsd"
189 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
190 >
191 <File
192 RelativePath="..\..\tests\esedb_test_libcerror.h"
193 >
194 </File>
195 <File
196 RelativePath="..\..\tests\esedb_test_libesedb.h"
197 >
198 </File>
199 <File
200 RelativePath="..\..\tests\esedb_test_macros.h"
201 >
202 </File>
203 <File
204 RelativePath="..\..\tests\esedb_test_memory.h"
205 >
206 </File>
207 <File
208 RelativePath="..\..\tests\esedb_test_unused.h"
209 >
210 </File>
211 </Filter>
212 <Filter
213 Name="Resource Files"
214 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
215 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
216 >
217 </Filter>
218 </Files>
219 <Globals>
220 </Globals>
221 </VisualStudioProject>
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="esedb_test_catalog_definition"
5 ProjectGUID="{ACD71378-4A58-4141-9A66-A05C9101885B}"
6 RootNamespace="esedb_test_catalog_definition"
7 Keyword="Win32Proj"
8 TargetFrameworkVersion="131072"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Release|Win32"
20 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="1"
23 CharacterSet="1"
24 WholeProgramOptimization="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
45 RuntimeLibrary="2"
46 WarningLevel="4"
47 CompileAs="1"
48 />
49 <Tool
50 Name="VCManagedResourceCompilerTool"
51 />
52 <Tool
53 Name="VCResourceCompilerTool"
54 />
55 <Tool
56 Name="VCPreLinkEventTool"
57 />
58 <Tool
59 Name="VCLinkerTool"
60 LinkIncremental="1"
61 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
62 SubSystem="1"
63 OptimizeReferences="2"
64 EnableCOMDATFolding="2"
65 RandomizedBaseAddress="2"
66 DataExecutionPrevention="2"
67 TargetMachine="1"
68 />
69 <Tool
70 Name="VCALinkTool"
71 />
72 <Tool
73 Name="VCManifestTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCAppVerifierTool"
86 />
87 <Tool
88 Name="VCPostBuildEventTool"
89 />
90 </Configuration>
91 <Configuration
92 Name="VSDebug|Win32"
93 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
94 IntermediateDirectory="$(ConfigurationName)"
95 ConfigurationType="1"
96 CharacterSet="1"
97 >
98 <Tool
99 Name="VCPreBuildEventTool"
100 />
101 <Tool
102 Name="VCCustomBuildTool"
103 />
104 <Tool
105 Name="VCXMLDataGeneratorTool"
106 />
107 <Tool
108 Name="VCWebServiceProxyGeneratorTool"
109 />
110 <Tool
111 Name="VCMIDLTool"
112 />
113 <Tool
114 Name="VCCLCompilerTool"
115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
118 BasicRuntimeChecks="3"
119 SmallerTypeCheck="true"
120 RuntimeLibrary="3"
121 WarningLevel="4"
122 DebugInformationFormat="3"
123 CompileAs="1"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLinkerTool"
136 LinkIncremental="1"
137 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
138 GenerateDebugInformation="true"
139 SubSystem="1"
140 OptimizeReferences="2"
141 EnableCOMDATFolding="2"
142 RandomizedBaseAddress="1"
143 DataExecutionPrevention="1"
144 TargetMachine="1"
145 />
146 <Tool
147 Name="VCALinkTool"
148 />
149 <Tool
150 Name="VCManifestTool"
151 />
152 <Tool
153 Name="VCXDCMakeTool"
154 />
155 <Tool
156 Name="VCBscMakeTool"
157 />
158 <Tool
159 Name="VCFxCopTool"
160 />
161 <Tool
162 Name="VCAppVerifierTool"
163 />
164 <Tool
165 Name="VCPostBuildEventTool"
166 />
167 </Configuration>
168 </Configurations>
169 <References>
170 </References>
171 <Files>
172 <Filter
173 Name="Source Files"
174 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176 >
177 <File
178 RelativePath="..\..\tests\esedb_test_catalog_definition.c"
179 >
180 </File>
181 <File
182 RelativePath="..\..\tests\esedb_test_memory.c"
183 >
184 </File>
185 </Filter>
186 <Filter
187 Name="Header Files"
188 Filter="h;hpp;hxx;hm;inl;inc;xsd"
189 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
190 >
191 <File
192 RelativePath="..\..\tests\esedb_test_libcerror.h"
193 >
194 </File>
195 <File
196 RelativePath="..\..\tests\esedb_test_libesedb.h"
197 >
198 </File>
199 <File
200 RelativePath="..\..\tests\esedb_test_macros.h"
201 >
202 </File>
203 <File
204 RelativePath="..\..\tests\esedb_test_memory.h"
205 >
206 </File>
207 <File
208 RelativePath="..\..\tests\esedb_test_unused.h"
209 >
210 </File>
211 </Filter>
212 <Filter
213 Name="Resource Files"
214 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
215 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
216 >
217 </Filter>
218 </Files>
219 <Globals>
220 </Globals>
221 </VisualStudioProject>
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="esedb_test_column"
5 ProjectGUID="{AFFAB164-A537-4271-A3B2-816A3253AC35}"
6 RootNamespace="esedb_test_column"
7 Keyword="Win32Proj"
8 TargetFrameworkVersion="131072"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Release|Win32"
20 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="1"
23 CharacterSet="1"
24 WholeProgramOptimization="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
45 RuntimeLibrary="2"
46 WarningLevel="4"
47 CompileAs="1"
48 />
49 <Tool
50 Name="VCManagedResourceCompilerTool"
51 />
52 <Tool
53 Name="VCResourceCompilerTool"
54 />
55 <Tool
56 Name="VCPreLinkEventTool"
57 />
58 <Tool
59 Name="VCLinkerTool"
60 LinkIncremental="1"
61 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
62 SubSystem="1"
63 OptimizeReferences="2"
64 EnableCOMDATFolding="2"
65 RandomizedBaseAddress="2"
66 DataExecutionPrevention="2"
67 TargetMachine="1"
68 />
69 <Tool
70 Name="VCALinkTool"
71 />
72 <Tool
73 Name="VCManifestTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCAppVerifierTool"
86 />
87 <Tool
88 Name="VCPostBuildEventTool"
89 />
90 </Configuration>
91 <Configuration
92 Name="VSDebug|Win32"
93 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
94 IntermediateDirectory="$(ConfigurationName)"
95 ConfigurationType="1"
96 CharacterSet="1"
97 >
98 <Tool
99 Name="VCPreBuildEventTool"
100 />
101 <Tool
102 Name="VCCustomBuildTool"
103 />
104 <Tool
105 Name="VCXMLDataGeneratorTool"
106 />
107 <Tool
108 Name="VCWebServiceProxyGeneratorTool"
109 />
110 <Tool
111 Name="VCMIDLTool"
112 />
113 <Tool
114 Name="VCCLCompilerTool"
115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
118 BasicRuntimeChecks="3"
119 SmallerTypeCheck="true"
120 RuntimeLibrary="3"
121 WarningLevel="4"
122 DebugInformationFormat="3"
123 CompileAs="1"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLinkerTool"
136 LinkIncremental="1"
137 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
138 GenerateDebugInformation="true"
139 SubSystem="1"
140 OptimizeReferences="2"
141 EnableCOMDATFolding="2"
142 RandomizedBaseAddress="1"
143 DataExecutionPrevention="1"
144 TargetMachine="1"
145 />
146 <Tool
147 Name="VCALinkTool"
148 />
149 <Tool
150 Name="VCManifestTool"
151 />
152 <Tool
153 Name="VCXDCMakeTool"
154 />
155 <Tool
156 Name="VCBscMakeTool"
157 />
158 <Tool
159 Name="VCFxCopTool"
160 />
161 <Tool
162 Name="VCAppVerifierTool"
163 />
164 <Tool
165 Name="VCPostBuildEventTool"
166 />
167 </Configuration>
168 </Configurations>
169 <References>
170 </References>
171 <Files>
172 <Filter
173 Name="Source Files"
174 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176 >
177 <File
178 RelativePath="..\..\tests\esedb_test_column.c"
179 >
180 </File>
181 <File
182 RelativePath="..\..\tests\esedb_test_memory.c"
183 >
184 </File>
185 </Filter>
186 <Filter
187 Name="Header Files"
188 Filter="h;hpp;hxx;hm;inl;inc;xsd"
189 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
190 >
191 <File
192 RelativePath="..\..\tests\esedb_test_libcerror.h"
193 >
194 </File>
195 <File
196 RelativePath="..\..\tests\esedb_test_libesedb.h"
197 >
198 </File>
199 <File
200 RelativePath="..\..\tests\esedb_test_macros.h"
201 >
202 </File>
203 <File
204 RelativePath="..\..\tests\esedb_test_memory.h"
205 >
206 </File>
207 <File
208 RelativePath="..\..\tests\esedb_test_unused.h"
209 >
210 </File>
211 </Filter>
212 <Filter
213 Name="Resource Files"
214 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
215 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
216 >
217 </Filter>
218 </Files>
219 <Globals>
220 </Globals>
221 </VisualStudioProject>
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="esedb_test_column_type"
5 ProjectGUID="{E7AC2AB8-2946-40F9-B0B2-02CE8C96C728}"
6 RootNamespace="esedb_test_column_type"
7 Keyword="Win32Proj"
8 TargetFrameworkVersion="131072"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Release|Win32"
20 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="1"
23 CharacterSet="1"
24 WholeProgramOptimization="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
45 RuntimeLibrary="2"
46 WarningLevel="4"
47 CompileAs="1"
48 />
49 <Tool
50 Name="VCManagedResourceCompilerTool"
51 />
52 <Tool
53 Name="VCResourceCompilerTool"
54 />
55 <Tool
56 Name="VCPreLinkEventTool"
57 />
58 <Tool
59 Name="VCLinkerTool"
60 LinkIncremental="1"
61 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
62 SubSystem="1"
63 OptimizeReferences="2"
64 EnableCOMDATFolding="2"
65 RandomizedBaseAddress="2"
66 DataExecutionPrevention="2"
67 TargetMachine="1"
68 />
69 <Tool
70 Name="VCALinkTool"
71 />
72 <Tool
73 Name="VCManifestTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCAppVerifierTool"
86 />
87 <Tool
88 Name="VCPostBuildEventTool"
89 />
90 </Configuration>
91 <Configuration
92 Name="VSDebug|Win32"
93 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
94 IntermediateDirectory="$(ConfigurationName)"
95 ConfigurationType="1"
96 CharacterSet="1"
97 >
98 <Tool
99 Name="VCPreBuildEventTool"
100 />
101 <Tool
102 Name="VCCustomBuildTool"
103 />
104 <Tool
105 Name="VCXMLDataGeneratorTool"
106 />
107 <Tool
108 Name="VCWebServiceProxyGeneratorTool"
109 />
110 <Tool
111 Name="VCMIDLTool"
112 />
113 <Tool
114 Name="VCCLCompilerTool"
115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
118 BasicRuntimeChecks="3"
119 SmallerTypeCheck="true"
120 RuntimeLibrary="3"
121 WarningLevel="4"
122 DebugInformationFormat="3"
123 CompileAs="1"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLinkerTool"
136 LinkIncremental="1"
137 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
138 GenerateDebugInformation="true"
139 SubSystem="1"
140 OptimizeReferences="2"
141 EnableCOMDATFolding="2"
142 RandomizedBaseAddress="1"
143 DataExecutionPrevention="1"
144 TargetMachine="1"
145 />
146 <Tool
147 Name="VCALinkTool"
148 />
149 <Tool
150 Name="VCManifestTool"
151 />
152 <Tool
153 Name="VCXDCMakeTool"
154 />
155 <Tool
156 Name="VCBscMakeTool"
157 />
158 <Tool
159 Name="VCFxCopTool"
160 />
161 <Tool
162 Name="VCAppVerifierTool"
163 />
164 <Tool
165 Name="VCPostBuildEventTool"
166 />
167 </Configuration>
168 </Configurations>
169 <References>
170 </References>
171 <Files>
172 <Filter
173 Name="Source Files"
174 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176 >
177 <File
178 RelativePath="..\..\tests\esedb_test_column_type.c"
179 >
180 </File>
181 <File
182 RelativePath="..\..\tests\esedb_test_memory.c"
183 >
184 </File>
185 </Filter>
186 <Filter
187 Name="Header Files"
188 Filter="h;hpp;hxx;hm;inl;inc;xsd"
189 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
190 >
191 <File
192 RelativePath="..\..\tests\esedb_test_libcerror.h"
193 >
194 </File>
195 <File
196 RelativePath="..\..\tests\esedb_test_libesedb.h"
197 >
198 </File>
199 <File
200 RelativePath="..\..\tests\esedb_test_macros.h"
201 >
202 </File>
203 <File
204 RelativePath="..\..\tests\esedb_test_memory.h"
205 >
206 </File>
207 <File
208 RelativePath="..\..\tests\esedb_test_unused.h"
209 >
210 </File>
211 </Filter>
212 <Filter
213 Name="Resource Files"
214 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
215 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
216 >
217 </Filter>
218 </Files>
219 <Globals>
220 </Globals>
221 </VisualStudioProject>
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="esedb_test_data_definition"
5 ProjectGUID="{9419D031-C7C3-4DC1-BC5B-ECFC832B80E9}"
6 RootNamespace="esedb_test_data_definition"
7 Keyword="Win32Proj"
8 TargetFrameworkVersion="131072"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Release|Win32"
20 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="1"
23 CharacterSet="1"
24 WholeProgramOptimization="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
45 RuntimeLibrary="2"
46 WarningLevel="4"
47 CompileAs="1"
48 />
49 <Tool
50 Name="VCManagedResourceCompilerTool"
51 />
52 <Tool
53 Name="VCResourceCompilerTool"
54 />
55 <Tool
56 Name="VCPreLinkEventTool"
57 />
58 <Tool
59 Name="VCLinkerTool"
60 LinkIncremental="1"
61 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
62 SubSystem="1"
63 OptimizeReferences="2"
64 EnableCOMDATFolding="2"
65 RandomizedBaseAddress="2"
66 DataExecutionPrevention="2"
67 TargetMachine="1"
68 />
69 <Tool
70 Name="VCALinkTool"
71 />
72 <Tool
73 Name="VCManifestTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCAppVerifierTool"
86 />
87 <Tool
88 Name="VCPostBuildEventTool"
89 />
90 </Configuration>
91 <Configuration
92 Name="VSDebug|Win32"
93 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
94 IntermediateDirectory="$(ConfigurationName)"
95 ConfigurationType="1"
96 CharacterSet="1"
97 >
98 <Tool
99 Name="VCPreBuildEventTool"
100 />
101 <Tool
102 Name="VCCustomBuildTool"
103 />
104 <Tool
105 Name="VCXMLDataGeneratorTool"
106 />
107 <Tool
108 Name="VCWebServiceProxyGeneratorTool"
109 />
110 <Tool
111 Name="VCMIDLTool"
112 />
113 <Tool
114 Name="VCCLCompilerTool"
115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
118 BasicRuntimeChecks="3"
119 SmallerTypeCheck="true"
120 RuntimeLibrary="3"
121 WarningLevel="4"
122 DebugInformationFormat="3"
123 CompileAs="1"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLinkerTool"
136 LinkIncremental="1"
137 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
138 GenerateDebugInformation="true"
139 SubSystem="1"
140 OptimizeReferences="2"
141 EnableCOMDATFolding="2"
142 RandomizedBaseAddress="1"
143 DataExecutionPrevention="1"
144 TargetMachine="1"
145 />
146 <Tool
147 Name="VCALinkTool"
148 />
149 <Tool
150 Name="VCManifestTool"
151 />
152 <Tool
153 Name="VCXDCMakeTool"
154 />
155 <Tool
156 Name="VCBscMakeTool"
157 />
158 <Tool
159 Name="VCFxCopTool"
160 />
161 <Tool
162 Name="VCAppVerifierTool"
163 />
164 <Tool
165 Name="VCPostBuildEventTool"
166 />
167 </Configuration>
168 </Configurations>
169 <References>
170 </References>
171 <Files>
172 <Filter
173 Name="Source Files"
174 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176 >
177 <File
178 RelativePath="..\..\tests\esedb_test_data_definition.c"
179 >
180 </File>
181 <File
182 RelativePath="..\..\tests\esedb_test_memory.c"
183 >
184 </File>
185 </Filter>
186 <Filter
187 Name="Header Files"
188 Filter="h;hpp;hxx;hm;inl;inc;xsd"
189 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
190 >
191 <File
192 RelativePath="..\..\tests\esedb_test_libcerror.h"
193 >
194 </File>
195 <File
196 RelativePath="..\..\tests\esedb_test_libesedb.h"
197 >
198 </File>
199 <File
200 RelativePath="..\..\tests\esedb_test_macros.h"
201 >
202 </File>
203 <File
204 RelativePath="..\..\tests\esedb_test_memory.h"
205 >
206 </File>
207 <File
208 RelativePath="..\..\tests\esedb_test_unused.h"
209 >
210 </File>
211 </Filter>
212 <Filter
213 Name="Resource Files"
214 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
215 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
216 >
217 </Filter>
218 </Files>
219 <Globals>
220 </Globals>
221 </VisualStudioProject>
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="esedb_test_data_segment"
5 ProjectGUID="{A9811C8C-E212-4354-A2AB-0D1F5C632987}"
6 RootNamespace="esedb_test_data_segment"
7 Keyword="Win32Proj"
8 TargetFrameworkVersion="131072"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Release|Win32"
20 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="1"
23 CharacterSet="1"
24 WholeProgramOptimization="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
45 RuntimeLibrary="2"
46 WarningLevel="4"
47 CompileAs="1"
48 />
49 <Tool
50 Name="VCManagedResourceCompilerTool"
51 />
52 <Tool
53 Name="VCResourceCompilerTool"
54 />
55 <Tool
56 Name="VCPreLinkEventTool"
57 />
58 <Tool
59 Name="VCLinkerTool"
60 LinkIncremental="1"
61 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
62 SubSystem="1"
63 OptimizeReferences="2"
64 EnableCOMDATFolding="2"
65 RandomizedBaseAddress="2"
66 DataExecutionPrevention="2"
67 TargetMachine="1"
68 />
69 <Tool
70 Name="VCALinkTool"
71 />
72 <Tool
73 Name="VCManifestTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCAppVerifierTool"
86 />
87 <Tool
88 Name="VCPostBuildEventTool"
89 />
90 </Configuration>
91 <Configuration
92 Name="VSDebug|Win32"
93 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
94 IntermediateDirectory="$(ConfigurationName)"
95 ConfigurationType="1"
96 CharacterSet="1"
97 >
98 <Tool
99 Name="VCPreBuildEventTool"
100 />
101 <Tool
102 Name="VCCustomBuildTool"
103 />
104 <Tool
105 Name="VCXMLDataGeneratorTool"
106 />
107 <Tool
108 Name="VCWebServiceProxyGeneratorTool"
109 />
110 <Tool
111 Name="VCMIDLTool"
112 />
113 <Tool
114 Name="VCCLCompilerTool"
115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
118 BasicRuntimeChecks="3"
119 SmallerTypeCheck="true"
120 RuntimeLibrary="3"
121 WarningLevel="4"
122 DebugInformationFormat="3"
123 CompileAs="1"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLinkerTool"
136 LinkIncremental="1"
137 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
138 GenerateDebugInformation="true"
139 SubSystem="1"
140 OptimizeReferences="2"
141 EnableCOMDATFolding="2"
142 RandomizedBaseAddress="1"
143 DataExecutionPrevention="1"
144 TargetMachine="1"
145 />
146 <Tool
147 Name="VCALinkTool"
148 />
149 <Tool
150 Name="VCManifestTool"
151 />
152 <Tool
153 Name="VCXDCMakeTool"
154 />
155 <Tool
156 Name="VCBscMakeTool"
157 />
158 <Tool
159 Name="VCFxCopTool"
160 />
161 <Tool
162 Name="VCAppVerifierTool"
163 />
164 <Tool
165 Name="VCPostBuildEventTool"
166 />
167 </Configuration>
168 </Configurations>
169 <References>
170 </References>
171 <Files>
172 <Filter
173 Name="Source Files"
174 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176 >
177 <File
178 RelativePath="..\..\tests\esedb_test_data_segment.c"
179 >
180 </File>
181 <File
182 RelativePath="..\..\tests\esedb_test_memory.c"
183 >
184 </File>
185 </Filter>
186 <Filter
187 Name="Header Files"
188 Filter="h;hpp;hxx;hm;inl;inc;xsd"
189 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
190 >
191 <File
192 RelativePath="..\..\tests\esedb_test_libcerror.h"
193 >
194 </File>
195 <File
196 RelativePath="..\..\tests\esedb_test_libesedb.h"
197 >
198 </File>
199 <File
200 RelativePath="..\..\tests\esedb_test_macros.h"
201 >
202 </File>
203 <File
204 RelativePath="..\..\tests\esedb_test_memory.h"
205 >
206 </File>
207 <File
208 RelativePath="..\..\tests\esedb_test_unused.h"
209 >
210 </File>
211 </Filter>
212 <Filter
213 Name="Resource Files"
214 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
215 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
216 >
217 </Filter>
218 </Files>
219 <Globals>
220 </Globals>
221 </VisualStudioProject>
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="esedb_test_database"
5 ProjectGUID="{6ADF7681-DFAA-4CFF-9797-305E269B936D}"
6 RootNamespace="esedb_test_database"
7 Keyword="Win32Proj"
8 TargetFrameworkVersion="131072"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Release|Win32"
20 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="1"
23 CharacterSet="1"
24 WholeProgramOptimization="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
45 RuntimeLibrary="2"
46 WarningLevel="4"
47 CompileAs="1"
48 />
49 <Tool
50 Name="VCManagedResourceCompilerTool"
51 />
52 <Tool
53 Name="VCResourceCompilerTool"
54 />
55 <Tool
56 Name="VCPreLinkEventTool"
57 />
58 <Tool
59 Name="VCLinkerTool"
60 LinkIncremental="1"
61 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
62 SubSystem="1"
63 OptimizeReferences="2"
64 EnableCOMDATFolding="2"
65 RandomizedBaseAddress="2"
66 DataExecutionPrevention="2"
67 TargetMachine="1"
68 />
69 <Tool
70 Name="VCALinkTool"
71 />
72 <Tool
73 Name="VCManifestTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCAppVerifierTool"
86 />
87 <Tool
88 Name="VCPostBuildEventTool"
89 />
90 </Configuration>
91 <Configuration
92 Name="VSDebug|Win32"
93 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
94 IntermediateDirectory="$(ConfigurationName)"
95 ConfigurationType="1"
96 CharacterSet="1"
97 >
98 <Tool
99 Name="VCPreBuildEventTool"
100 />
101 <Tool
102 Name="VCCustomBuildTool"
103 />
104 <Tool
105 Name="VCXMLDataGeneratorTool"
106 />
107 <Tool
108 Name="VCWebServiceProxyGeneratorTool"
109 />
110 <Tool
111 Name="VCMIDLTool"
112 />
113 <Tool
114 Name="VCCLCompilerTool"
115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
118 BasicRuntimeChecks="3"
119 SmallerTypeCheck="true"
120 RuntimeLibrary="3"
121 WarningLevel="4"
122 DebugInformationFormat="3"
123 CompileAs="1"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLinkerTool"
136 LinkIncremental="1"
137 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
138 GenerateDebugInformation="true"
139 SubSystem="1"
140 OptimizeReferences="2"
141 EnableCOMDATFolding="2"
142 RandomizedBaseAddress="1"
143 DataExecutionPrevention="1"
144 TargetMachine="1"
145 />
146 <Tool
147 Name="VCALinkTool"
148 />
149 <Tool
150 Name="VCManifestTool"
151 />
152 <Tool
153 Name="VCXDCMakeTool"
154 />
155 <Tool
156 Name="VCBscMakeTool"
157 />
158 <Tool
159 Name="VCFxCopTool"
160 />
161 <Tool
162 Name="VCAppVerifierTool"
163 />
164 <Tool
165 Name="VCPostBuildEventTool"
166 />
167 </Configuration>
168 </Configurations>
169 <References>
170 </References>
171 <Files>
172 <Filter
173 Name="Source Files"
174 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176 >
177 <File
178 RelativePath="..\..\tests\esedb_test_database.c"
179 >
180 </File>
181 <File
182 RelativePath="..\..\tests\esedb_test_memory.c"
183 >
184 </File>
185 </Filter>
186 <Filter
187 Name="Header Files"
188 Filter="h;hpp;hxx;hm;inl;inc;xsd"
189 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
190 >
191 <File
192 RelativePath="..\..\tests\esedb_test_libcerror.h"
193 >
194 </File>
195 <File
196 RelativePath="..\..\tests\esedb_test_libesedb.h"
197 >
198 </File>
199 <File
200 RelativePath="..\..\tests\esedb_test_macros.h"
201 >
202 </File>
203 <File
204 RelativePath="..\..\tests\esedb_test_memory.h"
205 >
206 </File>
207 <File
208 RelativePath="..\..\tests\esedb_test_unused.h"
209 >
210 </File>
211 </Filter>
212 <Filter
213 Name="Resource Files"
214 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
215 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
216 >
217 </Filter>
218 </Files>
219 <Globals>
220 </Globals>
221 </VisualStudioProject>
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="esedb_test_error"
5 ProjectGUID="{7858071B-74A6-46C8-8A4C-DF4E1916A644}"
6 RootNamespace="esedb_test_error"
7 Keyword="Win32Proj"
8 TargetFrameworkVersion="131072"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Release|Win32"
20 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="1"
23 CharacterSet="1"
24 WholeProgramOptimization="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
45 RuntimeLibrary="2"
46 WarningLevel="4"
47 CompileAs="1"
48 />
49 <Tool
50 Name="VCManagedResourceCompilerTool"
51 />
52 <Tool
53 Name="VCResourceCompilerTool"
54 />
55 <Tool
56 Name="VCPreLinkEventTool"
57 />
58 <Tool
59 Name="VCLinkerTool"
60 LinkIncremental="1"
61 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
62 SubSystem="1"
63 OptimizeReferences="2"
64 EnableCOMDATFolding="2"
65 RandomizedBaseAddress="2"
66 DataExecutionPrevention="2"
67 TargetMachine="1"
68 />
69 <Tool
70 Name="VCALinkTool"
71 />
72 <Tool
73 Name="VCManifestTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCAppVerifierTool"
86 />
87 <Tool
88 Name="VCPostBuildEventTool"
89 />
90 </Configuration>
91 <Configuration
92 Name="VSDebug|Win32"
93 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
94 IntermediateDirectory="$(ConfigurationName)"
95 ConfigurationType="1"
96 CharacterSet="1"
97 >
98 <Tool
99 Name="VCPreBuildEventTool"
100 />
101 <Tool
102 Name="VCCustomBuildTool"
103 />
104 <Tool
105 Name="VCXMLDataGeneratorTool"
106 />
107 <Tool
108 Name="VCWebServiceProxyGeneratorTool"
109 />
110 <Tool
111 Name="VCMIDLTool"
112 />
113 <Tool
114 Name="VCCLCompilerTool"
115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
118 BasicRuntimeChecks="3"
119 SmallerTypeCheck="true"
120 RuntimeLibrary="3"
121 WarningLevel="4"
122 DebugInformationFormat="3"
123 CompileAs="1"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLinkerTool"
136 LinkIncremental="1"
137 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
138 GenerateDebugInformation="true"
139 SubSystem="1"
140 OptimizeReferences="2"
141 EnableCOMDATFolding="2"
142 RandomizedBaseAddress="1"
143 DataExecutionPrevention="1"
144 TargetMachine="1"
145 />
146 <Tool
147 Name="VCALinkTool"
148 />
149 <Tool
150 Name="VCManifestTool"
151 />
152 <Tool
153 Name="VCXDCMakeTool"
154 />
155 <Tool
156 Name="VCBscMakeTool"
157 />
158 <Tool
159 Name="VCFxCopTool"
160 />
161 <Tool
162 Name="VCAppVerifierTool"
163 />
164 <Tool
165 Name="VCPostBuildEventTool"
166 />
167 </Configuration>
168 </Configurations>
169 <References>
170 </References>
171 <Files>
172 <Filter
173 Name="Source Files"
174 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176 >
177 <File
178 RelativePath="..\..\tests\esedb_test_error.c"
179 >
180 </File>
181 </Filter>
182 <Filter
183 Name="Header Files"
184 Filter="h;hpp;hxx;hm;inl;inc;xsd"
185 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
186 >
187 <File
188 RelativePath="..\..\tests\esedb_test_libesedb.h"
189 >
190 </File>
191 <File
192 RelativePath="..\..\tests\esedb_test_macros.h"
193 >
194 </File>
195 <File
196 RelativePath="..\..\tests\esedb_test_unused.h"
197 >
198 </File>
199 </Filter>
200 <Filter
201 Name="Resource Files"
202 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
203 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
204 >
205 </Filter>
206 </Files>
207 <Globals>
208 </Globals>
209 </VisualStudioProject>
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="esedb_test_file"
5 ProjectGUID="{53632831-C7D9-4B47-8EAC-16B716277ABB}"
6 RootNamespace="esedb_test_file"
7 Keyword="Win32Proj"
8 TargetFrameworkVersion="131072"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Release|Win32"
20 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="1"
23 CharacterSet="1"
24 WholeProgramOptimization="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
45 RuntimeLibrary="2"
46 WarningLevel="4"
47 CompileAs="1"
48 />
49 <Tool
50 Name="VCManagedResourceCompilerTool"
51 />
52 <Tool
53 Name="VCResourceCompilerTool"
54 />
55 <Tool
56 Name="VCPreLinkEventTool"
57 />
58 <Tool
59 Name="VCLinkerTool"
60 LinkIncremental="1"
61 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
62 SubSystem="1"
63 OptimizeReferences="2"
64 EnableCOMDATFolding="2"
65 RandomizedBaseAddress="2"
66 DataExecutionPrevention="2"
67 TargetMachine="1"
68 />
69 <Tool
70 Name="VCALinkTool"
71 />
72 <Tool
73 Name="VCManifestTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCAppVerifierTool"
86 />
87 <Tool
88 Name="VCPostBuildEventTool"
89 />
90 </Configuration>
91 <Configuration
92 Name="VSDebug|Win32"
93 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
94 IntermediateDirectory="$(ConfigurationName)"
95 ConfigurationType="1"
96 CharacterSet="1"
97 >
98 <Tool
99 Name="VCPreBuildEventTool"
100 />
101 <Tool
102 Name="VCCustomBuildTool"
103 />
104 <Tool
105 Name="VCXMLDataGeneratorTool"
106 />
107 <Tool
108 Name="VCWebServiceProxyGeneratorTool"
109 />
110 <Tool
111 Name="VCMIDLTool"
112 />
113 <Tool
114 Name="VCCLCompilerTool"
115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
118 BasicRuntimeChecks="3"
119 SmallerTypeCheck="true"
120 RuntimeLibrary="3"
121 WarningLevel="4"
122 DebugInformationFormat="3"
123 CompileAs="1"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLinkerTool"
136 LinkIncremental="1"
137 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
138 GenerateDebugInformation="true"
139 SubSystem="1"
140 OptimizeReferences="2"
141 EnableCOMDATFolding="2"
142 RandomizedBaseAddress="1"
143 DataExecutionPrevention="1"
144 TargetMachine="1"
145 />
146 <Tool
147 Name="VCALinkTool"
148 />
149 <Tool
150 Name="VCManifestTool"
151 />
152 <Tool
153 Name="VCXDCMakeTool"
154 />
155 <Tool
156 Name="VCBscMakeTool"
157 />
158 <Tool
159 Name="VCFxCopTool"
160 />
161 <Tool
162 Name="VCAppVerifierTool"
163 />
164 <Tool
165 Name="VCPostBuildEventTool"
166 />
167 </Configuration>
168 </Configurations>
169 <References>
170 </References>
171 <Files>
172 <Filter
173 Name="Source Files"
174 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176 >
177 <File
178 RelativePath="..\..\tests\esedb_test_file.c"
179 >
180 </File>
181 <File
182 RelativePath="..\..\tests\esedb_test_getopt.c"
183 >
184 </File>
185 <File
186 RelativePath="..\..\tests\esedb_test_memory.c"
187 >
188 </File>
189 </Filter>
190 <Filter
191 Name="Header Files"
192 Filter="h;hpp;hxx;hm;inl;inc;xsd"
193 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
194 >
195 <File
196 RelativePath="..\..\tests\esedb_test_getopt.h"
197 >
198 </File>
199 <File
200 RelativePath="..\..\tests\esedb_test_libcerror.h"
201 >
202 </File>
203 <File
204 RelativePath="..\..\tests\esedb_test_libclocale.h"
205 >
206 </File>
207 <File
208 RelativePath="..\..\tests\esedb_test_libcnotify.h"
209 >
210 </File>
211 <File
212 RelativePath="..\..\tests\esedb_test_libesedb.h"
213 >
214 </File>
215 <File
216 RelativePath="..\..\tests\esedb_test_libuna.h"
217 >
218 </File>
219 <File
220 RelativePath="..\..\tests\esedb_test_macros.h"
221 >
222 </File>
223 <File
224 RelativePath="..\..\tests\esedb_test_memory.h"
225 >
226 </File>
227 </Filter>
228 <Filter
229 Name="Resource Files"
230 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
231 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
232 >
233 </Filter>
234 </Files>
235 <Globals>
236 </Globals>
237 </VisualStudioProject>
+0
-210
msvscpp/esedb_test_get_version/esedb_test_get_version.vcproj less more
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="esedb_test_get_version"
5 ProjectGUID="{684AA161-541E-4CB8-BE49-31D3A63FE497}"
6 RootNamespace="esedb_test_get_version"
7 Keyword="Win32Proj"
8 TargetFrameworkVersion="131072"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Release|Win32"
20 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="1"
23 CharacterSet="1"
24 WholeProgramOptimization="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libcsystem"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBCSYSTEM;LIBESEDB_DLL_IMPORT"
45 RuntimeLibrary="2"
46 WarningLevel="4"
47 CompileAs="1"
48 />
49 <Tool
50 Name="VCManagedResourceCompilerTool"
51 />
52 <Tool
53 Name="VCResourceCompilerTool"
54 />
55 <Tool
56 Name="VCPreLinkEventTool"
57 />
58 <Tool
59 Name="VCLinkerTool"
60 LinkIncremental="1"
61 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
62 SubSystem="1"
63 OptimizeReferences="2"
64 EnableCOMDATFolding="2"
65 RandomizedBaseAddress="2"
66 DataExecutionPrevention="2"
67 TargetMachine="1"
68 />
69 <Tool
70 Name="VCALinkTool"
71 />
72 <Tool
73 Name="VCManifestTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCAppVerifierTool"
86 />
87 <Tool
88 Name="VCPostBuildEventTool"
89 />
90 </Configuration>
91 <Configuration
92 Name="VSDebug|Win32"
93 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
94 IntermediateDirectory="$(ConfigurationName)"
95 ConfigurationType="1"
96 CharacterSet="1"
97 >
98 <Tool
99 Name="VCPreBuildEventTool"
100 />
101 <Tool
102 Name="VCCustomBuildTool"
103 />
104 <Tool
105 Name="VCXMLDataGeneratorTool"
106 />
107 <Tool
108 Name="VCWebServiceProxyGeneratorTool"
109 />
110 <Tool
111 Name="VCMIDLTool"
112 />
113 <Tool
114 Name="VCCLCompilerTool"
115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libcsystem"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBCSYSTEM;LIBESEDB_DLL_IMPORT"
118 BasicRuntimeChecks="3"
119 SmallerTypeCheck="true"
120 RuntimeLibrary="3"
121 WarningLevel="4"
122 DebugInformationFormat="3"
123 CompileAs="1"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLinkerTool"
136 LinkIncremental="1"
137 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
138 GenerateDebugInformation="true"
139 SubSystem="1"
140 OptimizeReferences="2"
141 EnableCOMDATFolding="2"
142 RandomizedBaseAddress="1"
143 DataExecutionPrevention="1"
144 TargetMachine="1"
145 />
146 <Tool
147 Name="VCALinkTool"
148 />
149 <Tool
150 Name="VCManifestTool"
151 />
152 <Tool
153 Name="VCXDCMakeTool"
154 />
155 <Tool
156 Name="VCBscMakeTool"
157 />
158 <Tool
159 Name="VCFxCopTool"
160 />
161 <Tool
162 Name="VCAppVerifierTool"
163 />
164 <Tool
165 Name="VCPostBuildEventTool"
166 />
167 </Configuration>
168 </Configurations>
169 <References>
170 </References>
171 <Files>
172 <Filter
173 Name="Source Files"
174 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176 >
177 <File
178 RelativePath="..\..\tests\esedb_test_get_version.c"
179 >
180 </File>
181 </Filter>
182 <Filter
183 Name="Header Files"
184 Filter="h;hpp;hxx;hm;inl;inc;xsd"
185 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
186 >
187 <File
188 RelativePath="..\..\tests\esedb_test_libcstring.h"
189 >
190 </File>
191 <File
192 RelativePath="..\..\tests\esedb_test_libesedb.h"
193 >
194 </File>
195 <File
196 RelativePath="..\..\tests\esedb_test_unused.h"
197 >
198 </File>
199 </Filter>
200 <Filter
201 Name="Resource Files"
202 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
203 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
204 >
205 </Filter>
206 </Files>
207 <Globals>
208 </Globals>
209 </VisualStudioProject>
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="esedb_test_index"
5 ProjectGUID="{A48BD72B-3F94-42DD-9382-502ED60AB150}"
6 RootNamespace="esedb_test_index"
7 Keyword="Win32Proj"
8 TargetFrameworkVersion="131072"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Release|Win32"
20 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="1"
23 CharacterSet="1"
24 WholeProgramOptimization="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
45 RuntimeLibrary="2"
46 WarningLevel="4"
47 CompileAs="1"
48 />
49 <Tool
50 Name="VCManagedResourceCompilerTool"
51 />
52 <Tool
53 Name="VCResourceCompilerTool"
54 />
55 <Tool
56 Name="VCPreLinkEventTool"
57 />
58 <Tool
59 Name="VCLinkerTool"
60 LinkIncremental="1"
61 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
62 SubSystem="1"
63 OptimizeReferences="2"
64 EnableCOMDATFolding="2"
65 RandomizedBaseAddress="2"
66 DataExecutionPrevention="2"
67 TargetMachine="1"
68 />
69 <Tool
70 Name="VCALinkTool"
71 />
72 <Tool
73 Name="VCManifestTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCAppVerifierTool"
86 />
87 <Tool
88 Name="VCPostBuildEventTool"
89 />
90 </Configuration>
91 <Configuration
92 Name="VSDebug|Win32"
93 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
94 IntermediateDirectory="$(ConfigurationName)"
95 ConfigurationType="1"
96 CharacterSet="1"
97 >
98 <Tool
99 Name="VCPreBuildEventTool"
100 />
101 <Tool
102 Name="VCCustomBuildTool"
103 />
104 <Tool
105 Name="VCXMLDataGeneratorTool"
106 />
107 <Tool
108 Name="VCWebServiceProxyGeneratorTool"
109 />
110 <Tool
111 Name="VCMIDLTool"
112 />
113 <Tool
114 Name="VCCLCompilerTool"
115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
118 BasicRuntimeChecks="3"
119 SmallerTypeCheck="true"
120 RuntimeLibrary="3"
121 WarningLevel="4"
122 DebugInformationFormat="3"
123 CompileAs="1"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLinkerTool"
136 LinkIncremental="1"
137 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
138 GenerateDebugInformation="true"
139 SubSystem="1"
140 OptimizeReferences="2"
141 EnableCOMDATFolding="2"
142 RandomizedBaseAddress="1"
143 DataExecutionPrevention="1"
144 TargetMachine="1"
145 />
146 <Tool
147 Name="VCALinkTool"
148 />
149 <Tool
150 Name="VCManifestTool"
151 />
152 <Tool
153 Name="VCXDCMakeTool"
154 />
155 <Tool
156 Name="VCBscMakeTool"
157 />
158 <Tool
159 Name="VCFxCopTool"
160 />
161 <Tool
162 Name="VCAppVerifierTool"
163 />
164 <Tool
165 Name="VCPostBuildEventTool"
166 />
167 </Configuration>
168 </Configurations>
169 <References>
170 </References>
171 <Files>
172 <Filter
173 Name="Source Files"
174 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176 >
177 <File
178 RelativePath="..\..\tests\esedb_test_index.c"
179 >
180 </File>
181 <File
182 RelativePath="..\..\tests\esedb_test_memory.c"
183 >
184 </File>
185 </Filter>
186 <Filter
187 Name="Header Files"
188 Filter="h;hpp;hxx;hm;inl;inc;xsd"
189 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
190 >
191 <File
192 RelativePath="..\..\tests\esedb_test_libcerror.h"
193 >
194 </File>
195 <File
196 RelativePath="..\..\tests\esedb_test_libesedb.h"
197 >
198 </File>
199 <File
200 RelativePath="..\..\tests\esedb_test_macros.h"
201 >
202 </File>
203 <File
204 RelativePath="..\..\tests\esedb_test_memory.h"
205 >
206 </File>
207 <File
208 RelativePath="..\..\tests\esedb_test_unused.h"
209 >
210 </File>
211 </Filter>
212 <Filter
213 Name="Resource Files"
214 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
215 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
216 >
217 </Filter>
218 </Files>
219 <Globals>
220 </Globals>
221 </VisualStudioProject>
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="esedb_test_io_handle"
5 ProjectGUID="{4514F4B8-9225-4C90-91ED-D65BB183BDEC}"
6 RootNamespace="esedb_test_io_handle"
7 Keyword="Win32Proj"
8 TargetFrameworkVersion="131072"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Release|Win32"
20 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="1"
23 CharacterSet="1"
24 WholeProgramOptimization="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
45 RuntimeLibrary="2"
46 WarningLevel="4"
47 CompileAs="1"
48 />
49 <Tool
50 Name="VCManagedResourceCompilerTool"
51 />
52 <Tool
53 Name="VCResourceCompilerTool"
54 />
55 <Tool
56 Name="VCPreLinkEventTool"
57 />
58 <Tool
59 Name="VCLinkerTool"
60 LinkIncremental="1"
61 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
62 SubSystem="1"
63 OptimizeReferences="2"
64 EnableCOMDATFolding="2"
65 RandomizedBaseAddress="2"
66 DataExecutionPrevention="2"
67 TargetMachine="1"
68 />
69 <Tool
70 Name="VCALinkTool"
71 />
72 <Tool
73 Name="VCManifestTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCAppVerifierTool"
86 />
87 <Tool
88 Name="VCPostBuildEventTool"
89 />
90 </Configuration>
91 <Configuration
92 Name="VSDebug|Win32"
93 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
94 IntermediateDirectory="$(ConfigurationName)"
95 ConfigurationType="1"
96 CharacterSet="1"
97 >
98 <Tool
99 Name="VCPreBuildEventTool"
100 />
101 <Tool
102 Name="VCCustomBuildTool"
103 />
104 <Tool
105 Name="VCXMLDataGeneratorTool"
106 />
107 <Tool
108 Name="VCWebServiceProxyGeneratorTool"
109 />
110 <Tool
111 Name="VCMIDLTool"
112 />
113 <Tool
114 Name="VCCLCompilerTool"
115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
118 BasicRuntimeChecks="3"
119 SmallerTypeCheck="true"
120 RuntimeLibrary="3"
121 WarningLevel="4"
122 DebugInformationFormat="3"
123 CompileAs="1"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLinkerTool"
136 LinkIncremental="1"
137 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
138 GenerateDebugInformation="true"
139 SubSystem="1"
140 OptimizeReferences="2"
141 EnableCOMDATFolding="2"
142 RandomizedBaseAddress="1"
143 DataExecutionPrevention="1"
144 TargetMachine="1"
145 />
146 <Tool
147 Name="VCALinkTool"
148 />
149 <Tool
150 Name="VCManifestTool"
151 />
152 <Tool
153 Name="VCXDCMakeTool"
154 />
155 <Tool
156 Name="VCBscMakeTool"
157 />
158 <Tool
159 Name="VCFxCopTool"
160 />
161 <Tool
162 Name="VCAppVerifierTool"
163 />
164 <Tool
165 Name="VCPostBuildEventTool"
166 />
167 </Configuration>
168 </Configurations>
169 <References>
170 </References>
171 <Files>
172 <Filter
173 Name="Source Files"
174 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176 >
177 <File
178 RelativePath="..\..\tests\esedb_test_io_handle.c"
179 >
180 </File>
181 <File
182 RelativePath="..\..\tests\esedb_test_memory.c"
183 >
184 </File>
185 </Filter>
186 <Filter
187 Name="Header Files"
188 Filter="h;hpp;hxx;hm;inl;inc;xsd"
189 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
190 >
191 <File
192 RelativePath="..\..\tests\esedb_test_libcerror.h"
193 >
194 </File>
195 <File
196 RelativePath="..\..\tests\esedb_test_libesedb.h"
197 >
198 </File>
199 <File
200 RelativePath="..\..\tests\esedb_test_macros.h"
201 >
202 </File>
203 <File
204 RelativePath="..\..\tests\esedb_test_memory.h"
205 >
206 </File>
207 <File
208 RelativePath="..\..\tests\esedb_test_unused.h"
209 >
210 </File>
211 </Filter>
212 <Filter
213 Name="Resource Files"
214 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
215 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
216 >
217 </Filter>
218 </Files>
219 <Globals>
220 </Globals>
221 </VisualStudioProject>
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="esedb_test_key"
5 ProjectGUID="{FF226CC0-063B-4420-B88F-DDBACF5CC50C}"
6 RootNamespace="esedb_test_key"
7 Keyword="Win32Proj"
8 TargetFrameworkVersion="131072"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Release|Win32"
20 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="1"
23 CharacterSet="1"
24 WholeProgramOptimization="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
45 RuntimeLibrary="2"
46 WarningLevel="4"
47 CompileAs="1"
48 />
49 <Tool
50 Name="VCManagedResourceCompilerTool"
51 />
52 <Tool
53 Name="VCResourceCompilerTool"
54 />
55 <Tool
56 Name="VCPreLinkEventTool"
57 />
58 <Tool
59 Name="VCLinkerTool"
60 LinkIncremental="1"
61 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
62 SubSystem="1"
63 OptimizeReferences="2"
64 EnableCOMDATFolding="2"
65 RandomizedBaseAddress="2"
66 DataExecutionPrevention="2"
67 TargetMachine="1"
68 />
69 <Tool
70 Name="VCALinkTool"
71 />
72 <Tool
73 Name="VCManifestTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCAppVerifierTool"
86 />
87 <Tool
88 Name="VCPostBuildEventTool"
89 />
90 </Configuration>
91 <Configuration
92 Name="VSDebug|Win32"
93 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
94 IntermediateDirectory="$(ConfigurationName)"
95 ConfigurationType="1"
96 CharacterSet="1"
97 >
98 <Tool
99 Name="VCPreBuildEventTool"
100 />
101 <Tool
102 Name="VCCustomBuildTool"
103 />
104 <Tool
105 Name="VCXMLDataGeneratorTool"
106 />
107 <Tool
108 Name="VCWebServiceProxyGeneratorTool"
109 />
110 <Tool
111 Name="VCMIDLTool"
112 />
113 <Tool
114 Name="VCCLCompilerTool"
115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
118 BasicRuntimeChecks="3"
119 SmallerTypeCheck="true"
120 RuntimeLibrary="3"
121 WarningLevel="4"
122 DebugInformationFormat="3"
123 CompileAs="1"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLinkerTool"
136 LinkIncremental="1"
137 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
138 GenerateDebugInformation="true"
139 SubSystem="1"
140 OptimizeReferences="2"
141 EnableCOMDATFolding="2"
142 RandomizedBaseAddress="1"
143 DataExecutionPrevention="1"
144 TargetMachine="1"
145 />
146 <Tool
147 Name="VCALinkTool"
148 />
149 <Tool
150 Name="VCManifestTool"
151 />
152 <Tool
153 Name="VCXDCMakeTool"
154 />
155 <Tool
156 Name="VCBscMakeTool"
157 />
158 <Tool
159 Name="VCFxCopTool"
160 />
161 <Tool
162 Name="VCAppVerifierTool"
163 />
164 <Tool
165 Name="VCPostBuildEventTool"
166 />
167 </Configuration>
168 </Configurations>
169 <References>
170 </References>
171 <Files>
172 <Filter
173 Name="Source Files"
174 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176 >
177 <File
178 RelativePath="..\..\tests\esedb_test_key.c"
179 >
180 </File>
181 <File
182 RelativePath="..\..\tests\esedb_test_memory.c"
183 >
184 </File>
185 </Filter>
186 <Filter
187 Name="Header Files"
188 Filter="h;hpp;hxx;hm;inl;inc;xsd"
189 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
190 >
191 <File
192 RelativePath="..\..\tests\esedb_test_libcerror.h"
193 >
194 </File>
195 <File
196 RelativePath="..\..\tests\esedb_test_libesedb.h"
197 >
198 </File>
199 <File
200 RelativePath="..\..\tests\esedb_test_libfdata.h"
201 >
202 </File>
203 <File
204 RelativePath="..\..\tests\esedb_test_macros.h"
205 >
206 </File>
207 <File
208 RelativePath="..\..\tests\esedb_test_memory.h"
209 >
210 </File>
211 <File
212 RelativePath="..\..\tests\esedb_test_unused.h"
213 >
214 </File>
215 </Filter>
216 <Filter
217 Name="Resource Files"
218 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
219 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
220 >
221 </Filter>
222 </Files>
223 <Globals>
224 </Globals>
225 </VisualStudioProject>
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="esedb_test_long_value"
5 ProjectGUID="{609F3B7C-7754-487E-87E7-D19276604C3B}"
6 RootNamespace="esedb_test_long_value"
7 Keyword="Win32Proj"
8 TargetFrameworkVersion="131072"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Release|Win32"
20 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="1"
23 CharacterSet="1"
24 WholeProgramOptimization="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
45 RuntimeLibrary="2"
46 WarningLevel="4"
47 CompileAs="1"
48 />
49 <Tool
50 Name="VCManagedResourceCompilerTool"
51 />
52 <Tool
53 Name="VCResourceCompilerTool"
54 />
55 <Tool
56 Name="VCPreLinkEventTool"
57 />
58 <Tool
59 Name="VCLinkerTool"
60 LinkIncremental="1"
61 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
62 SubSystem="1"
63 OptimizeReferences="2"
64 EnableCOMDATFolding="2"
65 RandomizedBaseAddress="2"
66 DataExecutionPrevention="2"
67 TargetMachine="1"
68 />
69 <Tool
70 Name="VCALinkTool"
71 />
72 <Tool
73 Name="VCManifestTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCAppVerifierTool"
86 />
87 <Tool
88 Name="VCPostBuildEventTool"
89 />
90 </Configuration>
91 <Configuration
92 Name="VSDebug|Win32"
93 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
94 IntermediateDirectory="$(ConfigurationName)"
95 ConfigurationType="1"
96 CharacterSet="1"
97 >
98 <Tool
99 Name="VCPreBuildEventTool"
100 />
101 <Tool
102 Name="VCCustomBuildTool"
103 />
104 <Tool
105 Name="VCXMLDataGeneratorTool"
106 />
107 <Tool
108 Name="VCWebServiceProxyGeneratorTool"
109 />
110 <Tool
111 Name="VCMIDLTool"
112 />
113 <Tool
114 Name="VCCLCompilerTool"
115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
118 BasicRuntimeChecks="3"
119 SmallerTypeCheck="true"
120 RuntimeLibrary="3"
121 WarningLevel="4"
122 DebugInformationFormat="3"
123 CompileAs="1"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLinkerTool"
136 LinkIncremental="1"
137 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
138 GenerateDebugInformation="true"
139 SubSystem="1"
140 OptimizeReferences="2"
141 EnableCOMDATFolding="2"
142 RandomizedBaseAddress="1"
143 DataExecutionPrevention="1"
144 TargetMachine="1"
145 />
146 <Tool
147 Name="VCALinkTool"
148 />
149 <Tool
150 Name="VCManifestTool"
151 />
152 <Tool
153 Name="VCXDCMakeTool"
154 />
155 <Tool
156 Name="VCBscMakeTool"
157 />
158 <Tool
159 Name="VCFxCopTool"
160 />
161 <Tool
162 Name="VCAppVerifierTool"
163 />
164 <Tool
165 Name="VCPostBuildEventTool"
166 />
167 </Configuration>
168 </Configurations>
169 <References>
170 </References>
171 <Files>
172 <Filter
173 Name="Source Files"
174 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176 >
177 <File
178 RelativePath="..\..\tests\esedb_test_long_value.c"
179 >
180 </File>
181 <File
182 RelativePath="..\..\tests\esedb_test_memory.c"
183 >
184 </File>
185 </Filter>
186 <Filter
187 Name="Header Files"
188 Filter="h;hpp;hxx;hm;inl;inc;xsd"
189 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
190 >
191 <File
192 RelativePath="..\..\tests\esedb_test_libcerror.h"
193 >
194 </File>
195 <File
196 RelativePath="..\..\tests\esedb_test_libesedb.h"
197 >
198 </File>
199 <File
200 RelativePath="..\..\tests\esedb_test_macros.h"
201 >
202 </File>
203 <File
204 RelativePath="..\..\tests\esedb_test_memory.h"
205 >
206 </File>
207 <File
208 RelativePath="..\..\tests\esedb_test_unused.h"
209 >
210 </File>
211 </Filter>
212 <Filter
213 Name="Resource Files"
214 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
215 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
216 >
217 </Filter>
218 </Files>
219 <Globals>
220 </Globals>
221 </VisualStudioProject>
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="esedb_test_multi_value"
5 ProjectGUID="{B6D2D5C7-4896-4FDE-931E-AE33556252CB}"
6 RootNamespace="esedb_test_multi_value"
7 Keyword="Win32Proj"
8 TargetFrameworkVersion="131072"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Release|Win32"
20 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="1"
23 CharacterSet="1"
24 WholeProgramOptimization="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
45 RuntimeLibrary="2"
46 WarningLevel="4"
47 CompileAs="1"
48 />
49 <Tool
50 Name="VCManagedResourceCompilerTool"
51 />
52 <Tool
53 Name="VCResourceCompilerTool"
54 />
55 <Tool
56 Name="VCPreLinkEventTool"
57 />
58 <Tool
59 Name="VCLinkerTool"
60 LinkIncremental="1"
61 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
62 SubSystem="1"
63 OptimizeReferences="2"
64 EnableCOMDATFolding="2"
65 RandomizedBaseAddress="2"
66 DataExecutionPrevention="2"
67 TargetMachine="1"
68 />
69 <Tool
70 Name="VCALinkTool"
71 />
72 <Tool
73 Name="VCManifestTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCAppVerifierTool"
86 />
87 <Tool
88 Name="VCPostBuildEventTool"
89 />
90 </Configuration>
91 <Configuration
92 Name="VSDebug|Win32"
93 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
94 IntermediateDirectory="$(ConfigurationName)"
95 ConfigurationType="1"
96 CharacterSet="1"
97 >
98 <Tool
99 Name="VCPreBuildEventTool"
100 />
101 <Tool
102 Name="VCCustomBuildTool"
103 />
104 <Tool
105 Name="VCXMLDataGeneratorTool"
106 />
107 <Tool
108 Name="VCWebServiceProxyGeneratorTool"
109 />
110 <Tool
111 Name="VCMIDLTool"
112 />
113 <Tool
114 Name="VCCLCompilerTool"
115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
118 BasicRuntimeChecks="3"
119 SmallerTypeCheck="true"
120 RuntimeLibrary="3"
121 WarningLevel="4"
122 DebugInformationFormat="3"
123 CompileAs="1"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLinkerTool"
136 LinkIncremental="1"
137 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
138 GenerateDebugInformation="true"
139 SubSystem="1"
140 OptimizeReferences="2"
141 EnableCOMDATFolding="2"
142 RandomizedBaseAddress="1"
143 DataExecutionPrevention="1"
144 TargetMachine="1"
145 />
146 <Tool
147 Name="VCALinkTool"
148 />
149 <Tool
150 Name="VCManifestTool"
151 />
152 <Tool
153 Name="VCXDCMakeTool"
154 />
155 <Tool
156 Name="VCBscMakeTool"
157 />
158 <Tool
159 Name="VCFxCopTool"
160 />
161 <Tool
162 Name="VCAppVerifierTool"
163 />
164 <Tool
165 Name="VCPostBuildEventTool"
166 />
167 </Configuration>
168 </Configurations>
169 <References>
170 </References>
171 <Files>
172 <Filter
173 Name="Source Files"
174 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176 >
177 <File
178 RelativePath="..\..\tests\esedb_test_memory.c"
179 >
180 </File>
181 <File
182 RelativePath="..\..\tests\esedb_test_multi_value.c"
183 >
184 </File>
185 </Filter>
186 <Filter
187 Name="Header Files"
188 Filter="h;hpp;hxx;hm;inl;inc;xsd"
189 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
190 >
191 <File
192 RelativePath="..\..\tests\esedb_test_libcerror.h"
193 >
194 </File>
195 <File
196 RelativePath="..\..\tests\esedb_test_libesedb.h"
197 >
198 </File>
199 <File
200 RelativePath="..\..\tests\esedb_test_macros.h"
201 >
202 </File>
203 <File
204 RelativePath="..\..\tests\esedb_test_memory.h"
205 >
206 </File>
207 <File
208 RelativePath="..\..\tests\esedb_test_unused.h"
209 >
210 </File>
211 </Filter>
212 <Filter
213 Name="Resource Files"
214 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
215 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
216 >
217 </Filter>
218 </Files>
219 <Globals>
220 </Globals>
221 </VisualStudioProject>
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="esedb_test_notify"
5 ProjectGUID="{677D81DB-C708-4BB4-87C3-8EC3A85C1260}"
6 RootNamespace="esedb_test_notify"
7 Keyword="Win32Proj"
8 TargetFrameworkVersion="131072"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Release|Win32"
20 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="1"
23 CharacterSet="1"
24 WholeProgramOptimization="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
45 RuntimeLibrary="2"
46 WarningLevel="4"
47 CompileAs="1"
48 />
49 <Tool
50 Name="VCManagedResourceCompilerTool"
51 />
52 <Tool
53 Name="VCResourceCompilerTool"
54 />
55 <Tool
56 Name="VCPreLinkEventTool"
57 />
58 <Tool
59 Name="VCLinkerTool"
60 LinkIncremental="1"
61 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
62 SubSystem="1"
63 OptimizeReferences="2"
64 EnableCOMDATFolding="2"
65 RandomizedBaseAddress="2"
66 DataExecutionPrevention="2"
67 TargetMachine="1"
68 />
69 <Tool
70 Name="VCALinkTool"
71 />
72 <Tool
73 Name="VCManifestTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCAppVerifierTool"
86 />
87 <Tool
88 Name="VCPostBuildEventTool"
89 />
90 </Configuration>
91 <Configuration
92 Name="VSDebug|Win32"
93 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
94 IntermediateDirectory="$(ConfigurationName)"
95 ConfigurationType="1"
96 CharacterSet="1"
97 >
98 <Tool
99 Name="VCPreBuildEventTool"
100 />
101 <Tool
102 Name="VCCustomBuildTool"
103 />
104 <Tool
105 Name="VCXMLDataGeneratorTool"
106 />
107 <Tool
108 Name="VCWebServiceProxyGeneratorTool"
109 />
110 <Tool
111 Name="VCMIDLTool"
112 />
113 <Tool
114 Name="VCCLCompilerTool"
115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
118 BasicRuntimeChecks="3"
119 SmallerTypeCheck="true"
120 RuntimeLibrary="3"
121 WarningLevel="4"
122 DebugInformationFormat="3"
123 CompileAs="1"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLinkerTool"
136 LinkIncremental="1"
137 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
138 GenerateDebugInformation="true"
139 SubSystem="1"
140 OptimizeReferences="2"
141 EnableCOMDATFolding="2"
142 RandomizedBaseAddress="1"
143 DataExecutionPrevention="1"
144 TargetMachine="1"
145 />
146 <Tool
147 Name="VCALinkTool"
148 />
149 <Tool
150 Name="VCManifestTool"
151 />
152 <Tool
153 Name="VCXDCMakeTool"
154 />
155 <Tool
156 Name="VCBscMakeTool"
157 />
158 <Tool
159 Name="VCFxCopTool"
160 />
161 <Tool
162 Name="VCAppVerifierTool"
163 />
164 <Tool
165 Name="VCPostBuildEventTool"
166 />
167 </Configuration>
168 </Configurations>
169 <References>
170 </References>
171 <Files>
172 <Filter
173 Name="Source Files"
174 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176 >
177 <File
178 RelativePath="..\..\tests\esedb_test_notify.c"
179 >
180 </File>
181 </Filter>
182 <Filter
183 Name="Header Files"
184 Filter="h;hpp;hxx;hm;inl;inc;xsd"
185 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
186 >
187 <File
188 RelativePath="..\..\tests\esedb_test_libesedb.h"
189 >
190 </File>
191 <File
192 RelativePath="..\..\tests\esedb_test_macros.h"
193 >
194 </File>
195 <File
196 RelativePath="..\..\tests\esedb_test_unused.h"
197 >
198 </File>
199 </Filter>
200 <Filter
201 Name="Resource Files"
202 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
203 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
204 >
205 </Filter>
206 </Files>
207 <Globals>
208 </Globals>
209 </VisualStudioProject>
+0
-214
msvscpp/esedb_test_open_close/esedb_test_open_close.vcproj less more
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="esedb_test_open_close"
5 ProjectGUID="{C2F3DEDB-B92F-48B0-A3C4-15CE131D40FB}"
6 RootNamespace="esedb_test_open_close"
7 Keyword="Win32Proj"
8 TargetFrameworkVersion="131072"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Release|Win32"
20 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="1"
23 CharacterSet="1"
24 WholeProgramOptimization="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libcsystem"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBCSYSTEM;LIBESEDB_DLL_IMPORT"
45 RuntimeLibrary="2"
46 WarningLevel="4"
47 CompileAs="1"
48 />
49 <Tool
50 Name="VCManagedResourceCompilerTool"
51 />
52 <Tool
53 Name="VCResourceCompilerTool"
54 />
55 <Tool
56 Name="VCPreLinkEventTool"
57 />
58 <Tool
59 Name="VCLinkerTool"
60 LinkIncremental="1"
61 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
62 SubSystem="1"
63 OptimizeReferences="2"
64 EnableCOMDATFolding="2"
65 RandomizedBaseAddress="2"
66 DataExecutionPrevention="2"
67 TargetMachine="1"
68 />
69 <Tool
70 Name="VCALinkTool"
71 />
72 <Tool
73 Name="VCManifestTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCAppVerifierTool"
86 />
87 <Tool
88 Name="VCPostBuildEventTool"
89 />
90 </Configuration>
91 <Configuration
92 Name="VSDebug|Win32"
93 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
94 IntermediateDirectory="$(ConfigurationName)"
95 ConfigurationType="1"
96 CharacterSet="1"
97 >
98 <Tool
99 Name="VCPreBuildEventTool"
100 />
101 <Tool
102 Name="VCCustomBuildTool"
103 />
104 <Tool
105 Name="VCXMLDataGeneratorTool"
106 />
107 <Tool
108 Name="VCWebServiceProxyGeneratorTool"
109 />
110 <Tool
111 Name="VCMIDLTool"
112 />
113 <Tool
114 Name="VCCLCompilerTool"
115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libcsystem"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBCSYSTEM;LIBESEDB_DLL_IMPORT"
118 BasicRuntimeChecks="3"
119 SmallerTypeCheck="true"
120 RuntimeLibrary="3"
121 WarningLevel="4"
122 DebugInformationFormat="3"
123 CompileAs="1"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLinkerTool"
136 LinkIncremental="1"
137 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
138 GenerateDebugInformation="true"
139 SubSystem="1"
140 OptimizeReferences="2"
141 EnableCOMDATFolding="2"
142 RandomizedBaseAddress="1"
143 DataExecutionPrevention="1"
144 TargetMachine="1"
145 />
146 <Tool
147 Name="VCALinkTool"
148 />
149 <Tool
150 Name="VCManifestTool"
151 />
152 <Tool
153 Name="VCXDCMakeTool"
154 />
155 <Tool
156 Name="VCBscMakeTool"
157 />
158 <Tool
159 Name="VCFxCopTool"
160 />
161 <Tool
162 Name="VCAppVerifierTool"
163 />
164 <Tool
165 Name="VCPostBuildEventTool"
166 />
167 </Configuration>
168 </Configurations>
169 <References>
170 </References>
171 <Files>
172 <Filter
173 Name="Source Files"
174 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176 >
177 <File
178 RelativePath="..\..\tests\esedb_test_open_close.c"
179 >
180 </File>
181 </Filter>
182 <Filter
183 Name="Header Files"
184 Filter="h;hpp;hxx;hm;inl;inc;xsd"
185 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
186 >
187 <File
188 RelativePath="..\..\tests\esedb_test_libcerror.h"
189 >
190 </File>
191 <File
192 RelativePath="..\..\tests\esedb_test_libcstring.h"
193 >
194 </File>
195 <File
196 RelativePath="..\..\tests\esedb_test_libcsystem.h"
197 >
198 </File>
199 <File
200 RelativePath="..\..\tests\esedb_test_libesedb.h"
201 >
202 </File>
203 </Filter>
204 <Filter
205 Name="Resource Files"
206 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
207 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
208 >
209 </Filter>
210 </Files>
211 <Globals>
212 </Globals>
213 </VisualStudioProject>
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="esedb_test_page"
5 ProjectGUID="{8161CE83-108A-4863-9B51-8F1DF5B5276B}"
6 RootNamespace="esedb_test_page"
7 Keyword="Win32Proj"
8 TargetFrameworkVersion="131072"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Release|Win32"
20 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="1"
23 CharacterSet="1"
24 WholeProgramOptimization="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
45 RuntimeLibrary="2"
46 WarningLevel="4"
47 CompileAs="1"
48 />
49 <Tool
50 Name="VCManagedResourceCompilerTool"
51 />
52 <Tool
53 Name="VCResourceCompilerTool"
54 />
55 <Tool
56 Name="VCPreLinkEventTool"
57 />
58 <Tool
59 Name="VCLinkerTool"
60 LinkIncremental="1"
61 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
62 SubSystem="1"
63 OptimizeReferences="2"
64 EnableCOMDATFolding="2"
65 RandomizedBaseAddress="2"
66 DataExecutionPrevention="2"
67 TargetMachine="1"
68 />
69 <Tool
70 Name="VCALinkTool"
71 />
72 <Tool
73 Name="VCManifestTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCAppVerifierTool"
86 />
87 <Tool
88 Name="VCPostBuildEventTool"
89 />
90 </Configuration>
91 <Configuration
92 Name="VSDebug|Win32"
93 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
94 IntermediateDirectory="$(ConfigurationName)"
95 ConfigurationType="1"
96 CharacterSet="1"
97 >
98 <Tool
99 Name="VCPreBuildEventTool"
100 />
101 <Tool
102 Name="VCCustomBuildTool"
103 />
104 <Tool
105 Name="VCXMLDataGeneratorTool"
106 />
107 <Tool
108 Name="VCWebServiceProxyGeneratorTool"
109 />
110 <Tool
111 Name="VCMIDLTool"
112 />
113 <Tool
114 Name="VCCLCompilerTool"
115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
118 BasicRuntimeChecks="3"
119 SmallerTypeCheck="true"
120 RuntimeLibrary="3"
121 WarningLevel="4"
122 DebugInformationFormat="3"
123 CompileAs="1"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLinkerTool"
136 LinkIncremental="1"
137 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
138 GenerateDebugInformation="true"
139 SubSystem="1"
140 OptimizeReferences="2"
141 EnableCOMDATFolding="2"
142 RandomizedBaseAddress="1"
143 DataExecutionPrevention="1"
144 TargetMachine="1"
145 />
146 <Tool
147 Name="VCALinkTool"
148 />
149 <Tool
150 Name="VCManifestTool"
151 />
152 <Tool
153 Name="VCXDCMakeTool"
154 />
155 <Tool
156 Name="VCBscMakeTool"
157 />
158 <Tool
159 Name="VCFxCopTool"
160 />
161 <Tool
162 Name="VCAppVerifierTool"
163 />
164 <Tool
165 Name="VCPostBuildEventTool"
166 />
167 </Configuration>
168 </Configurations>
169 <References>
170 </References>
171 <Files>
172 <Filter
173 Name="Source Files"
174 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176 >
177 <File
178 RelativePath="..\..\tests\esedb_test_memory.c"
179 >
180 </File>
181 <File
182 RelativePath="..\..\tests\esedb_test_page.c"
183 >
184 </File>
185 </Filter>
186 <Filter
187 Name="Header Files"
188 Filter="h;hpp;hxx;hm;inl;inc;xsd"
189 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
190 >
191 <File
192 RelativePath="..\..\tests\esedb_test_libcerror.h"
193 >
194 </File>
195 <File
196 RelativePath="..\..\tests\esedb_test_libesedb.h"
197 >
198 </File>
199 <File
200 RelativePath="..\..\tests\esedb_test_macros.h"
201 >
202 </File>
203 <File
204 RelativePath="..\..\tests\esedb_test_memory.h"
205 >
206 </File>
207 <File
208 RelativePath="..\..\tests\esedb_test_unused.h"
209 >
210 </File>
211 </Filter>
212 <Filter
213 Name="Resource Files"
214 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
215 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
216 >
217 </Filter>
218 </Files>
219 <Globals>
220 </Globals>
221 </VisualStudioProject>
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="esedb_test_page_tree"
5 ProjectGUID="{41748683-3F34-4770-98C5-F80103B0067A}"
6 RootNamespace="esedb_test_page_tree"
7 Keyword="Win32Proj"
8 TargetFrameworkVersion="131072"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Release|Win32"
20 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="1"
23 CharacterSet="1"
24 WholeProgramOptimization="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
45 RuntimeLibrary="2"
46 WarningLevel="4"
47 CompileAs="1"
48 />
49 <Tool
50 Name="VCManagedResourceCompilerTool"
51 />
52 <Tool
53 Name="VCResourceCompilerTool"
54 />
55 <Tool
56 Name="VCPreLinkEventTool"
57 />
58 <Tool
59 Name="VCLinkerTool"
60 LinkIncremental="1"
61 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
62 SubSystem="1"
63 OptimizeReferences="2"
64 EnableCOMDATFolding="2"
65 RandomizedBaseAddress="2"
66 DataExecutionPrevention="2"
67 TargetMachine="1"
68 />
69 <Tool
70 Name="VCALinkTool"
71 />
72 <Tool
73 Name="VCManifestTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCAppVerifierTool"
86 />
87 <Tool
88 Name="VCPostBuildEventTool"
89 />
90 </Configuration>
91 <Configuration
92 Name="VSDebug|Win32"
93 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
94 IntermediateDirectory="$(ConfigurationName)"
95 ConfigurationType="1"
96 CharacterSet="1"
97 >
98 <Tool
99 Name="VCPreBuildEventTool"
100 />
101 <Tool
102 Name="VCCustomBuildTool"
103 />
104 <Tool
105 Name="VCXMLDataGeneratorTool"
106 />
107 <Tool
108 Name="VCWebServiceProxyGeneratorTool"
109 />
110 <Tool
111 Name="VCMIDLTool"
112 />
113 <Tool
114 Name="VCCLCompilerTool"
115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
118 BasicRuntimeChecks="3"
119 SmallerTypeCheck="true"
120 RuntimeLibrary="3"
121 WarningLevel="4"
122 DebugInformationFormat="3"
123 CompileAs="1"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLinkerTool"
136 LinkIncremental="1"
137 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
138 GenerateDebugInformation="true"
139 SubSystem="1"
140 OptimizeReferences="2"
141 EnableCOMDATFolding="2"
142 RandomizedBaseAddress="1"
143 DataExecutionPrevention="1"
144 TargetMachine="1"
145 />
146 <Tool
147 Name="VCALinkTool"
148 />
149 <Tool
150 Name="VCManifestTool"
151 />
152 <Tool
153 Name="VCXDCMakeTool"
154 />
155 <Tool
156 Name="VCBscMakeTool"
157 />
158 <Tool
159 Name="VCFxCopTool"
160 />
161 <Tool
162 Name="VCAppVerifierTool"
163 />
164 <Tool
165 Name="VCPostBuildEventTool"
166 />
167 </Configuration>
168 </Configurations>
169 <References>
170 </References>
171 <Files>
172 <Filter
173 Name="Source Files"
174 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176 >
177 <File
178 RelativePath="..\..\tests\esedb_test_memory.c"
179 >
180 </File>
181 <File
182 RelativePath="..\..\tests\esedb_test_page_tree.c"
183 >
184 </File>
185 </Filter>
186 <Filter
187 Name="Header Files"
188 Filter="h;hpp;hxx;hm;inl;inc;xsd"
189 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
190 >
191 <File
192 RelativePath="..\..\tests\esedb_test_libcerror.h"
193 >
194 </File>
195 <File
196 RelativePath="..\..\tests\esedb_test_libesedb.h"
197 >
198 </File>
199 <File
200 RelativePath="..\..\tests\esedb_test_macros.h"
201 >
202 </File>
203 <File
204 RelativePath="..\..\tests\esedb_test_memory.h"
205 >
206 </File>
207 <File
208 RelativePath="..\..\tests\esedb_test_unused.h"
209 >
210 </File>
211 </Filter>
212 <Filter
213 Name="Resource Files"
214 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
215 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
216 >
217 </Filter>
218 </Files>
219 <Globals>
220 </Globals>
221 </VisualStudioProject>
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="esedb_test_page_value"
5 ProjectGUID="{67A27024-4941-4F10-BB98-F0E43625FE9B}"
6 RootNamespace="esedb_test_page_value"
7 Keyword="Win32Proj"
8 TargetFrameworkVersion="131072"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Release|Win32"
20 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="1"
23 CharacterSet="1"
24 WholeProgramOptimization="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
45 RuntimeLibrary="2"
46 WarningLevel="4"
47 CompileAs="1"
48 />
49 <Tool
50 Name="VCManagedResourceCompilerTool"
51 />
52 <Tool
53 Name="VCResourceCompilerTool"
54 />
55 <Tool
56 Name="VCPreLinkEventTool"
57 />
58 <Tool
59 Name="VCLinkerTool"
60 LinkIncremental="1"
61 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
62 SubSystem="1"
63 OptimizeReferences="2"
64 EnableCOMDATFolding="2"
65 RandomizedBaseAddress="2"
66 DataExecutionPrevention="2"
67 TargetMachine="1"
68 />
69 <Tool
70 Name="VCALinkTool"
71 />
72 <Tool
73 Name="VCManifestTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCAppVerifierTool"
86 />
87 <Tool
88 Name="VCPostBuildEventTool"
89 />
90 </Configuration>
91 <Configuration
92 Name="VSDebug|Win32"
93 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
94 IntermediateDirectory="$(ConfigurationName)"
95 ConfigurationType="1"
96 CharacterSet="1"
97 >
98 <Tool
99 Name="VCPreBuildEventTool"
100 />
101 <Tool
102 Name="VCCustomBuildTool"
103 />
104 <Tool
105 Name="VCXMLDataGeneratorTool"
106 />
107 <Tool
108 Name="VCWebServiceProxyGeneratorTool"
109 />
110 <Tool
111 Name="VCMIDLTool"
112 />
113 <Tool
114 Name="VCCLCompilerTool"
115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
118 BasicRuntimeChecks="3"
119 SmallerTypeCheck="true"
120 RuntimeLibrary="3"
121 WarningLevel="4"
122 DebugInformationFormat="3"
123 CompileAs="1"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLinkerTool"
136 LinkIncremental="1"
137 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
138 GenerateDebugInformation="true"
139 SubSystem="1"
140 OptimizeReferences="2"
141 EnableCOMDATFolding="2"
142 RandomizedBaseAddress="1"
143 DataExecutionPrevention="1"
144 TargetMachine="1"
145 />
146 <Tool
147 Name="VCALinkTool"
148 />
149 <Tool
150 Name="VCManifestTool"
151 />
152 <Tool
153 Name="VCXDCMakeTool"
154 />
155 <Tool
156 Name="VCBscMakeTool"
157 />
158 <Tool
159 Name="VCFxCopTool"
160 />
161 <Tool
162 Name="VCAppVerifierTool"
163 />
164 <Tool
165 Name="VCPostBuildEventTool"
166 />
167 </Configuration>
168 </Configurations>
169 <References>
170 </References>
171 <Files>
172 <Filter
173 Name="Source Files"
174 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176 >
177 <File
178 RelativePath="..\..\tests\esedb_test_memory.c"
179 >
180 </File>
181 <File
182 RelativePath="..\..\tests\esedb_test_page_value.c"
183 >
184 </File>
185 </Filter>
186 <Filter
187 Name="Header Files"
188 Filter="h;hpp;hxx;hm;inl;inc;xsd"
189 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
190 >
191 <File
192 RelativePath="..\..\tests\esedb_test_libcerror.h"
193 >
194 </File>
195 <File
196 RelativePath="..\..\tests\esedb_test_libesedb.h"
197 >
198 </File>
199 <File
200 RelativePath="..\..\tests\esedb_test_macros.h"
201 >
202 </File>
203 <File
204 RelativePath="..\..\tests\esedb_test_memory.h"
205 >
206 </File>
207 <File
208 RelativePath="..\..\tests\esedb_test_unused.h"
209 >
210 </File>
211 </Filter>
212 <Filter
213 Name="Resource Files"
214 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
215 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
216 >
217 </Filter>
218 </Files>
219 <Globals>
220 </Globals>
221 </VisualStudioProject>
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="esedb_test_record"
5 ProjectGUID="{CF349A24-505E-4CE5-A4FC-90AEDC3C7E70}"
6 RootNamespace="esedb_test_record"
7 Keyword="Win32Proj"
8 TargetFrameworkVersion="131072"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Release|Win32"
20 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="1"
23 CharacterSet="1"
24 WholeProgramOptimization="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
45 RuntimeLibrary="2"
46 WarningLevel="4"
47 CompileAs="1"
48 />
49 <Tool
50 Name="VCManagedResourceCompilerTool"
51 />
52 <Tool
53 Name="VCResourceCompilerTool"
54 />
55 <Tool
56 Name="VCPreLinkEventTool"
57 />
58 <Tool
59 Name="VCLinkerTool"
60 LinkIncremental="1"
61 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
62 SubSystem="1"
63 OptimizeReferences="2"
64 EnableCOMDATFolding="2"
65 RandomizedBaseAddress="2"
66 DataExecutionPrevention="2"
67 TargetMachine="1"
68 />
69 <Tool
70 Name="VCALinkTool"
71 />
72 <Tool
73 Name="VCManifestTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCAppVerifierTool"
86 />
87 <Tool
88 Name="VCPostBuildEventTool"
89 />
90 </Configuration>
91 <Configuration
92 Name="VSDebug|Win32"
93 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
94 IntermediateDirectory="$(ConfigurationName)"
95 ConfigurationType="1"
96 CharacterSet="1"
97 >
98 <Tool
99 Name="VCPreBuildEventTool"
100 />
101 <Tool
102 Name="VCCustomBuildTool"
103 />
104 <Tool
105 Name="VCXMLDataGeneratorTool"
106 />
107 <Tool
108 Name="VCWebServiceProxyGeneratorTool"
109 />
110 <Tool
111 Name="VCMIDLTool"
112 />
113 <Tool
114 Name="VCCLCompilerTool"
115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
118 BasicRuntimeChecks="3"
119 SmallerTypeCheck="true"
120 RuntimeLibrary="3"
121 WarningLevel="4"
122 DebugInformationFormat="3"
123 CompileAs="1"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLinkerTool"
136 LinkIncremental="1"
137 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
138 GenerateDebugInformation="true"
139 SubSystem="1"
140 OptimizeReferences="2"
141 EnableCOMDATFolding="2"
142 RandomizedBaseAddress="1"
143 DataExecutionPrevention="1"
144 TargetMachine="1"
145 />
146 <Tool
147 Name="VCALinkTool"
148 />
149 <Tool
150 Name="VCManifestTool"
151 />
152 <Tool
153 Name="VCXDCMakeTool"
154 />
155 <Tool
156 Name="VCBscMakeTool"
157 />
158 <Tool
159 Name="VCFxCopTool"
160 />
161 <Tool
162 Name="VCAppVerifierTool"
163 />
164 <Tool
165 Name="VCPostBuildEventTool"
166 />
167 </Configuration>
168 </Configurations>
169 <References>
170 </References>
171 <Files>
172 <Filter
173 Name="Source Files"
174 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176 >
177 <File
178 RelativePath="..\..\tests\esedb_test_memory.c"
179 >
180 </File>
181 <File
182 RelativePath="..\..\tests\esedb_test_record.c"
183 >
184 </File>
185 </Filter>
186 <Filter
187 Name="Header Files"
188 Filter="h;hpp;hxx;hm;inl;inc;xsd"
189 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
190 >
191 <File
192 RelativePath="..\..\tests\esedb_test_libcerror.h"
193 >
194 </File>
195 <File
196 RelativePath="..\..\tests\esedb_test_libesedb.h"
197 >
198 </File>
199 <File
200 RelativePath="..\..\tests\esedb_test_macros.h"
201 >
202 </File>
203 <File
204 RelativePath="..\..\tests\esedb_test_memory.h"
205 >
206 </File>
207 <File
208 RelativePath="..\..\tests\esedb_test_unused.h"
209 >
210 </File>
211 </Filter>
212 <Filter
213 Name="Resource Files"
214 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
215 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
216 >
217 </Filter>
218 </Files>
219 <Globals>
220 </Globals>
221 </VisualStudioProject>
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="esedb_test_support"
5 ProjectGUID="{22390A91-D782-4F25-B2BC-7C2EEF5EA6B0}"
6 RootNamespace="esedb_test_support"
7 Keyword="Win32Proj"
8 TargetFrameworkVersion="131072"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Release|Win32"
20 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="1"
23 CharacterSet="1"
24 WholeProgramOptimization="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
45 RuntimeLibrary="2"
46 WarningLevel="4"
47 CompileAs="1"
48 />
49 <Tool
50 Name="VCManagedResourceCompilerTool"
51 />
52 <Tool
53 Name="VCResourceCompilerTool"
54 />
55 <Tool
56 Name="VCPreLinkEventTool"
57 />
58 <Tool
59 Name="VCLinkerTool"
60 LinkIncremental="1"
61 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
62 SubSystem="1"
63 OptimizeReferences="2"
64 EnableCOMDATFolding="2"
65 RandomizedBaseAddress="2"
66 DataExecutionPrevention="2"
67 TargetMachine="1"
68 />
69 <Tool
70 Name="VCALinkTool"
71 />
72 <Tool
73 Name="VCManifestTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCAppVerifierTool"
86 />
87 <Tool
88 Name="VCPostBuildEventTool"
89 />
90 </Configuration>
91 <Configuration
92 Name="VSDebug|Win32"
93 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
94 IntermediateDirectory="$(ConfigurationName)"
95 ConfigurationType="1"
96 CharacterSet="1"
97 >
98 <Tool
99 Name="VCPreBuildEventTool"
100 />
101 <Tool
102 Name="VCCustomBuildTool"
103 />
104 <Tool
105 Name="VCXMLDataGeneratorTool"
106 />
107 <Tool
108 Name="VCWebServiceProxyGeneratorTool"
109 />
110 <Tool
111 Name="VCMIDLTool"
112 />
113 <Tool
114 Name="VCCLCompilerTool"
115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
118 BasicRuntimeChecks="3"
119 SmallerTypeCheck="true"
120 RuntimeLibrary="3"
121 WarningLevel="4"
122 DebugInformationFormat="3"
123 CompileAs="1"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLinkerTool"
136 LinkIncremental="1"
137 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
138 GenerateDebugInformation="true"
139 SubSystem="1"
140 OptimizeReferences="2"
141 EnableCOMDATFolding="2"
142 RandomizedBaseAddress="1"
143 DataExecutionPrevention="1"
144 TargetMachine="1"
145 />
146 <Tool
147 Name="VCALinkTool"
148 />
149 <Tool
150 Name="VCManifestTool"
151 />
152 <Tool
153 Name="VCXDCMakeTool"
154 />
155 <Tool
156 Name="VCBscMakeTool"
157 />
158 <Tool
159 Name="VCFxCopTool"
160 />
161 <Tool
162 Name="VCAppVerifierTool"
163 />
164 <Tool
165 Name="VCPostBuildEventTool"
166 />
167 </Configuration>
168 </Configurations>
169 <References>
170 </References>
171 <Files>
172 <Filter
173 Name="Source Files"
174 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176 >
177 <File
178 RelativePath="..\..\tests\esedb_test_getopt.c"
179 >
180 </File>
181 <File
182 RelativePath="..\..\tests\esedb_test_support.c"
183 >
184 </File>
185 </Filter>
186 <Filter
187 Name="Header Files"
188 Filter="h;hpp;hxx;hm;inl;inc;xsd"
189 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
190 >
191 <File
192 RelativePath="..\..\tests\esedb_test_getopt.h"
193 >
194 </File>
195 <File
196 RelativePath="..\..\tests\esedb_test_libbfio.h"
197 >
198 </File>
199 <File
200 RelativePath="..\..\tests\esedb_test_libcerror.h"
201 >
202 </File>
203 <File
204 RelativePath="..\..\tests\esedb_test_libclocale.h"
205 >
206 </File>
207 <File
208 RelativePath="..\..\tests\esedb_test_libcnotify.h"
209 >
210 </File>
211 <File
212 RelativePath="..\..\tests\esedb_test_libesedb.h"
213 >
214 </File>
215 <File
216 RelativePath="..\..\tests\esedb_test_libuna.h"
217 >
218 </File>
219 <File
220 RelativePath="..\..\tests\esedb_test_macros.h"
221 >
222 </File>
223 </Filter>
224 <Filter
225 Name="Resource Files"
226 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
227 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
228 >
229 </Filter>
230 </Files>
231 <Globals>
232 </Globals>
233 </VisualStudioProject>
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="esedb_test_table"
5 ProjectGUID="{F4A505D3-9B12-4D25-850D-A46215904042}"
6 RootNamespace="esedb_test_table"
7 Keyword="Win32Proj"
8 TargetFrameworkVersion="131072"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Release|Win32"
20 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="1"
23 CharacterSet="1"
24 WholeProgramOptimization="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
45 RuntimeLibrary="2"
46 WarningLevel="4"
47 CompileAs="1"
48 />
49 <Tool
50 Name="VCManagedResourceCompilerTool"
51 />
52 <Tool
53 Name="VCResourceCompilerTool"
54 />
55 <Tool
56 Name="VCPreLinkEventTool"
57 />
58 <Tool
59 Name="VCLinkerTool"
60 LinkIncremental="1"
61 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
62 SubSystem="1"
63 OptimizeReferences="2"
64 EnableCOMDATFolding="2"
65 RandomizedBaseAddress="2"
66 DataExecutionPrevention="2"
67 TargetMachine="1"
68 />
69 <Tool
70 Name="VCALinkTool"
71 />
72 <Tool
73 Name="VCManifestTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCAppVerifierTool"
86 />
87 <Tool
88 Name="VCPostBuildEventTool"
89 />
90 </Configuration>
91 <Configuration
92 Name="VSDebug|Win32"
93 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
94 IntermediateDirectory="$(ConfigurationName)"
95 ConfigurationType="1"
96 CharacterSet="1"
97 >
98 <Tool
99 Name="VCPreBuildEventTool"
100 />
101 <Tool
102 Name="VCCustomBuildTool"
103 />
104 <Tool
105 Name="VCXMLDataGeneratorTool"
106 />
107 <Tool
108 Name="VCWebServiceProxyGeneratorTool"
109 />
110 <Tool
111 Name="VCMIDLTool"
112 />
113 <Tool
114 Name="VCCLCompilerTool"
115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
118 BasicRuntimeChecks="3"
119 SmallerTypeCheck="true"
120 RuntimeLibrary="3"
121 WarningLevel="4"
122 DebugInformationFormat="3"
123 CompileAs="1"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLinkerTool"
136 LinkIncremental="1"
137 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
138 GenerateDebugInformation="true"
139 SubSystem="1"
140 OptimizeReferences="2"
141 EnableCOMDATFolding="2"
142 RandomizedBaseAddress="1"
143 DataExecutionPrevention="1"
144 TargetMachine="1"
145 />
146 <Tool
147 Name="VCALinkTool"
148 />
149 <Tool
150 Name="VCManifestTool"
151 />
152 <Tool
153 Name="VCXDCMakeTool"
154 />
155 <Tool
156 Name="VCBscMakeTool"
157 />
158 <Tool
159 Name="VCFxCopTool"
160 />
161 <Tool
162 Name="VCAppVerifierTool"
163 />
164 <Tool
165 Name="VCPostBuildEventTool"
166 />
167 </Configuration>
168 </Configurations>
169 <References>
170 </References>
171 <Files>
172 <Filter
173 Name="Source Files"
174 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176 >
177 <File
178 RelativePath="..\..\tests\esedb_test_memory.c"
179 >
180 </File>
181 <File
182 RelativePath="..\..\tests\esedb_test_table.c"
183 >
184 </File>
185 </Filter>
186 <Filter
187 Name="Header Files"
188 Filter="h;hpp;hxx;hm;inl;inc;xsd"
189 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
190 >
191 <File
192 RelativePath="..\..\tests\esedb_test_libcerror.h"
193 >
194 </File>
195 <File
196 RelativePath="..\..\tests\esedb_test_libesedb.h"
197 >
198 </File>
199 <File
200 RelativePath="..\..\tests\esedb_test_macros.h"
201 >
202 </File>
203 <File
204 RelativePath="..\..\tests\esedb_test_memory.h"
205 >
206 </File>
207 <File
208 RelativePath="..\..\tests\esedb_test_unused.h"
209 >
210 </File>
211 </Filter>
212 <Filter
213 Name="Resource Files"
214 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
215 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
216 >
217 </Filter>
218 </Files>
219 <Globals>
220 </Globals>
221 </VisualStudioProject>
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="esedb_test_table_definition"
5 ProjectGUID="{66C2ADB0-19C4-4626-ABF4-F98643F56737}"
6 RootNamespace="esedb_test_table_definition"
7 Keyword="Win32Proj"
8 TargetFrameworkVersion="131072"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Release|Win32"
20 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
21 IntermediateDirectory="$(ConfigurationName)"
22 ConfigurationType="1"
23 CharacterSet="1"
24 WholeProgramOptimization="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
45 RuntimeLibrary="2"
46 WarningLevel="4"
47 CompileAs="1"
48 />
49 <Tool
50 Name="VCManagedResourceCompilerTool"
51 />
52 <Tool
53 Name="VCResourceCompilerTool"
54 />
55 <Tool
56 Name="VCPreLinkEventTool"
57 />
58 <Tool
59 Name="VCLinkerTool"
60 LinkIncremental="1"
61 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
62 SubSystem="1"
63 OptimizeReferences="2"
64 EnableCOMDATFolding="2"
65 RandomizedBaseAddress="2"
66 DataExecutionPrevention="2"
67 TargetMachine="1"
68 />
69 <Tool
70 Name="VCALinkTool"
71 />
72 <Tool
73 Name="VCManifestTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCAppVerifierTool"
86 />
87 <Tool
88 Name="VCPostBuildEventTool"
89 />
90 </Configuration>
91 <Configuration
92 Name="VSDebug|Win32"
93 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
94 IntermediateDirectory="$(ConfigurationName)"
95 ConfigurationType="1"
96 CharacterSet="1"
97 >
98 <Tool
99 Name="VCPreBuildEventTool"
100 />
101 <Tool
102 Name="VCCustomBuildTool"
103 />
104 <Tool
105 Name="VCXMLDataGeneratorTool"
106 />
107 <Tool
108 Name="VCWebServiceProxyGeneratorTool"
109 />
110 <Tool
111 Name="VCMIDLTool"
112 />
113 <Tool
114 Name="VCCLCompilerTool"
115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_IMPORT"
118 BasicRuntimeChecks="3"
119 SmallerTypeCheck="true"
120 RuntimeLibrary="3"
121 WarningLevel="4"
122 DebugInformationFormat="3"
123 CompileAs="1"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLinkerTool"
136 LinkIncremental="1"
137 AdditionalLibraryDirectories="&quot;$(OutDir)&quot;"
138 GenerateDebugInformation="true"
139 SubSystem="1"
140 OptimizeReferences="2"
141 EnableCOMDATFolding="2"
142 RandomizedBaseAddress="1"
143 DataExecutionPrevention="1"
144 TargetMachine="1"
145 />
146 <Tool
147 Name="VCALinkTool"
148 />
149 <Tool
150 Name="VCManifestTool"
151 />
152 <Tool
153 Name="VCXDCMakeTool"
154 />
155 <Tool
156 Name="VCBscMakeTool"
157 />
158 <Tool
159 Name="VCFxCopTool"
160 />
161 <Tool
162 Name="VCAppVerifierTool"
163 />
164 <Tool
165 Name="VCPostBuildEventTool"
166 />
167 </Configuration>
168 </Configurations>
169 <References>
170 </References>
171 <Files>
172 <Filter
173 Name="Source Files"
174 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
175 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
176 >
177 <File
178 RelativePath="..\..\tests\esedb_test_memory.c"
179 >
180 </File>
181 <File
182 RelativePath="..\..\tests\esedb_test_table_definition.c"
183 >
184 </File>
185 </Filter>
186 <Filter
187 Name="Header Files"
188 Filter="h;hpp;hxx;hm;inl;inc;xsd"
189 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
190 >
191 <File
192 RelativePath="..\..\tests\esedb_test_libcerror.h"
193 >
194 </File>
195 <File
196 RelativePath="..\..\tests\esedb_test_libesedb.h"
197 >
198 </File>
199 <File
200 RelativePath="..\..\tests\esedb_test_macros.h"
201 >
202 </File>
203 <File
204 RelativePath="..\..\tests\esedb_test_memory.h"
205 >
206 </File>
207 <File
208 RelativePath="..\..\tests\esedb_test_unused.h"
209 >
210 </File>
211 </Filter>
212 <Filter
213 Name="Resource Files"
214 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
215 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
216 >
217 </Filter>
218 </Files>
219 <Globals>
220 </Globals>
221 </VisualStudioProject>
4040 />
4141 <Tool
4242 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt;..\..\libfmapi;..\..\libcsystem"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBFMAPI;HAVE_LOCAL_LIBCSYSTEM;LIBESEDB_DLL_IMPORT"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt;..\..\libfmapi"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBFMAPI;LIBESEDB_DLL_IMPORT"
4545 RuntimeLibrary="2"
4646 WarningLevel="4"
4747 CompileAs="1"
113113 <Tool
114114 Name="VCCLCompilerTool"
115115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt;..\..\libfmapi;..\..\libcsystem"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBFMAPI;HAVE_LOCAL_LIBCSYSTEM;LIBESEDB_DLL_IMPORT"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt;..\..\libfmapi"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBFMAPI;LIBESEDB_DLL_IMPORT"
118118 BasicRuntimeChecks="3"
119119 SmallerTypeCheck="true"
120120 RuntimeLibrary="3"
179179 >
180180 </File>
181181 <File
182 RelativePath="..\..\esedbtools\esedboutput.c"
182 RelativePath="..\..\esedbtools\esedbtools_getopt.c"
183 >
184 </File>
185 <File
186 RelativePath="..\..\esedbtools\esedbtools_output.c"
187 >
188 </File>
189 <File
190 RelativePath="..\..\esedbtools\esedbtools_signal.c"
191 >
192 </File>
193 <File
194 RelativePath="..\..\esedbtools\esedbtools_system_string.c"
183195 >
184196 </File>
185197 <File
217229 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
218230 >
219231 <File
220 RelativePath="..\..\esedbtools\esedboutput.h"
232 RelativePath="..\..\esedbtools\esedbtools_getopt.h"
233 >
234 </File>
235 <File
236 RelativePath="..\..\esedbtools\esedbtools_i18n.h"
221237 >
222238 </File>
223239 <File
245261 >
246262 </File>
247263 <File
248 RelativePath="..\..\esedbtools\esedbtools_libcstring.h"
249 >
250 </File>
251 <File
252 RelativePath="..\..\esedbtools\esedbtools_libcsystem.h"
253 >
254 </File>
255 <File
256264 RelativePath="..\..\esedbtools\esedbtools_libesedb.h"
257265 >
258266 </File>
278286 </File>
279287 <File
280288 RelativePath="..\..\esedbtools\esedbtools_libuna.h"
289 >
290 </File>
291 <File
292 RelativePath="..\..\esedbtools\esedbtools_output.h"
293 >
294 </File>
295 <File
296 RelativePath="..\..\esedbtools\esedbtools_signal.h"
297 >
298 </File>
299 <File
300 RelativePath="..\..\esedbtools\esedbtools_system_string.h"
301 >
302 </File>
303 <File
304 RelativePath="..\..\esedbtools\esedbtools_unused.h"
281305 >
282306 </File>
283307 <File
4040 />
4141 <Tool
4242 Name="VCCLCompilerTool"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt;..\..\libfmapi;..\..\libcsystem"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBFMAPI;HAVE_LOCAL_LIBCSYSTEM;LIBESEDB_DLL_IMPORT"
43 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt;..\..\libfmapi"
44 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBFMAPI;LIBESEDB_DLL_IMPORT"
4545 RuntimeLibrary="2"
4646 WarningLevel="4"
4747 CompileAs="1"
113113 <Tool
114114 Name="VCCLCompilerTool"
115115 Optimization="0"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt;..\..\libfmapi;..\..\libcsystem"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBFMAPI;HAVE_LOCAL_LIBCSYSTEM;LIBESEDB_DLL_IMPORT"
116 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt;..\..\libfmapi"
117 PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBFMAPI;LIBESEDB_DLL_IMPORT"
118118 BasicRuntimeChecks="3"
119119 SmallerTypeCheck="true"
120120 RuntimeLibrary="3"
179179 >
180180 </File>
181181 <File
182 RelativePath="..\..\esedbtools\esedboutput.c"
182 RelativePath="..\..\esedbtools\esedbtools_getopt.c"
183 >
184 </File>
185 <File
186 RelativePath="..\..\esedbtools\esedbtools_output.c"
187 >
188 </File>
189 <File
190 RelativePath="..\..\esedbtools\esedbtools_signal.c"
183191 >
184192 </File>
185193 <File
193201 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
194202 >
195203 <File
196 RelativePath="..\..\esedbtools\esedboutput.h"
204 RelativePath="..\..\esedbtools\esedbtools_getopt.h"
205 >
206 </File>
207 <File
208 RelativePath="..\..\esedbtools\esedbtools_i18n.h"
197209 >
198210 </File>
199211 <File
213225 >
214226 </File>
215227 <File
216 RelativePath="..\..\esedbtools\esedbtools_libcstring.h"
217 >
218 </File>
219 <File
220 RelativePath="..\..\esedbtools\esedbtools_libcsystem.h"
221 >
222 </File>
223 <File
224228 RelativePath="..\..\esedbtools\esedbtools_libesedb.h"
225229 >
226230 </File>
246250 </File>
247251 <File
248252 RelativePath="..\..\esedbtools\esedbtools_libuna.h"
253 >
254 </File>
255 <File
256 RelativePath="..\..\esedbtools\esedbtools_output.h"
257 >
258 </File>
259 <File
260 RelativePath="..\..\esedbtools\esedbtools_signal.h"
261 >
262 </File>
263 <File
264 RelativePath="..\..\esedbtools\esedbtools_unused.h"
249265 >
250266 </File>
251267 <File
3838 />
3939 <Tool
4040 Name="VCCLCompilerTool"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcthreads;..\..\libclocale;..\..\libcnotify;..\..\libcdata;..\..\libcsplit;..\..\libcfile;..\..\libcpath;..\..\libuna"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBBFIO"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcthreads;..\..\libclocale;..\..\libcnotify;..\..\libcdata;..\..\libcsplit;..\..\libcfile;..\..\libcpath;..\..\libuna"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBBFIO"
4343 RuntimeLibrary="2"
4444 WarningLevel="4"
4545 CompileAs="1"
100100 <Tool
101101 Name="VCCLCompilerTool"
102102 Optimization="0"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcthreads;..\..\libclocale;..\..\libcnotify;..\..\libcdata;..\..\libcsplit;..\..\libcfile;..\..\libcpath;..\..\libuna"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBBFIO"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcthreads;..\..\libclocale;..\..\libcnotify;..\..\libcdata;..\..\libcsplit;..\..\libcfile;..\..\libcpath;..\..\libuna"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBBFIO"
105105 BasicRuntimeChecks="3"
106106 SmallerTypeCheck="true"
107107 RuntimeLibrary="3"
181181 RelativePath="..\..\libbfio\libbfio_support.c"
182182 >
183183 </File>
184 <File
185 RelativePath="..\..\libbfio\libbfio_system_string.c"
186 >
187 </File>
184188 </Filter>
185189 <Filter
186190 Name="Header Files"
240244 >
241245 </File>
242246 <File
243 RelativePath="..\..\libbfio\libbfio_libcstring.h"
244 >
245 </File>
246 <File
247247 RelativePath="..\..\libbfio\libbfio_libcthreads.h"
248248 >
249249 </File>
261261 </File>
262262 <File
263263 RelativePath="..\..\libbfio\libbfio_support.h"
264 >
265 </File>
266 <File
267 RelativePath="..\..\libbfio\libbfio_system_string.h"
264268 >
265269 </File>
266270 <File
3838 />
3939 <Tool
4040 Name="VCCLCompilerTool"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcthreads"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcthreads"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA"
4343 RuntimeLibrary="2"
4444 WarningLevel="4"
4545 CompileAs="1"
100100 <Tool
101101 Name="VCCLCompilerTool"
102102 Optimization="0"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcthreads"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcthreads"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA"
105105 BasicRuntimeChecks="3"
106106 SmallerTypeCheck="true"
107107 RuntimeLibrary="3"
216216 >
217217 </File>
218218 <File
219 RelativePath="..\..\libcdata\libcdata_libcstring.h"
220 >
221 </File>
222 <File
223219 RelativePath="..\..\libcdata\libcdata_libcthreads.h"
224220 >
225221 </File>
3838 />
3939 <Tool
4040 Name="VCCLCompilerTool"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR"
41 AdditionalIncludeDirectories="..\..\include;..\..\common"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR"
4343 RuntimeLibrary="2"
4444 WarningLevel="4"
4545 CompileAs="1"
100100 <Tool
101101 Name="VCCLCompilerTool"
102102 Optimization="0"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR"
103 AdditionalIncludeDirectories="..\..\include;..\..\common"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR"
105105 BasicRuntimeChecks="3"
106106 SmallerTypeCheck="true"
107107 RuntimeLibrary="3"
180180 >
181181 </File>
182182 <File
183 RelativePath="..\..\libcerror\libcerror_libcstring.h"
184 >
185 </File>
186 <File
187183 RelativePath="..\..\libcerror\libcerror_support.h"
188184 >
189185 </File>
3838 />
3939 <Tool
4040 Name="VCCLCompilerTool"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libclocale;..\..\libcnotify;..\..\libuna"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libclocale;..\..\libcnotify;..\..\libuna"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE"
4343 RuntimeLibrary="2"
4444 WarningLevel="4"
4545 CompileAs="1"
100100 <Tool
101101 Name="VCCLCompilerTool"
102102 Optimization="0"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libclocale;..\..\libcnotify;..\..\libuna"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libclocale;..\..\libcnotify;..\..\libuna"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE"
105105 BasicRuntimeChecks="3"
106106 SmallerTypeCheck="true"
107107 RuntimeLibrary="3"
165165 RelativePath="..\..\libcfile\libcfile_support.c"
166166 >
167167 </File>
168 <File
169 RelativePath="..\..\libcfile\libcfile_system_string.c"
170 >
171 </File>
168172 </Filter>
169173 <Filter
170174 Name="Header Files"
200204 >
201205 </File>
202206 <File
203 RelativePath="..\..\libcfile\libcfile_libcstring.h"
204 >
205 </File>
206 <File
207207 RelativePath="..\..\libcfile\libcfile_libuna.h"
208208 >
209209 </File>
213213 </File>
214214 <File
215215 RelativePath="..\..\libcfile\libcfile_support.h"
216 >
217 </File>
218 <File
219 RelativePath="..\..\libcfile\libcfile_system_string.h"
216220 >
217221 </File>
218222 <File
3838 />
3939 <Tool
4040 Name="VCCLCompilerTool"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCLOCALE"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCLOCALE"
4343 RuntimeLibrary="2"
4444 WarningLevel="4"
4545 CompileAs="1"
100100 <Tool
101101 Name="VCCLCompilerTool"
102102 Optimization="0"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCLOCALE"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCLOCALE"
105105 BasicRuntimeChecks="3"
106106 SmallerTypeCheck="true"
107107 RuntimeLibrary="3"
161161 RelativePath="..\..\libclocale\libclocale_support.c"
162162 >
163163 </File>
164 <File
165 RelativePath="..\..\libclocale\libclocale_wide_string.c"
166 >
167 </File>
164168 </Filter>
165169 <Filter
166170 Name="Header Files"
184188 >
185189 </File>
186190 <File
187 RelativePath="..\..\libclocale\libclocale_libcstring.h"
188 >
189 </File>
190 <File
191191 RelativePath="..\..\libclocale\libclocale_locale.h"
192192 >
193193 </File>
197197 </File>
198198 <File
199199 RelativePath="..\..\libclocale\libclocale_unused.h"
200 >
201 </File>
202 <File
203 RelativePath="..\..\libclocale\libclocale_wide_string.h"
200204 >
201205 </File>
202206 </Filter>
3838 />
3939 <Tool
4040 Name="VCCLCompilerTool"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCNOTIFY"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCNOTIFY"
4343 RuntimeLibrary="2"
4444 WarningLevel="4"
4545 CompileAs="1"
100100 <Tool
101101 Name="VCCLCompilerTool"
102102 Optimization="0"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCNOTIFY"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCNOTIFY"
105105 BasicRuntimeChecks="3"
106106 SmallerTypeCheck="true"
107107 RuntimeLibrary="3"
184184 >
185185 </File>
186186 <File
187 RelativePath="..\..\libcnotify\libcnotify_libcstring.h"
188 >
189 </File>
190 <File
191187 RelativePath="..\..\libcnotify\libcnotify_print.h"
192188 >
193189 </File>
197193 </File>
198194 <File
199195 RelativePath="..\..\libcnotify\libcnotify_support.h"
200 >
201 </File>
202 <File
203 RelativePath="..\..\libcnotify\libcnotify_types.h"
204196 >
205197 </File>
206198 <File
3838 />
3939 <Tool
4040 Name="VCCLCompilerTool"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libclocale;..\..\libcsplit;..\..\libuna"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCPATH"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libclocale;..\..\libcsplit;..\..\libuna"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCPATH"
4343 RuntimeLibrary="2"
4444 WarningLevel="4"
4545 CompileAs="1"
100100 <Tool
101101 Name="VCCLCompilerTool"
102102 Optimization="0"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libclocale;..\..\libcsplit;..\..\libuna"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCPATH"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libclocale;..\..\libcsplit;..\..\libuna"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCPATH"
105105 BasicRuntimeChecks="3"
106106 SmallerTypeCheck="true"
107107 RuntimeLibrary="3"
161161 RelativePath="..\..\libcpath\libcpath_support.c"
162162 >
163163 </File>
164 <File
165 RelativePath="..\..\libcpath\libcpath_system_string.c"
166 >
167 </File>
164168 </Filter>
165169 <Filter
166170 Name="Header Files"
192196 >
193197 </File>
194198 <File
195 RelativePath="..\..\libcpath\libcpath_libcstring.h"
196 >
197 </File>
198 <File
199199 RelativePath="..\..\libcpath\libcpath_libuna.h"
200200 >
201201 </File>
205205 </File>
206206 <File
207207 RelativePath="..\..\libcpath\libcpath_support.h"
208 >
209 </File>
210 <File
211 RelativePath="..\..\libcpath\libcpath_system_string.h"
208212 >
209213 </File>
210214 <File
3838 />
3939 <Tool
4040 Name="VCCLCompilerTool"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCSPLIT"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCSPLIT"
4343 RuntimeLibrary="2"
4444 WarningLevel="4"
4545 CompileAs="1"
100100 <Tool
101101 Name="VCCLCompilerTool"
102102 Optimization="0"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCSPLIT"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCSPLIT"
105105 BasicRuntimeChecks="3"
106106 SmallerTypeCheck="true"
107107 RuntimeLibrary="3"
196196 >
197197 </File>
198198 <File
199 RelativePath="..\..\libcsplit\libcsplit_libcstring.h"
200 >
201 </File>
202 <File
203199 RelativePath="..\..\libcsplit\libcsplit_narrow_split_string.h"
204200 >
205201 </File>
+0
-209
msvscpp/libcstring/libcstring.vcproj less more
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="libcstring"
5 ProjectGUID="{20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}"
6 RootNamespace="libcstring"
7 TargetFrameworkVersion="131072"
8 >
9 <Platforms>
10 <Platform
11 Name="Win32"
12 />
13 </Platforms>
14 <ToolFiles>
15 </ToolFiles>
16 <Configurations>
17 <Configuration
18 Name="Release|Win32"
19 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
20 IntermediateDirectory="$(ConfigurationName)"
21 ConfigurationType="4"
22 CharacterSet="1"
23 >
24 <Tool
25 Name="VCPreBuildEventTool"
26 />
27 <Tool
28 Name="VCCustomBuildTool"
29 />
30 <Tool
31 Name="VCXMLDataGeneratorTool"
32 />
33 <Tool
34 Name="VCWebServiceProxyGeneratorTool"
35 />
36 <Tool
37 Name="VCMIDLTool"
38 />
39 <Tool
40 Name="VCCLCompilerTool"
41 AdditionalIncludeDirectories="..\..\include;..\..\common"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING"
43 RuntimeLibrary="2"
44 WarningLevel="4"
45 CompileAs="1"
46 />
47 <Tool
48 Name="VCManagedResourceCompilerTool"
49 />
50 <Tool
51 Name="VCResourceCompilerTool"
52 />
53 <Tool
54 Name="VCPreLinkEventTool"
55 />
56 <Tool
57 Name="VCLibrarianTool"
58 OutputFile="$(OutDir)\$(ProjectName).lib"
59 ModuleDefinitionFile=""
60 IgnoreAllDefaultLibraries="false"
61 />
62 <Tool
63 Name="VCALinkTool"
64 />
65 <Tool
66 Name="VCXDCMakeTool"
67 />
68 <Tool
69 Name="VCBscMakeTool"
70 />
71 <Tool
72 Name="VCFxCopTool"
73 />
74 <Tool
75 Name="VCPostBuildEventTool"
76 />
77 </Configuration>
78 <Configuration
79 Name="VSDebug|Win32"
80 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
81 IntermediateDirectory="$(ConfigurationName)"
82 ConfigurationType="4"
83 CharacterSet="1"
84 >
85 <Tool
86 Name="VCPreBuildEventTool"
87 />
88 <Tool
89 Name="VCCustomBuildTool"
90 />
91 <Tool
92 Name="VCXMLDataGeneratorTool"
93 />
94 <Tool
95 Name="VCWebServiceProxyGeneratorTool"
96 />
97 <Tool
98 Name="VCMIDLTool"
99 />
100 <Tool
101 Name="VCCLCompilerTool"
102 Optimization="0"
103 AdditionalIncludeDirectories="..\..\include;..\..\common"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING"
105 BasicRuntimeChecks="3"
106 SmallerTypeCheck="true"
107 RuntimeLibrary="3"
108 WarningLevel="4"
109 DebugInformationFormat="3"
110 CompileAs="1"
111 />
112 <Tool
113 Name="VCManagedResourceCompilerTool"
114 />
115 <Tool
116 Name="VCResourceCompilerTool"
117 />
118 <Tool
119 Name="VCPreLinkEventTool"
120 />
121 <Tool
122 Name="VCLibrarianTool"
123 OutputFile="$(OutDir)\$(ProjectName).lib"
124 ModuleDefinitionFile=""
125 IgnoreAllDefaultLibraries="false"
126 />
127 <Tool
128 Name="VCALinkTool"
129 />
130 <Tool
131 Name="VCXDCMakeTool"
132 />
133 <Tool
134 Name="VCBscMakeTool"
135 />
136 <Tool
137 Name="VCFxCopTool"
138 />
139 <Tool
140 Name="VCPostBuildEventTool"
141 />
142 </Configuration>
143 </Configurations>
144 <References>
145 </References>
146 <Files>
147 <Filter
148 Name="Source Files"
149 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
150 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
151 >
152 <File
153 RelativePath="..\..\libcstring\libcstring_support.c"
154 >
155 </File>
156 <File
157 RelativePath="..\..\libcstring\libcstring_wide_string.c"
158 >
159 </File>
160 </Filter>
161 <Filter
162 Name="Header Files"
163 Filter="h;hpp;hxx;hm;inl;inc;xsd"
164 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
165 >
166 <File
167 RelativePath="..\..\libcstring\libcstring_definitions.h"
168 >
169 </File>
170 <File
171 RelativePath="..\..\libcstring\libcstring_extern.h"
172 >
173 </File>
174 <File
175 RelativePath="..\..\libcstring\libcstring_narrow_string.h"
176 >
177 </File>
178 <File
179 RelativePath="..\..\libcstring\libcstring_support.h"
180 >
181 </File>
182 <File
183 RelativePath="..\..\libcstring\libcstring_system_string.h"
184 >
185 </File>
186 <File
187 RelativePath="..\..\libcstring\libcstring_types.h"
188 >
189 </File>
190 <File
191 RelativePath="..\..\libcstring\libcstring_unused.h"
192 >
193 </File>
194 <File
195 RelativePath="..\..\libcstring\libcstring_wide_string.h"
196 >
197 </File>
198 </Filter>
199 <Filter
200 Name="Resource Files"
201 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
202 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
203 >
204 </Filter>
205 </Files>
206 <Globals>
207 </Globals>
208 </VisualStudioProject>
+0
-269
msvscpp/libcsystem/libcsystem.vcproj less more
0 <?xml version="1.0" encoding="Windows-1252"?>
1 <VisualStudioProject
2 ProjectType="Visual C++"
3 Version="9,00"
4 Name="libcsystem"
5 ProjectGUID="{A2B861D5-6751-43A9-B085-8D48F8754AC5}"
6 RootNamespace="libcsystem"
7 TargetFrameworkVersion="131072"
8 >
9 <Platforms>
10 <Platform
11 Name="Win32"
12 />
13 </Platforms>
14 <ToolFiles>
15 </ToolFiles>
16 <Configurations>
17 <Configuration
18 Name="Release|Win32"
19 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
20 IntermediateDirectory="$(ConfigurationName)"
21 ConfigurationType="4"
22 CharacterSet="1"
23 >
24 <Tool
25 Name="VCPreBuildEventTool"
26 />
27 <Tool
28 Name="VCCustomBuildTool"
29 />
30 <Tool
31 Name="VCXMLDataGeneratorTool"
32 />
33 <Tool
34 Name="VCWebServiceProxyGeneratorTool"
35 />
36 <Tool
37 Name="VCMIDLTool"
38 />
39 <Tool
40 Name="VCCLCompilerTool"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libclocale;..\..\libcnotify;..\..\libuna"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCSYSTEM"
43 RuntimeLibrary="2"
44 WarningLevel="4"
45 CompileAs="1"
46 />
47 <Tool
48 Name="VCManagedResourceCompilerTool"
49 />
50 <Tool
51 Name="VCResourceCompilerTool"
52 />
53 <Tool
54 Name="VCPreLinkEventTool"
55 />
56 <Tool
57 Name="VCLibrarianTool"
58 OutputFile="$(OutDir)\$(ProjectName).lib"
59 ModuleDefinitionFile=""
60 IgnoreAllDefaultLibraries="false"
61 />
62 <Tool
63 Name="VCALinkTool"
64 />
65 <Tool
66 Name="VCXDCMakeTool"
67 />
68 <Tool
69 Name="VCBscMakeTool"
70 />
71 <Tool
72 Name="VCFxCopTool"
73 />
74 <Tool
75 Name="VCPostBuildEventTool"
76 />
77 </Configuration>
78 <Configuration
79 Name="VSDebug|Win32"
80 OutputDirectory="$(SolutionDir)$(ConfigurationName)"
81 IntermediateDirectory="$(ConfigurationName)"
82 ConfigurationType="4"
83 CharacterSet="1"
84 >
85 <Tool
86 Name="VCPreBuildEventTool"
87 />
88 <Tool
89 Name="VCCustomBuildTool"
90 />
91 <Tool
92 Name="VCXMLDataGeneratorTool"
93 />
94 <Tool
95 Name="VCWebServiceProxyGeneratorTool"
96 />
97 <Tool
98 Name="VCMIDLTool"
99 />
100 <Tool
101 Name="VCCLCompilerTool"
102 Optimization="0"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libclocale;..\..\libcnotify;..\..\libuna"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCSYSTEM"
105 BasicRuntimeChecks="3"
106 SmallerTypeCheck="true"
107 RuntimeLibrary="3"
108 WarningLevel="4"
109 DebugInformationFormat="3"
110 CompileAs="1"
111 />
112 <Tool
113 Name="VCManagedResourceCompilerTool"
114 />
115 <Tool
116 Name="VCResourceCompilerTool"
117 />
118 <Tool
119 Name="VCPreLinkEventTool"
120 />
121 <Tool
122 Name="VCLibrarianTool"
123 OutputFile="$(OutDir)\$(ProjectName).lib"
124 ModuleDefinitionFile=""
125 IgnoreAllDefaultLibraries="false"
126 />
127 <Tool
128 Name="VCALinkTool"
129 />
130 <Tool
131 Name="VCXDCMakeTool"
132 />
133 <Tool
134 Name="VCBscMakeTool"
135 />
136 <Tool
137 Name="VCFxCopTool"
138 />
139 <Tool
140 Name="VCPostBuildEventTool"
141 />
142 </Configuration>
143 </Configurations>
144 <References>
145 </References>
146 <Files>
147 <Filter
148 Name="Source Files"
149 Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
150 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
151 >
152 <File
153 RelativePath="..\..\libcsystem\libcsystem_error.c"
154 >
155 </File>
156 <File
157 RelativePath="..\..\libcsystem\libcsystem_getopt.c"
158 >
159 </File>
160 <File
161 RelativePath="..\..\libcsystem\libcsystem_glob.c"
162 >
163 </File>
164 <File
165 RelativePath="..\..\libcsystem\libcsystem_signal.c"
166 >
167 </File>
168 <File
169 RelativePath="..\..\libcsystem\libcsystem_string.c"
170 >
171 </File>
172 <File
173 RelativePath="..\..\libcsystem\libcsystem_support.c"
174 >
175 </File>
176 </Filter>
177 <Filter
178 Name="Header Files"
179 Filter="h;hpp;hxx;hm;inl;inc;xsd"
180 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
181 >
182 <File
183 RelativePath="..\..\libcsystem\libcsystem_definitions.h"
184 >
185 </File>
186 <File
187 RelativePath="..\..\libcsystem\libcsystem_error.h"
188 >
189 </File>
190 <File
191 RelativePath="..\..\libcsystem\libcsystem_extern.h"
192 >
193 </File>
194 <File
195 RelativePath="..\..\libcsystem\libcsystem_file_io.h"
196 >
197 </File>
198 <File
199 RelativePath="..\..\libcsystem\libcsystem_find.h"
200 >
201 </File>
202 <File
203 RelativePath="..\..\libcsystem\libcsystem_getopt.h"
204 >
205 </File>
206 <File
207 RelativePath="..\..\libcsystem\libcsystem_glob.h"
208 >
209 </File>
210 <File
211 RelativePath="..\..\libcsystem\libcsystem_i18n.h"
212 >
213 </File>
214 <File
215 RelativePath="..\..\libcsystem\libcsystem_libcerror.h"
216 >
217 </File>
218 <File
219 RelativePath="..\..\libcsystem\libcsystem_libclocale.h"
220 >
221 </File>
222 <File
223 RelativePath="..\..\libcsystem\libcsystem_libcnotify.h"
224 >
225 </File>
226 <File
227 RelativePath="..\..\libcsystem\libcsystem_libcstring.h"
228 >
229 </File>
230 <File
231 RelativePath="..\..\libcsystem\libcsystem_libcstring.h"
232 >
233 </File>
234 <File
235 RelativePath="..\..\libcsystem\libcsystem_libuna.h"
236 >
237 </File>
238 <File
239 RelativePath="..\..\libcsystem\libcsystem_signal.h"
240 >
241 </File>
242 <File
243 RelativePath="..\..\libcsystem\libcsystem_string.h"
244 >
245 </File>
246 <File
247 RelativePath="..\..\libcsystem\libcsystem_support.h"
248 >
249 </File>
250 <File
251 RelativePath="..\..\libcsystem\libcsystem_types.h"
252 >
253 </File>
254 <File
255 RelativePath="..\..\libcsystem\libcsystem_unused.h"
256 >
257 </File>
258 </Filter>
259 <Filter
260 Name="Resource Files"
261 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
262 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
263 >
264 </Filter>
265 </Files>
266 <Globals>
267 </Globals>
268 </VisualStudioProject>
3838 />
3939 <Tool
4040 Name="VCCLCompilerTool"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS"
4343 RuntimeLibrary="2"
4444 WarningLevel="4"
4545 CompileAs="1"
100100 <Tool
101101 Name="VCCLCompilerTool"
102102 Optimization="0"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS"
105105 BasicRuntimeChecks="3"
106106 SmallerTypeCheck="true"
107107 RuntimeLibrary="3"
220220 >
221221 </File>
222222 <File
223 RelativePath="..\..\libcthreads\libcthreads_libcstring.h"
224 >
225 </File>
226 <File
227223 RelativePath="..\..\libcthreads\libcthreads_lock.h"
228224 >
229225 </File>
3838 />
3939 <Tool
4040 Name="VCCLCompilerTool"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_EXPORT"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_EXPORT"
4343 RuntimeLibrary="2"
4444 WarningLevel="4"
4545 CompileAs="1"
109109 <Tool
110110 Name="VCCLCompilerTool"
111111 Optimization="0"
112 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
113 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_EXPORT"
112 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libcnotify;..\..\libcsplit;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;..\..\libfcache;..\..\libfdata;..\..\libfdatetime;..\..\libfguid;..\..\libfvalue;..\..\libfwnt"
113 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBCSPLIT;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFVALUE;HAVE_LOCAL_LIBFWNT;LIBESEDB_DLL_EXPORT"
114114 BasicRuntimeChecks="3"
115115 SmallerTypeCheck="true"
116116 RuntimeLibrary="3"
265265 >
266266 </File>
267267 <File
268 RelativePath="..\..\libesedb\libesedb_page_value.c"
269 >
270 </File>
271 <File
268272 RelativePath="..\..\libesedb\libesedb_record.c"
269273 >
270274 </File>
407411 >
408412 </File>
409413 <File
410 RelativePath="..\..\libesedb\libesedb_libcstring.h"
411 >
412 </File>
413 <File
414414 RelativePath="..\..\libesedb\libesedb_libfcache.h"
415415 >
416416 </File>
444444 </File>
445445 <File
446446 RelativePath="..\..\libesedb\libesedb_page_tree.h"
447 >
448 </File>
449 <File
450 RelativePath="..\..\libesedb\libesedb_page_value.h"
447451 >
448452 </File>
449453 <File
22 # Visual C++ Express 2008
33 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfcache", "libfcache\libfcache.vcproj", "{3D19EAAD-9195-468B-BC5B-D147A89CA4F5}"
44 ProjectSection(ProjectDependencies) = postProject
5 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
65 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
76 {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} = {8AFAA2C6-E025-4B45-B96F-A27D04C6115A}
87 {B9332DC8-7594-47DF-80C1-38922E0F4DFB} = {B9332DC8-7594-47DF-80C1-38922E0F4DFB}
109 EndProject
1110 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfguid", "libfguid\libfguid.vcproj", "{8C13E498-6369-4792-A0CF-B7134C54561B}"
1211 ProjectSection(ProjectDependencies) = postProject
13 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
14 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
15 EndProjectSection
16 EndProject
17 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_get_version", "esedb_test_get_version\esedb_test_get_version.vcproj", "{684AA161-541E-4CB8-BE49-31D3A63FE497}"
18 ProjectSection(ProjectDependencies) = postProject
19 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
20 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
21 EndProjectSection
22 EndProject
23 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_open_close", "esedb_test_open_close\esedb_test_open_close.vcproj", "{C2F3DEDB-B92F-48B0-A3C4-15CE131D40FB}"
24 ProjectSection(ProjectDependencies) = postProject
25 {A2B861D5-6751-43A9-B085-8D48F8754AC5} = {A2B861D5-6751-43A9-B085-8D48F8754AC5}
26 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
27 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
28 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
12 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
13 EndProjectSection
14 EndProject
15 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_catalog", "esedb_test_catalog\esedb_test_catalog.vcproj", "{4065F2DD-616C-4C2A-BCA5-7CF87383DB12}"
16 ProjectSection(ProjectDependencies) = postProject
17 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
18 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
19 EndProjectSection
20 EndProject
21 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_catalog_definition", "esedb_test_catalog_definition\esedb_test_catalog_definition.vcproj", "{ACD71378-4A58-4141-9A66-A05C9101885B}"
22 ProjectSection(ProjectDependencies) = postProject
23 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
24 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
25 EndProjectSection
26 EndProject
27 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_column", "esedb_test_column\esedb_test_column.vcproj", "{AFFAB164-A537-4271-A3B2-816A3253AC35}"
28 ProjectSection(ProjectDependencies) = postProject
29 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
30 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
31 EndProjectSection
32 EndProject
33 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_column_type", "esedb_test_column_type\esedb_test_column_type.vcproj", "{E7AC2AB8-2946-40F9-B0B2-02CE8C96C728}"
34 ProjectSection(ProjectDependencies) = postProject
35 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
36 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
37 EndProjectSection
38 EndProject
39 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_data_definition", "esedb_test_data_definition\esedb_test_data_definition.vcproj", "{9419D031-C7C3-4DC1-BC5B-ECFC832B80E9}"
40 ProjectSection(ProjectDependencies) = postProject
41 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
42 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
43 EndProjectSection
44 EndProject
45 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_data_segment", "esedb_test_data_segment\esedb_test_data_segment.vcproj", "{A9811C8C-E212-4354-A2AB-0D1F5C632987}"
46 ProjectSection(ProjectDependencies) = postProject
47 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
48 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
49 EndProjectSection
50 EndProject
51 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_database", "esedb_test_database\esedb_test_database.vcproj", "{6ADF7681-DFAA-4CFF-9797-305E269B936D}"
52 ProjectSection(ProjectDependencies) = postProject
53 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
54 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
55 EndProjectSection
56 EndProject
57 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_error", "esedb_test_error\esedb_test_error.vcproj", "{7858071B-74A6-46C8-8A4C-DF4E1916A644}"
58 ProjectSection(ProjectDependencies) = postProject
59 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
60 EndProjectSection
61 EndProject
62 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_file", "esedb_test_file\esedb_test_file.vcproj", "{53632831-C7D9-4B47-8EAC-16B716277ABB}"
63 ProjectSection(ProjectDependencies) = postProject
64 {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910}
65 {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D}
66 {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89}
67 {B9332DC8-7594-47DF-80C1-38922E0F4DFB} = {B9332DC8-7594-47DF-80C1-38922E0F4DFB}
68 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
69 {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} = {8AFAA2C6-E025-4B45-B96F-A27D04C6115A}
70 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
71 EndProjectSection
72 EndProject
73 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_index", "esedb_test_index\esedb_test_index.vcproj", "{A48BD72B-3F94-42DD-9382-502ED60AB150}"
74 ProjectSection(ProjectDependencies) = postProject
75 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
76 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
77 EndProjectSection
78 EndProject
79 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_io_handle", "esedb_test_io_handle\esedb_test_io_handle.vcproj", "{4514F4B8-9225-4C90-91ED-D65BB183BDEC}"
80 ProjectSection(ProjectDependencies) = postProject
81 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
82 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
83 EndProjectSection
84 EndProject
85 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_key", "esedb_test_key\esedb_test_key.vcproj", "{FF226CC0-063B-4420-B88F-DDBACF5CC50C}"
86 ProjectSection(ProjectDependencies) = postProject
87 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
88 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
89 EndProjectSection
90 EndProject
91 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_long_value", "esedb_test_long_value\esedb_test_long_value.vcproj", "{609F3B7C-7754-487E-87E7-D19276604C3B}"
92 ProjectSection(ProjectDependencies) = postProject
93 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
94 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
95 EndProjectSection
96 EndProject
97 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_multi_value", "esedb_test_multi_value\esedb_test_multi_value.vcproj", "{B6D2D5C7-4896-4FDE-931E-AE33556252CB}"
98 ProjectSection(ProjectDependencies) = postProject
99 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
100 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
101 EndProjectSection
102 EndProject
103 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_notify", "esedb_test_notify\esedb_test_notify.vcproj", "{677D81DB-C708-4BB4-87C3-8EC3A85C1260}"
104 ProjectSection(ProjectDependencies) = postProject
105 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
106 EndProjectSection
107 EndProject
108 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_page", "esedb_test_page\esedb_test_page.vcproj", "{8161CE83-108A-4863-9B51-8F1DF5B5276B}"
109 ProjectSection(ProjectDependencies) = postProject
110 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
111 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
112 EndProjectSection
113 EndProject
114 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_page_tree", "esedb_test_page_tree\esedb_test_page_tree.vcproj", "{41748683-3F34-4770-98C5-F80103B0067A}"
115 ProjectSection(ProjectDependencies) = postProject
116 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
117 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
118 EndProjectSection
119 EndProject
120 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_page_value", "esedb_test_page_value\esedb_test_page_value.vcproj", "{67A27024-4941-4F10-BB98-F0E43625FE9B}"
121 ProjectSection(ProjectDependencies) = postProject
122 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
123 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
124 EndProjectSection
125 EndProject
126 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_record", "esedb_test_record\esedb_test_record.vcproj", "{CF349A24-505E-4CE5-A4FC-90AEDC3C7E70}"
127 ProjectSection(ProjectDependencies) = postProject
128 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
129 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
130 EndProjectSection
131 EndProject
132 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_support", "esedb_test_support\esedb_test_support.vcproj", "{22390A91-D782-4F25-B2BC-7C2EEF5EA6B0}"
133 ProjectSection(ProjectDependencies) = postProject
134 {41CFAFBF-A1C8-4704-AFEF-31979E6452B9} = {41CFAFBF-A1C8-4704-AFEF-31979E6452B9}
135 {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} = {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA}
136 {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0} = {4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0}
137 {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910}
138 {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D}
139 {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89}
140 {B9332DC8-7594-47DF-80C1-38922E0F4DFB} = {B9332DC8-7594-47DF-80C1-38922E0F4DFB}
141 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
142 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
143 EndProjectSection
144 EndProject
145 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_table", "esedb_test_table\esedb_test_table.vcproj", "{F4A505D3-9B12-4D25-850D-A46215904042}"
146 ProjectSection(ProjectDependencies) = postProject
147 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
148 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
149 EndProjectSection
150 EndProject
151 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedb_test_table_definition", "esedb_test_table_definition\esedb_test_table_definition.vcproj", "{66C2ADB0-19C4-4626-ABF4-F98643F56737}"
152 ProjectSection(ProjectDependencies) = postProject
153 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
154 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
29155 EndProjectSection
30156 EndProject
31157 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmapidb", "libmapidb\libmapidb.vcproj", "{68F145F0-053E-47A6-8F8C-740A42F2C62B}"
32158 ProjectSection(ProjectDependencies) = postProject
33 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
34159 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
35160 {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D}
36161 EndProjectSection
37162 EndProject
38163 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libclocale", "libclocale\libclocale.vcproj", "{CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89}"
39164 ProjectSection(ProjectDependencies) = postProject
40 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
41165 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
42166 EndProjectSection
43167 EndProject
44168 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedbexport", "esedbexport\esedbexport.vcproj", "{6B758D1D-FE05-49C6-836B-9B8AC8DC4FCD}"
45169 ProjectSection(ProjectDependencies) = postProject
46 {A2B861D5-6751-43A9-B085-8D48F8754AC5} = {A2B861D5-6751-43A9-B085-8D48F8754AC5}
47170 {CDB03E65-C81B-47E0-B70F-C880D841DD61} = {CDB03E65-C81B-47E0-B70F-C880D841DD61}
48171 {85005D62-6AA7-4D8A-86CB-4061B23D7C6C} = {85005D62-6AA7-4D8A-86CB-4061B23D7C6C}
49172 {9D37639F-1694-47DF-84BF-336D98E0639F} = {9D37639F-1694-47DF-84BF-336D98E0639F}
53176 {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA} = {3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA}
54177 {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910}
55178 {B86FB73A-4ACC-42DE-9545-586D93955B06} = {B86FB73A-4ACC-42DE-9545-586D93955B06}
56 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
57 {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D}
58 {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89}
59 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
60 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
179 {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D}
180 {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89}
181 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
182 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
61183 EndProjectSection
62184 EndProject
63185 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "esedbinfo", "esedbinfo\esedbinfo.vcproj", "{A7545354-5D50-49F6-A3D0-1F97F6228955}"
64186 ProjectSection(ProjectDependencies) = postProject
65 {A2B861D5-6751-43A9-B085-8D48F8754AC5} = {A2B861D5-6751-43A9-B085-8D48F8754AC5}
66 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
67 {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D}
68 {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89}
69 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
70 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
187 {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D}
188 {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89}
189 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
190 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
71191 EndProjectSection
72192 EndProject
73193 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libesedb", "libesedb\libesedb.vcproj", "{A426611F-36ED-4F34-8CEC-12270B8954D9}"
74194 ProjectSection(ProjectDependencies) = postProject
75 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
76195 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
77196 {B9332DC8-7594-47DF-80C1-38922E0F4DFB} = {B9332DC8-7594-47DF-80C1-38922E0F4DFB}
78197 {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89}
92211 EndProject
93212 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbfio", "libbfio\libbfio.vcproj", "{41CFAFBF-A1C8-4704-AFEF-31979E6452B9}"
94213 ProjectSection(ProjectDependencies) = postProject
95 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
96214 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
97215 {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} = {8AFAA2C6-E025-4B45-B96F-A27D04C6115A}
98216 {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89}
106224 EndProject
107225 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfdatetime", "libfdatetime\libfdatetime.vcproj", "{25C60507-39C6-4564-912D-DA2E7482A00F}"
108226 ProjectSection(ProjectDependencies) = postProject
109 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
110227 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
111228 EndProjectSection
112229 EndProject
113230 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcfile", "libcfile\libcfile.vcproj", "{4C93BDD3-1804-47F3-9B34-F2DE0CAE1AE0}"
114231 ProjectSection(ProjectDependencies) = postProject
115 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
116232 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
117233 {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89}
118234 {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D}
121237 EndProject
122238 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfwnt", "libfwnt\libfwnt.vcproj", "{9D37639F-1694-47DF-84BF-336D98E0639F}"
123239 ProjectSection(ProjectDependencies) = postProject
124 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
125240 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
126241 {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} = {8AFAA2C6-E025-4B45-B96F-A27D04C6115A}
127242 {B9332DC8-7594-47DF-80C1-38922E0F4DFB} = {B9332DC8-7594-47DF-80C1-38922E0F4DFB}
130245 EndProject
131246 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcthreads", "libcthreads\libcthreads.vcproj", "{8AFAA2C6-E025-4B45-B96F-A27D04C6115A}"
132247 ProjectSection(ProjectDependencies) = postProject
133 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
134248 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
135249 EndProjectSection
136250 EndProject
137251 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyesedb", "pyesedb\pyesedb.vcproj", "{E221DB4C-B254-47CB-993D-DC7FED580DA1}"
138252 ProjectSection(ProjectDependencies) = postProject
139 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
140253 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
141254 {A426611F-36ED-4F34-8CEC-12270B8954D9} = {A426611F-36ED-4F34-8CEC-12270B8954D9}
142255 {B9332DC8-7594-47DF-80C1-38922E0F4DFB} = {B9332DC8-7594-47DF-80C1-38922E0F4DFB}
148261 EndProject
149262 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcpath", "libcpath\libcpath.vcproj", "{3FFB9C05-1145-45A7-9ADE-5C8D70FBD7CA}"
150263 ProjectSection(ProjectDependencies) = postProject
151 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
152264 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
153265 {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89}
154266 {B86FB73A-4ACC-42DE-9545-586D93955B06} = {B86FB73A-4ACC-42DE-9545-586D93955B06}
157269 EndProject
158270 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfmapi", "libfmapi\libfmapi.vcproj", "{CDB03E65-C81B-47E0-B70F-C880D841DD61}"
159271 ProjectSection(ProjectDependencies) = postProject
160 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
161272 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
162273 {B9332DC8-7594-47DF-80C1-38922E0F4DFB} = {B9332DC8-7594-47DF-80C1-38922E0F4DFB}
163274 {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} = {8AFAA2C6-E025-4B45-B96F-A27D04C6115A}
168279 {9D37639F-1694-47DF-84BF-336D98E0639F} = {9D37639F-1694-47DF-84BF-336D98E0639F}
169280 EndProjectSection
170281 EndProject
171 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcstring", "libcstring\libcstring.vcproj", "{20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}"
172 EndProject
173282 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libuna", "libuna\libuna.vcproj", "{BC27FF34-C859-4A1A-95D6-FC89952E1910}"
174283 ProjectSection(ProjectDependencies) = postProject
175 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
176284 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
177285 EndProjectSection
178286 EndProject
179287 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfvalue", "libfvalue\libfvalue.vcproj", "{85005D62-6AA7-4D8A-86CB-4061B23D7C6C}"
180288 ProjectSection(ProjectDependencies) = postProject
181 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
182289 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
183290 {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} = {8AFAA2C6-E025-4B45-B96F-A27D04C6115A}
184291 {B9332DC8-7594-47DF-80C1-38922E0F4DFB} = {B9332DC8-7594-47DF-80C1-38922E0F4DFB}
190297 EndProjectSection
191298 EndProject
192299 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcerror", "libcerror\libcerror.vcproj", "{BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}"
193 ProjectSection(ProjectDependencies) = postProject
194 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
195 EndProjectSection
196300 EndProject
197301 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcnotify", "libcnotify\libcnotify.vcproj", "{5304AD69-D449-4589-B2C9-E4607E56A51D}"
198302 ProjectSection(ProjectDependencies) = postProject
199 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
200 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
201 EndProjectSection
202 EndProject
203 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcsystem", "libcsystem\libcsystem.vcproj", "{A2B861D5-6751-43A9-B085-8D48F8754AC5}"
204 ProjectSection(ProjectDependencies) = postProject
205 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
206 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
207 {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89} = {CEDF8919-00B2-4D8A-88CC-84ADB2D2FF89}
208 {5304AD69-D449-4589-B2C9-E4607E56A51D} = {5304AD69-D449-4589-B2C9-E4607E56A51D}
209 {BC27FF34-C859-4A1A-95D6-FC89952E1910} = {BC27FF34-C859-4A1A-95D6-FC89952E1910}
303 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
210304 EndProjectSection
211305 EndProject
212306 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfdata", "libfdata\libfdata.vcproj", "{F94DCC2D-2B49-453E-89B3-FD81992677D0}"
213307 ProjectSection(ProjectDependencies) = postProject
214 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
215308 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
216309 {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} = {8AFAA2C6-E025-4B45-B96F-A27D04C6115A}
217310 {B9332DC8-7594-47DF-80C1-38922E0F4DFB} = {B9332DC8-7594-47DF-80C1-38922E0F4DFB}
221314 EndProject
222315 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcdata", "libcdata\libcdata.vcproj", "{B9332DC8-7594-47DF-80C1-38922E0F4DFB}"
223316 ProjectSection(ProjectDependencies) = postProject
224 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
225317 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
226318 {8AFAA2C6-E025-4B45-B96F-A27D04C6115A} = {8AFAA2C6-E025-4B45-B96F-A27D04C6115A}
227319 EndProjectSection
228320 EndProject
229321 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcsplit", "libcsplit\libcsplit.vcproj", "{B86FB73A-4ACC-42DE-9545-586D93955B06}"
230322 ProjectSection(ProjectDependencies) = postProject
231 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F} = {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}
232323 {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C} = {BD3A95FA-A3DE-4B79-A889-A7E5ECA4B69C}
233324 EndProjectSection
234325 EndProject
246337 {8C13E498-6369-4792-A0CF-B7134C54561B}.Release|Win32.Build.0 = Release|Win32
247338 {8C13E498-6369-4792-A0CF-B7134C54561B}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
248339 {8C13E498-6369-4792-A0CF-B7134C54561B}.VSDebug|Win32.Build.0 = VSDebug|Win32
249 {684AA161-541E-4CB8-BE49-31D3A63FE497}.Release|Win32.ActiveCfg = Release|Win32
250 {684AA161-541E-4CB8-BE49-31D3A63FE497}.Release|Win32.Build.0 = Release|Win32
251 {684AA161-541E-4CB8-BE49-31D3A63FE497}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
252 {684AA161-541E-4CB8-BE49-31D3A63FE497}.VSDebug|Win32.Build.0 = VSDebug|Win32
253 {C2F3DEDB-B92F-48B0-A3C4-15CE131D40FB}.Release|Win32.ActiveCfg = Release|Win32
254 {C2F3DEDB-B92F-48B0-A3C4-15CE131D40FB}.Release|Win32.Build.0 = Release|Win32
255 {C2F3DEDB-B92F-48B0-A3C4-15CE131D40FB}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
256 {C2F3DEDB-B92F-48B0-A3C4-15CE131D40FB}.VSDebug|Win32.Build.0 = VSDebug|Win32
340 {4065F2DD-616C-4C2A-BCA5-7CF87383DB12}.Release|Win32.ActiveCfg = Release|Win32
341 {4065F2DD-616C-4C2A-BCA5-7CF87383DB12}.Release|Win32.Build.0 = Release|Win32
342 {4065F2DD-616C-4C2A-BCA5-7CF87383DB12}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
343 {4065F2DD-616C-4C2A-BCA5-7CF87383DB12}.VSDebug|Win32.Build.0 = VSDebug|Win32
344 {ACD71378-4A58-4141-9A66-A05C9101885B}.Release|Win32.ActiveCfg = Release|Win32
345 {ACD71378-4A58-4141-9A66-A05C9101885B}.Release|Win32.Build.0 = Release|Win32
346 {ACD71378-4A58-4141-9A66-A05C9101885B}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
347 {ACD71378-4A58-4141-9A66-A05C9101885B}.VSDebug|Win32.Build.0 = VSDebug|Win32
348 {AFFAB164-A537-4271-A3B2-816A3253AC35}.Release|Win32.ActiveCfg = Release|Win32
349 {AFFAB164-A537-4271-A3B2-816A3253AC35}.Release|Win32.Build.0 = Release|Win32
350 {AFFAB164-A537-4271-A3B2-816A3253AC35}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
351 {AFFAB164-A537-4271-A3B2-816A3253AC35}.VSDebug|Win32.Build.0 = VSDebug|Win32
352 {E7AC2AB8-2946-40F9-B0B2-02CE8C96C728}.Release|Win32.ActiveCfg = Release|Win32
353 {E7AC2AB8-2946-40F9-B0B2-02CE8C96C728}.Release|Win32.Build.0 = Release|Win32
354 {E7AC2AB8-2946-40F9-B0B2-02CE8C96C728}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
355 {E7AC2AB8-2946-40F9-B0B2-02CE8C96C728}.VSDebug|Win32.Build.0 = VSDebug|Win32
356 {9419D031-C7C3-4DC1-BC5B-ECFC832B80E9}.Release|Win32.ActiveCfg = Release|Win32
357 {9419D031-C7C3-4DC1-BC5B-ECFC832B80E9}.Release|Win32.Build.0 = Release|Win32
358 {9419D031-C7C3-4DC1-BC5B-ECFC832B80E9}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
359 {9419D031-C7C3-4DC1-BC5B-ECFC832B80E9}.VSDebug|Win32.Build.0 = VSDebug|Win32
360 {A9811C8C-E212-4354-A2AB-0D1F5C632987}.Release|Win32.ActiveCfg = Release|Win32
361 {A9811C8C-E212-4354-A2AB-0D1F5C632987}.Release|Win32.Build.0 = Release|Win32
362 {A9811C8C-E212-4354-A2AB-0D1F5C632987}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
363 {A9811C8C-E212-4354-A2AB-0D1F5C632987}.VSDebug|Win32.Build.0 = VSDebug|Win32
364 {6ADF7681-DFAA-4CFF-9797-305E269B936D}.Release|Win32.ActiveCfg = Release|Win32
365 {6ADF7681-DFAA-4CFF-9797-305E269B936D}.Release|Win32.Build.0 = Release|Win32
366 {6ADF7681-DFAA-4CFF-9797-305E269B936D}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
367 {6ADF7681-DFAA-4CFF-9797-305E269B936D}.VSDebug|Win32.Build.0 = VSDebug|Win32
368 {7858071B-74A6-46C8-8A4C-DF4E1916A644}.Release|Win32.ActiveCfg = Release|Win32
369 {7858071B-74A6-46C8-8A4C-DF4E1916A644}.Release|Win32.Build.0 = Release|Win32
370 {7858071B-74A6-46C8-8A4C-DF4E1916A644}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
371 {7858071B-74A6-46C8-8A4C-DF4E1916A644}.VSDebug|Win32.Build.0 = VSDebug|Win32
372 {53632831-C7D9-4B47-8EAC-16B716277ABB}.Release|Win32.ActiveCfg = Release|Win32
373 {53632831-C7D9-4B47-8EAC-16B716277ABB}.Release|Win32.Build.0 = Release|Win32
374 {53632831-C7D9-4B47-8EAC-16B716277ABB}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
375 {53632831-C7D9-4B47-8EAC-16B716277ABB}.VSDebug|Win32.Build.0 = VSDebug|Win32
376 {A48BD72B-3F94-42DD-9382-502ED60AB150}.Release|Win32.ActiveCfg = Release|Win32
377 {A48BD72B-3F94-42DD-9382-502ED60AB150}.Release|Win32.Build.0 = Release|Win32
378 {A48BD72B-3F94-42DD-9382-502ED60AB150}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
379 {A48BD72B-3F94-42DD-9382-502ED60AB150}.VSDebug|Win32.Build.0 = VSDebug|Win32
380 {4514F4B8-9225-4C90-91ED-D65BB183BDEC}.Release|Win32.ActiveCfg = Release|Win32
381 {4514F4B8-9225-4C90-91ED-D65BB183BDEC}.Release|Win32.Build.0 = Release|Win32
382 {4514F4B8-9225-4C90-91ED-D65BB183BDEC}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
383 {4514F4B8-9225-4C90-91ED-D65BB183BDEC}.VSDebug|Win32.Build.0 = VSDebug|Win32
384 {FF226CC0-063B-4420-B88F-DDBACF5CC50C}.Release|Win32.ActiveCfg = Release|Win32
385 {FF226CC0-063B-4420-B88F-DDBACF5CC50C}.Release|Win32.Build.0 = Release|Win32
386 {FF226CC0-063B-4420-B88F-DDBACF5CC50C}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
387 {FF226CC0-063B-4420-B88F-DDBACF5CC50C}.VSDebug|Win32.Build.0 = VSDebug|Win32
388 {609F3B7C-7754-487E-87E7-D19276604C3B}.Release|Win32.ActiveCfg = Release|Win32
389 {609F3B7C-7754-487E-87E7-D19276604C3B}.Release|Win32.Build.0 = Release|Win32
390 {609F3B7C-7754-487E-87E7-D19276604C3B}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
391 {609F3B7C-7754-487E-87E7-D19276604C3B}.VSDebug|Win32.Build.0 = VSDebug|Win32
392 {B6D2D5C7-4896-4FDE-931E-AE33556252CB}.Release|Win32.ActiveCfg = Release|Win32
393 {B6D2D5C7-4896-4FDE-931E-AE33556252CB}.Release|Win32.Build.0 = Release|Win32
394 {B6D2D5C7-4896-4FDE-931E-AE33556252CB}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
395 {B6D2D5C7-4896-4FDE-931E-AE33556252CB}.VSDebug|Win32.Build.0 = VSDebug|Win32
396 {677D81DB-C708-4BB4-87C3-8EC3A85C1260}.Release|Win32.ActiveCfg = Release|Win32
397 {677D81DB-C708-4BB4-87C3-8EC3A85C1260}.Release|Win32.Build.0 = Release|Win32
398 {677D81DB-C708-4BB4-87C3-8EC3A85C1260}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
399 {677D81DB-C708-4BB4-87C3-8EC3A85C1260}.VSDebug|Win32.Build.0 = VSDebug|Win32
400 {8161CE83-108A-4863-9B51-8F1DF5B5276B}.Release|Win32.ActiveCfg = Release|Win32
401 {8161CE83-108A-4863-9B51-8F1DF5B5276B}.Release|Win32.Build.0 = Release|Win32
402 {8161CE83-108A-4863-9B51-8F1DF5B5276B}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
403 {8161CE83-108A-4863-9B51-8F1DF5B5276B}.VSDebug|Win32.Build.0 = VSDebug|Win32
404 {41748683-3F34-4770-98C5-F80103B0067A}.Release|Win32.ActiveCfg = Release|Win32
405 {41748683-3F34-4770-98C5-F80103B0067A}.Release|Win32.Build.0 = Release|Win32
406 {41748683-3F34-4770-98C5-F80103B0067A}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
407 {41748683-3F34-4770-98C5-F80103B0067A}.VSDebug|Win32.Build.0 = VSDebug|Win32
408 {67A27024-4941-4F10-BB98-F0E43625FE9B}.Release|Win32.ActiveCfg = Release|Win32
409 {67A27024-4941-4F10-BB98-F0E43625FE9B}.Release|Win32.Build.0 = Release|Win32
410 {67A27024-4941-4F10-BB98-F0E43625FE9B}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
411 {67A27024-4941-4F10-BB98-F0E43625FE9B}.VSDebug|Win32.Build.0 = VSDebug|Win32
412 {CF349A24-505E-4CE5-A4FC-90AEDC3C7E70}.Release|Win32.ActiveCfg = Release|Win32
413 {CF349A24-505E-4CE5-A4FC-90AEDC3C7E70}.Release|Win32.Build.0 = Release|Win32
414 {CF349A24-505E-4CE5-A4FC-90AEDC3C7E70}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
415 {CF349A24-505E-4CE5-A4FC-90AEDC3C7E70}.VSDebug|Win32.Build.0 = VSDebug|Win32
416 {22390A91-D782-4F25-B2BC-7C2EEF5EA6B0}.Release|Win32.ActiveCfg = Release|Win32
417 {22390A91-D782-4F25-B2BC-7C2EEF5EA6B0}.Release|Win32.Build.0 = Release|Win32
418 {22390A91-D782-4F25-B2BC-7C2EEF5EA6B0}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
419 {22390A91-D782-4F25-B2BC-7C2EEF5EA6B0}.VSDebug|Win32.Build.0 = VSDebug|Win32
420 {F4A505D3-9B12-4D25-850D-A46215904042}.Release|Win32.ActiveCfg = Release|Win32
421 {F4A505D3-9B12-4D25-850D-A46215904042}.Release|Win32.Build.0 = Release|Win32
422 {F4A505D3-9B12-4D25-850D-A46215904042}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
423 {F4A505D3-9B12-4D25-850D-A46215904042}.VSDebug|Win32.Build.0 = VSDebug|Win32
424 {66C2ADB0-19C4-4626-ABF4-F98643F56737}.Release|Win32.ActiveCfg = Release|Win32
425 {66C2ADB0-19C4-4626-ABF4-F98643F56737}.Release|Win32.Build.0 = Release|Win32
426 {66C2ADB0-19C4-4626-ABF4-F98643F56737}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
427 {66C2ADB0-19C4-4626-ABF4-F98643F56737}.VSDebug|Win32.Build.0 = VSDebug|Win32
257428 {68F145F0-053E-47A6-8F8C-740A42F2C62B}.Release|Win32.ActiveCfg = Release|Win32
258429 {68F145F0-053E-47A6-8F8C-740A42F2C62B}.Release|Win32.Build.0 = Release|Win32
259430 {68F145F0-053E-47A6-8F8C-740A42F2C62B}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
306477 {CDB03E65-C81B-47E0-B70F-C880D841DD61}.Release|Win32.Build.0 = Release|Win32
307478 {CDB03E65-C81B-47E0-B70F-C880D841DD61}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
308479 {CDB03E65-C81B-47E0-B70F-C880D841DD61}.VSDebug|Win32.Build.0 = VSDebug|Win32
309 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}.Release|Win32.ActiveCfg = Release|Win32
310 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}.Release|Win32.Build.0 = Release|Win32
311 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
312 {20FFC4C9-F44C-45F6-A827-4819B4DF3C9F}.VSDebug|Win32.Build.0 = VSDebug|Win32
313480 {BC27FF34-C859-4A1A-95D6-FC89952E1910}.Release|Win32.ActiveCfg = Release|Win32
314481 {BC27FF34-C859-4A1A-95D6-FC89952E1910}.Release|Win32.Build.0 = Release|Win32
315482 {BC27FF34-C859-4A1A-95D6-FC89952E1910}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
326493 {5304AD69-D449-4589-B2C9-E4607E56A51D}.Release|Win32.Build.0 = Release|Win32
327494 {5304AD69-D449-4589-B2C9-E4607E56A51D}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
328495 {5304AD69-D449-4589-B2C9-E4607E56A51D}.VSDebug|Win32.Build.0 = VSDebug|Win32
329 {A2B861D5-6751-43A9-B085-8D48F8754AC5}.Release|Win32.ActiveCfg = Release|Win32
330 {A2B861D5-6751-43A9-B085-8D48F8754AC5}.Release|Win32.Build.0 = Release|Win32
331 {A2B861D5-6751-43A9-B085-8D48F8754AC5}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
332 {A2B861D5-6751-43A9-B085-8D48F8754AC5}.VSDebug|Win32.Build.0 = VSDebug|Win32
333496 {F94DCC2D-2B49-453E-89B3-FD81992677D0}.Release|Win32.ActiveCfg = Release|Win32
334497 {F94DCC2D-2B49-453E-89B3-FD81992677D0}.Release|Win32.Build.0 = Release|Win32
335498 {F94DCC2D-2B49-453E-89B3-FD81992677D0}.VSDebug|Win32.ActiveCfg = VSDebug|Win32
3838 />
3939 <Tool
4040 Name="VCCLCompilerTool"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcthreads;..\..\libcdata"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBFCACHE"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcthreads;..\..\libcdata"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBFCACHE"
4343 RuntimeLibrary="2"
4444 WarningLevel="4"
4545 CompileAs="1"
100100 <Tool
101101 Name="VCCLCompilerTool"
102102 Optimization="0"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcthreads;..\..\libcdata"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBFCACHE"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcthreads;..\..\libcdata"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBFCACHE"
105105 BasicRuntimeChecks="3"
106106 SmallerTypeCheck="true"
107107 RuntimeLibrary="3"
3838 />
3939 <Tool
4040 Name="VCCLCompilerTool"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcthreads;..\..\libcdata;..\..\libcnotify;..\..\libfcache"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcthreads;..\..\libcdata;..\..\libcnotify;..\..\libfcache"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA"
4343 RuntimeLibrary="2"
4444 WarningLevel="4"
4545 CompileAs="1"
100100 <Tool
101101 Name="VCCLCompilerTool"
102102 Optimization="0"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcthreads;..\..\libcdata;..\..\libcnotify;..\..\libfcache"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcthreads;..\..\libcdata;..\..\libcnotify;..\..\libfcache"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBFCACHE;HAVE_LOCAL_LIBFDATA"
105105 BasicRuntimeChecks="3"
106106 SmallerTypeCheck="true"
107107 RuntimeLibrary="3"
3838 />
3939 <Tool
4040 Name="VCCLCompilerTool"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBFDATETIME"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBFDATETIME"
4343 RuntimeLibrary="2"
4444 WarningLevel="4"
4545 CompileAs="1"
100100 <Tool
101101 Name="VCCLCompilerTool"
102102 Optimization="0"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBFDATETIME"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBFDATETIME"
105105 BasicRuntimeChecks="3"
106106 SmallerTypeCheck="true"
107107 RuntimeLibrary="3"
232232 >
233233 </File>
234234 <File
235 RelativePath="..\..\libfdatetime\libfdatetime_libcstring.h"
236 >
237 </File>
238 <File
239235 RelativePath="..\..\libfdatetime\libfdatetime_nsf_timedate.h"
240236 >
241237 </File>
3838 />
3939 <Tool
4040 Name="VCCLCompilerTool"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBFGUID"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBFGUID"
4343 RuntimeLibrary="2"
4444 WarningLevel="4"
4545 CompileAs="1"
100100 <Tool
101101 Name="VCCLCompilerTool"
102102 Optimization="0"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBFGUID"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBFGUID"
105105 BasicRuntimeChecks="3"
106106 SmallerTypeCheck="true"
107107 RuntimeLibrary="3"
188188 >
189189 </File>
190190 <File
191 RelativePath="..\..\libfguid\libfguid_libcstring.h"
192 >
193 </File>
194 <File
195191 RelativePath="..\..\libfguid\libfguid_support.h"
196192 >
197193 </File>
3838 />
3939 <Tool
4040 Name="VCCLCompilerTool"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcdata;..\..\libcthreads;..\..\libcnotify;..\..\libuna;..\..\libfdatetime;..\..\libfguid;..\..\libfwnt"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBFMAPI"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libcthreads;..\..\libcnotify;..\..\libuna;..\..\libfdatetime;..\..\libfguid;..\..\libfwnt"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBFMAPI"
4343 RuntimeLibrary="2"
4444 WarningLevel="4"
4545 CompileAs="1"
100100 <Tool
101101 Name="VCCLCompilerTool"
102102 Optimization="0"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcdata;..\..\libcthreads;..\..\libcnotify;..\..\libuna;..\..\libfdatetime;..\..\libfguid;..\..\libfwnt"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBFMAPI"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libcthreads;..\..\libcnotify;..\..\libuna;..\..\libfdatetime;..\..\libfguid;..\..\libfwnt"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBFMAPI"
105105 BasicRuntimeChecks="3"
106106 SmallerTypeCheck="true"
107107 RuntimeLibrary="3"
190190 >
191191 </File>
192192 <File
193 RelativePath="..\..\libfmapi\libfmapi_support.c"
194 >
195 </File>
196 <File
193197 RelativePath="..\..\libfmapi\libfmapi_value_type.c"
194198 >
195199 </File>
240244 >
241245 </File>
242246 <File
243 RelativePath="..\..\libfmapi\libfmapi_libcstring.h"
244 >
245 </File>
246 <File
247247 RelativePath="..\..\libfmapi\libfmapi_libfdatetime.h"
248248 >
249249 </File>
273273 </File>
274274 <File
275275 RelativePath="..\..\libfmapi\libfmapi_service_provider_identifier.h"
276 >
277 </File>
278 <File
279 RelativePath="..\..\libfmapi\libfmapi_support.h"
276280 >
277281 </File>
278282 <File
3838 />
3939 <Tool
4040 Name="VCCLCompilerTool"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcthreads;..\..\libcdata;..\..\libcnotify;..\..\libuna;..\..\libfdatetime;..\..\libfguid;..\..\libfwnt"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBFVALUE"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcthreads;..\..\libcdata;..\..\libcnotify;..\..\libuna;..\..\libfdatetime;..\..\libfguid;..\..\libfwnt"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBFVALUE"
4343 RuntimeLibrary="2"
4444 WarningLevel="4"
4545 CompileAs="1"
100100 <Tool
101101 Name="VCCLCompilerTool"
102102 Optimization="0"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcthreads;..\..\libcdata;..\..\libcnotify;..\..\libuna;..\..\libfdatetime;..\..\libfguid;..\..\libfwnt"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBFVALUE"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcthreads;..\..\libcdata;..\..\libcnotify;..\..\libuna;..\..\libfdatetime;..\..\libfguid;..\..\libfwnt"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBFDATETIME;HAVE_LOCAL_LIBFGUID;HAVE_LOCAL_LIBFWNT;HAVE_LOCAL_LIBFVALUE"
105105 BasicRuntimeChecks="3"
106106 SmallerTypeCheck="true"
107107 RuntimeLibrary="3"
256256 >
257257 </File>
258258 <File
259 RelativePath="..\..\libfvalue\libfvalue_libcstring.h"
260 >
261 </File>
262 <File
263259 RelativePath="..\..\libfvalue\libfvalue_libfdatetime.h"
264260 >
265261 </File>
3838 />
3939 <Tool
4040 Name="VCCLCompilerTool"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcthreads;..\..\libcdata;..\..\libcnotify"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBFWNT"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcthreads;..\..\libcdata;..\..\libcnotify"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBFWNT"
4343 RuntimeLibrary="2"
4444 WarningLevel="4"
4545 CompileAs="1"
100100 <Tool
101101 Name="VCCLCompilerTool"
102102 Optimization="0"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcthreads;..\..\libcdata;..\..\libcnotify"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBFWNT"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcthreads;..\..\libcdata;..\..\libcnotify"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCTHREADS;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBFWNT"
105105 BasicRuntimeChecks="3"
106106 SmallerTypeCheck="true"
107107 RuntimeLibrary="3"
240240 >
241241 </File>
242242 <File
243 RelativePath="..\..\libfwnt\libfwnt_libcstring.h"
244 >
245 </File>
246 <File
247243 RelativePath="..\..\libfwnt\libfwnt_locale_identifier.h"
248244 >
249245 </File>
3838 />
3939 <Tool
4040 Name="VCCLCompilerTool"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcnotify"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBMAPIDB"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcnotify"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBMAPIDB"
4343 RuntimeLibrary="2"
4444 WarningLevel="4"
4545 CompileAs="1"
100100 <Tool
101101 Name="VCCLCompilerTool"
102102 Optimization="0"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcnotify"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBMAPIDB"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcnotify"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCNOTIFY;HAVE_LOCAL_LIBMAPIDB"
105105 BasicRuntimeChecks="3"
106106 SmallerTypeCheck="true"
107107 RuntimeLibrary="3"
200200 >
201201 </File>
202202 <File
203 RelativePath="..\..\libmapidb\libmapidb_libcstring.h"
204 >
205 </File>
206 <File
207203 RelativePath="..\..\libmapidb\libmapidb_support.h"
208204 >
209205 </File>
3838 />
3939 <Tool
4040 Name="VCCLCompilerTool"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBUNA"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBUNA"
4343 RuntimeLibrary="2"
4444 WarningLevel="4"
4545 CompileAs="1"
100100 <Tool
101101 Name="VCCLCompilerTool"
102102 Optimization="0"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBUNA"
103 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror"
104 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBUNA"
105105 BasicRuntimeChecks="3"
106106 SmallerTypeCheck="true"
107107 RuntimeLibrary="3"
3838 />
3939 <Tool
4040 Name="VCCLCompilerTool"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;C:\Python27\include"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;LIBESEDB_DLL_IMPORT"
41 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;C:\Python27\include"
42 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;LIBESEDB_DLL_IMPORT"
4343 RuntimeLibrary="2"
4444 WarningLevel="4"
4545 CompileAs="1"
109109 <Tool
110110 Name="VCCLCompilerTool"
111111 Optimization="0"
112 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcstring;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;C:\Python27\include"
113 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCSTRING;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;LIBESEDB_DLL_IMPORT"
112 AdditionalIncludeDirectories="..\..\include;..\..\common;..\..\libcerror;..\..\libcdata;..\..\libclocale;..\..\libuna;..\..\libcfile;..\..\libcpath;..\..\libbfio;C:\Python27\include"
113 PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;HAVE_LOCAL_LIBCERROR;HAVE_LOCAL_LIBCDATA;HAVE_LOCAL_LIBCLOCALE;HAVE_LOCAL_LIBUNA;HAVE_LOCAL_LIBCFILE;HAVE_LOCAL_LIBCPATH;HAVE_LOCAL_LIBBFIO;LIBESEDB_DLL_IMPORT"
114114 BasicRuntimeChecks="3"
115115 SmallerTypeCheck="true"
116116 RuntimeLibrary="3"
201201 >
202202 </File>
203203 <File
204 RelativePath="..\..\pyesedb\pyesedb_file_types.c"
205 >
206 </File>
207 <File
204208 RelativePath="..\..\pyesedb\pyesedb_index.c"
205209 >
206210 </File>
279283 >
280284 </File>
281285 <File
286 RelativePath="..\..\pyesedb\pyesedb_file_types.h"
287 >
288 </File>
289 <File
282290 RelativePath="..\..\pyesedb\pyesedb_index.h"
283291 >
284292 </File>
300308 </File>
301309 <File
302310 RelativePath="..\..\pyesedb\pyesedb_libclocale.h"
303 >
304 </File>
305 <File
306 RelativePath="..\..\pyesedb\pyesedb_libcstring.h"
307311 >
308312 </File>
309313 <File
+0
-28
msvscpp/scripts/vs2008_x64.sh less more
0 #!/bin/bash
1 # Script to add x64 platform to msvscpp 2008 files
2 #
3 # Version: 20130113
4
5 EXIT_FAILURE=1;
6 EXIT_SUCCESS=0;
7
8 if [ ! -x "/usr/bin/find" ] || [ ! -x "/usr/bin/sed" ];
9 then
10 echo "Unable to find: /usr/bin/find and /usr/bin/sed.";
11
12 exit ${EXIT_FAILURE};
13 fi
14
15 if [ ! -e "msvscpp/scripts/vs2008_x64_sln.sed" ] || [ ! -e "msvscpp/scripts/vs2008_x64_vcproj.sed" ];
16 then
17 echo "Unable to find the sed scripts.";
18 echo "Are you running the script from the source directory?";
19
20 exit ${EXIT_FAILURE};
21 fi
22
23 /usr/bin/find msvscpp/ -name \*.sln -exec /usr/bin/sed -b -f msvscpp/scripts/vs2008_x64_sln.sed -i {} \;
24 /usr/bin/find msvscpp/ -name \*.vcproj -exec /usr/bin/sed -b -f msvscpp/scripts/vs2008_x64_vcproj.sed -i {} \;
25
26 exit ${EXIT_SUCCESS};
27
+0
-28
msvscpp/scripts/vs2008_x64_sln.sed less more
0 /GlobalSection(SolutionConfigurationPlatforms) = preSolution/ {
1 n
2 h
3 :loop1
4 n
5 /EndGlobalSection/ !{
6 H
7 b loop1
8 }
9 x
10 s/Win32/x64/g
11 a \ EndGlobalSection\r
12 }
13
14 /GlobalSection(ProjectConfigurationPlatforms) = postSolution/ {
15 n
16 h
17 :loop2
18 n
19 /EndGlobalSection/ !{
20 H
21 b loop2
22 }
23 x
24 s/Win32/x64/g
25 a \ EndGlobalSection\r
26 }
27
+0
-25
msvscpp/scripts/vs2008_x64_vcproj.sed less more
0 /<\/Platforms>/ {
1 i \ \ <Platform\r
2 i \ \ \ Name="x64"\r
3 i \ \ />\r
4 }
5
6 /<Configurations>/ {
7 n
8 h
9 :loop1
10 n
11 /<\/Configurations>/ !{
12 s/OutputDirectory="\$(SolutionDir)\$(ConfigurationName)"/OutputDirectory="\$(SolutionDir)\$(ConfigurationName)\\\$(PlatformName)"/
13 s/IntermediateDirectory="\$(ConfigurationName)"/IntermediateDirectory="\$(ConfigurationName)\\\$(PlatformName)"/
14 H
15 b loop1
16 }
17 x
18 s/OutputDirectory="\$(SolutionDir)\$(ConfigurationName)"/OutputDirectory="\$(SolutionDir)\$(ConfigurationName)\\\$(PlatformName)"/g
19 s/IntermediateDirectory="\$(ConfigurationName)"/IntermediateDirectory="\$(ConfigurationName)\\\$(PlatformName)"/g
20 s/TargetMachine=1/TargetMachine=3/g
21 s/Win32/x64/g
22 a \ </Configurations>\r
23 }
24
+0
-28
msvscpp/scripts/vs2010_x64.sh less more
0 #!/bin/bash
1 # Script to add x64 platform to msvscpp 2010 files
2 #
3 # Version: 20130113
4
5 EXIT_FAILURE=1;
6 EXIT_SUCCESS=0;
7
8 if [ ! -x "/usr/bin/find" ] || [ ! -x "/usr/bin/sed" ];
9 then
10 echo "Unable to find: /usr/bin/find and /usr/bin/sed.";
11
12 exit ${EXIT_FAILURE};
13 fi
14
15 if [ ! -e "msvscpp/scripts/vs2010_x64_sln.sed" ] || [ ! -e "msvscpp/scripts/vs2010_x64_vcxproj.sed" ];
16 then
17 echo "Unable to find the sed scripts.";
18 echo "Are you running the script from the source directory?";
19
20 exit ${EXIT_FAILURE};
21 fi
22
23 /usr/bin/find msvscpp/ -name \*.sln -exec /usr/bin/sed -b -f msvscpp/scripts/vs2010_x64_sln.sed -i {} \;
24 /usr/bin/find msvscpp/ -name \*.vcxproj -exec /usr/bin/sed -b -f msvscpp/scripts/vs2010_x64_vcxproj.sed -i {} \;
25
26 exit ${EXIT_SUCCESS};
27
+0
-28
msvscpp/scripts/vs2010_x64_sln.sed less more
0 /GlobalSection(SolutionConfigurationPlatforms) = preSolution/ {
1 n
2 h
3 :loop1
4 n
5 /EndGlobalSection/ !{
6 H
7 b loop1
8 }
9 x
10 s/Win32/x64/g
11 a \ EndGlobalSection\r
12 }
13
14 /GlobalSection(ProjectConfigurationPlatforms) = postSolution/ {
15 n
16 h
17 :loop2
18 n
19 /EndGlobalSection/ !{
20 H
21 b loop2
22 }
23 x
24 s/Win32/x64/g
25 a \ EndGlobalSection\r
26 }
27
+0
-76
msvscpp/scripts/vs2010_x64_vcxproj.sed less more
0 /<ProjectConfiguration/ {
1 h
2 :loop1
3 n
4 /<\/ProjectConfiguration>/ !{
5 H
6 b loop1
7 }
8 p
9 x
10 s/Win32/x64/g
11 a \ \ \ \ </ProjectConfiguration>\r
12 }
13
14 /<PropertyGroup.*Label="Configuration"/ {
15 h
16 :loop2
17 n
18 /<\/PropertyGroup>/ !{
19 H
20 b loop2
21 }
22 p
23 x
24 s/Win32/x64/g
25 a \ \ \ \ <PlatformToolset>Windows7.1SDK</PlatformToolset>\r
26 a \ \ </PropertyGroup>\r
27 }
28
29 /<ImportGroup.*Label="PropertySheets">/ {
30 h
31 :loop3
32 n
33 /<\/ImportGroup>/ !{
34 H
35 b loop3
36 }
37 p
38 x
39 s/Win32/x64/g
40 a \ \ </ImportGroup>\r
41 }
42
43 /<OutDir / {
44 p
45 s/Win32/x64/g
46 }
47
48 /<IntDir / {
49 p
50 s/Win32/x64/g
51 }
52
53 /<LinkIncremental / {
54 p
55 s/Win32/x64/g
56 }
57
58 /<ItemDefinitionGroup/ {
59 h
60 :loop4
61 n
62 /<\/ItemDefinitionGroup>/ !{
63 /<\/Link>/ {
64 i \ \ \ \ \ \ <TargetMachine>MachineX86</TargetMachine>\r
65 }
66 H
67 b loop4
68 }
69 p
70 x
71 s/Win32/x64/g
72 s/MachineX86/MachineX64/g
73 a \ \ </ItemDefinitionGroup>\r
74 }
75
0 2010-07-30 gettextize <bug-gnu-gettext@gnu.org>
1
2 * Makefile.in.in: New file, from gettext-0.17.
3 * boldquot.sed: New file, from gettext-0.17.
4 * en@boldquot.header: New file, from gettext-0.17.
5 * en@quot.header: New file, from gettext-0.17.
6 * insert-header.sin: New file, from gettext-0.17.
7 * quot.sed: New file, from gettext-0.17.
8 * remove-potcdate.sin: New file, from gettext-0.17.
9 * Rules-quot: New file, from gettext-0.17.
10 * POTFILES.in: New file.
11
0 2016-11-04 gettextize <bug-gnu-gettext@gnu.org>
11 AM_CFLAGS = \
22 -I$(top_srcdir)/include \
33 -I$(top_srcdir)/common \
4 @LIBCSTRING_CPPFLAGS@ \
54 @LIBCERROR_CPPFLAGS@ \
65 @LIBCDATA_CPPFLAGS@ \
76 @LIBCLOCALE_CPPFLAGS@ \
2120 pyesedb_error.c pyesedb_error.h \
2221 pyesedb_file.c pyesedb_file.h \
2322 pyesedb_file_object_io_handle.c pyesedb_file_object_io_handle.h \
23 pyesedb_file_types.c pyesedb_file_types.h \
2424 pyesedb_index.c pyesedb_index.h \
2525 pyesedb_indexes.c pyesedb_indexes.h \
2626 pyesedb_integer.c pyesedb_integer.h \
2727 pyesedb_libbfio.h \
2828 pyesedb_libcerror.h \
2929 pyesedb_libclocale.h \
30 pyesedb_libcstring.h \
3130 pyesedb_libesedb.h \
3231 pyesedb_long_value.c pyesedb_long_value.h \
3332 pyesedb_multi_value.c pyesedb_multi_value.h \
4039 pyesedb_value_flags.c pyesedb_value_flags.h
4140
4241 pyesedb_la_LIBADD = \
43 @LIBCSTRING_LIBADD@ \
4442 @LIBCERROR_LIBADD@ \
4543 ../libesedb/libesedb.la \
4644 @LIBCDATA_LIBADD@ \
9797 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9898 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9999 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101100 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102101 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103102 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
108107 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109108 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110109 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
110 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
111 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
113112 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114113 $(ACLOCAL_M4)
115114 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
152151 pyesedb_columns.c pyesedb_columns.h pyesedb_datetime.c \
153152 pyesedb_datetime.h pyesedb_error.c pyesedb_error.h \
154153 pyesedb_file.c pyesedb_file.h pyesedb_file_object_io_handle.c \
155 pyesedb_file_object_io_handle.h pyesedb_index.c \
156 pyesedb_index.h pyesedb_indexes.c pyesedb_indexes.h \
157 pyesedb_integer.c pyesedb_integer.h pyesedb_libbfio.h \
158 pyesedb_libcerror.h pyesedb_libclocale.h pyesedb_libcstring.h \
159 pyesedb_libesedb.h pyesedb_long_value.c pyesedb_long_value.h \
160 pyesedb_multi_value.c pyesedb_multi_value.h pyesedb_python.h \
161 pyesedb_record.c pyesedb_record.h pyesedb_records.c \
162 pyesedb_records.h pyesedb_table.c pyesedb_table.h \
163 pyesedb_tables.c pyesedb_tables.h pyesedb_unused.h \
164 pyesedb_value_flags.c pyesedb_value_flags.h
154 pyesedb_file_object_io_handle.h pyesedb_file_types.c \
155 pyesedb_file_types.h pyesedb_index.c pyesedb_index.h \
156 pyesedb_indexes.c pyesedb_indexes.h pyesedb_integer.c \
157 pyesedb_integer.h pyesedb_libbfio.h pyesedb_libcerror.h \
158 pyesedb_libclocale.h pyesedb_libesedb.h pyesedb_long_value.c \
159 pyesedb_long_value.h pyesedb_multi_value.c \
160 pyesedb_multi_value.h pyesedb_python.h pyesedb_record.c \
161 pyesedb_record.h pyesedb_records.c pyesedb_records.h \
162 pyesedb_table.c pyesedb_table.h pyesedb_tables.c \
163 pyesedb_tables.h pyesedb_unused.h pyesedb_value_flags.c \
164 pyesedb_value_flags.h
165165 @HAVE_PYTHON_TRUE@am_pyesedb_la_OBJECTS = pyesedb_la-pyesedb.lo \
166166 @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_column.lo \
167167 @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_column_types.lo \
170170 @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_error.lo \
171171 @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_file.lo \
172172 @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_file_object_io_handle.lo \
173 @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_file_types.lo \
173174 @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_index.lo \
174175 @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_indexes.lo \
175176 @HAVE_PYTHON_TRUE@ pyesedb_la-pyesedb_integer.lo \
292293 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
293294 HAVE_LIBCPATH = @HAVE_LIBCPATH@
294295 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
295 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
296 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
297296 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
298297 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
299298 HAVE_LIBFDATA = @HAVE_LIBFDATA@
312311 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
313312 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
314313 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
315 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
316 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
317314 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
318315 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
319316 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
360357 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
361358 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
362359 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
363 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
364 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
365 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
366 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
367360 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
368361 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
369362 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
396389 LTLIBICONV = @LTLIBICONV@
397390 LTLIBINTL = @LTLIBINTL@
398391 LTLIBOBJS = @LTLIBOBJS@
392 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
399393 MAKEINFO = @MAKEINFO@
400394 MANIFEST_TOOL = @MANIFEST_TOOL@
401395 MKDIR_P = @MKDIR_P@
502496 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
503497 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
504498 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
505 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
506 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
507 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
508 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
509 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
510 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
511499 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
512500 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
513501 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
576564 libcpath_LIBS = @libcpath_LIBS@
577565 libcsplit_CFLAGS = @libcsplit_CFLAGS@
578566 libcsplit_LIBS = @libcsplit_LIBS@
579 libcstring_CFLAGS = @libcstring_CFLAGS@
580 libcstring_LIBS = @libcstring_LIBS@
581 libcsystem_CFLAGS = @libcsystem_CFLAGS@
582 libcsystem_LIBS = @libcsystem_LIBS@
583567 libcthreads_CFLAGS = @libcthreads_CFLAGS@
584568 libcthreads_LIBS = @libcthreads_LIBS@
585569 libdir = @libdir@
631615 @HAVE_PYTHON_TRUE@AM_CFLAGS = \
632616 @HAVE_PYTHON_TRUE@ -I$(top_srcdir)/include \
633617 @HAVE_PYTHON_TRUE@ -I$(top_srcdir)/common \
634 @HAVE_PYTHON_TRUE@ @LIBCSTRING_CPPFLAGS@ \
635618 @HAVE_PYTHON_TRUE@ @LIBCERROR_CPPFLAGS@ \
636619 @HAVE_PYTHON_TRUE@ @LIBCDATA_CPPFLAGS@ \
637620 @HAVE_PYTHON_TRUE@ @LIBCLOCALE_CPPFLAGS@ \
650633 @HAVE_PYTHON_TRUE@ pyesedb_error.c pyesedb_error.h \
651634 @HAVE_PYTHON_TRUE@ pyesedb_file.c pyesedb_file.h \
652635 @HAVE_PYTHON_TRUE@ pyesedb_file_object_io_handle.c pyesedb_file_object_io_handle.h \
636 @HAVE_PYTHON_TRUE@ pyesedb_file_types.c pyesedb_file_types.h \
653637 @HAVE_PYTHON_TRUE@ pyesedb_index.c pyesedb_index.h \
654638 @HAVE_PYTHON_TRUE@ pyesedb_indexes.c pyesedb_indexes.h \
655639 @HAVE_PYTHON_TRUE@ pyesedb_integer.c pyesedb_integer.h \
656640 @HAVE_PYTHON_TRUE@ pyesedb_libbfio.h \
657641 @HAVE_PYTHON_TRUE@ pyesedb_libcerror.h \
658642 @HAVE_PYTHON_TRUE@ pyesedb_libclocale.h \
659 @HAVE_PYTHON_TRUE@ pyesedb_libcstring.h \
660643 @HAVE_PYTHON_TRUE@ pyesedb_libesedb.h \
661644 @HAVE_PYTHON_TRUE@ pyesedb_long_value.c pyesedb_long_value.h \
662645 @HAVE_PYTHON_TRUE@ pyesedb_multi_value.c pyesedb_multi_value.h \
669652 @HAVE_PYTHON_TRUE@ pyesedb_value_flags.c pyesedb_value_flags.h
670653
671654 @HAVE_PYTHON_TRUE@pyesedb_la_LIBADD = \
672 @HAVE_PYTHON_TRUE@ @LIBCSTRING_LIBADD@ \
673655 @HAVE_PYTHON_TRUE@ @LIBCERROR_LIBADD@ \
674656 @HAVE_PYTHON_TRUE@ ../libesedb/libesedb.la \
675657 @HAVE_PYTHON_TRUE@ @LIBCDATA_LIBADD@ \
769751 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_error.Plo@am__quote@
770752 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_file.Plo@am__quote@
771753 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_file_object_io_handle.Plo@am__quote@
754 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_file_types.Plo@am__quote@
772755 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_index.Plo@am__quote@
773756 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_indexes.Plo@am__quote@
774757 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_integer.Plo@am__quote@
856839 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb_file_object_io_handle.c' object='pyesedb_la-pyesedb_file_object_io_handle.lo' libtool=yes @AMDEPBACKSLASH@
857840 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
858841 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb_file_object_io_handle.lo `test -f 'pyesedb_file_object_io_handle.c' || echo '$(srcdir)/'`pyesedb_file_object_io_handle.c
842
843 pyesedb_la-pyesedb_file_types.lo: pyesedb_file_types.c
844 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb_file_types.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb_file_types.Tpo -c -o pyesedb_la-pyesedb_file_types.lo `test -f 'pyesedb_file_types.c' || echo '$(srcdir)/'`pyesedb_file_types.c
845 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyesedb_la-pyesedb_file_types.Tpo $(DEPDIR)/pyesedb_la-pyesedb_file_types.Plo
846 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb_file_types.c' object='pyesedb_la-pyesedb_file_types.lo' libtool=yes @AMDEPBACKSLASH@
847 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
848 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb_file_types.lo `test -f 'pyesedb_file_types.c' || echo '$(srcdir)/'`pyesedb_file_types.c
859849
860850 pyesedb_la-pyesedb_index.lo: pyesedb_index.c
861851 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb_index.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb_index.Tpo -c -o pyesedb_la-pyesedb_index.lo `test -f 'pyesedb_index.c' || echo '$(srcdir)/'`pyesedb_index.c
00 /*
11 * Python bindings module for libesedb (pyesedb)
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
1919 */
2020
2121 #include <common.h>
22 #include <narrow_string.h>
2223 #include <types.h>
2324
2425 #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI )
3334 #include "pyesedb_file.h"
3435 #include "pyesedb_file_object_io_handle.h"
3536 #include "pyesedb_libcerror.h"
36 #include "pyesedb_libcstring.h"
3737 #include "pyesedb_libesedb.h"
3838 #include "pyesedb_long_value.h"
3939 #include "pyesedb_multi_value.h"
117117
118118 Py_END_ALLOW_THREADS
119119
120 version_string_length = libcstring_narrow_string_length(
120 version_string_length = narrow_string_length(
121121 version_string );
122122
123123 /* Pass the string length to PyUnicode_DecodeUTF8
145145 const char *filename_narrow = NULL;
146146 int result = 0;
147147
148 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
148 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
149149 const wchar_t *filename_wide = NULL;
150150 #else
151151 PyObject *utf8_string_object = NULL;
186186 {
187187 PyErr_Clear();
188188
189 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
189 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
190190 filename_wide = (wchar_t *) PyUnicode_AsUnicode(
191191 string_object );
192192 Py_BEGIN_ALLOW_THREADS
00 /*
11 * Python bindings for libesedb (pyesedb)
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
5656 }
5757 #endif
5858
59 #endif
59 #endif /* !defined( _PYESEDB_H ) */
6060
00 /*
1 * Python object definition of the libesedb column
1 * Python object wrapper of libesedb_column_t
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2727
2828 #include "pyesedb_column.h"
2929 #include "pyesedb_error.h"
30 #include "pyesedb_integer.h"
3130 #include "pyesedb_libcerror.h"
32 #include "pyesedb_libcstring.h"
3331 #include "pyesedb_libesedb.h"
3432 #include "pyesedb_python.h"
3533 #include "pyesedb_unused.h"
3634
3735 PyMethodDef pyesedb_column_object_methods[] = {
3836
39 /* Functions to access the column values */
40
4137 { "get_identifier",
4238 (PyCFunction) pyesedb_column_get_identifier,
4339 METH_NOARGS,
44 "get_identifier() -> Integer\n"
40 "get_identifier() -> Integer or None\n"
4541 "\n"
4642 "Retrieves the identifier." },
4743
4844 { "get_type",
4945 (PyCFunction) pyesedb_column_get_type,
5046 METH_NOARGS,
51 "get_type() -> Integer\n"
47 "get_type() -> Integer or None\n"
5248 "\n"
5349 "Retrieves the type." },
5450
5551 { "get_name",
5652 (PyCFunction) pyesedb_column_get_name,
5753 METH_NOARGS,
58 "get_name() -> Unicode string\n"
54 "get_name() -> Unicode string or None\n"
5955 "\n"
6056 "Retrieves the name." },
6157
186182 * Returns a Python object if successful or NULL on error
187183 */
188184 PyObject *pyesedb_column_new(
185 PyTypeObject *type_object,
189186 libesedb_column_t *column,
190 pyesedb_table_t *table_object )
187 PyObject *parent_object )
191188 {
192189 pyesedb_column_t *pyesedb_column = NULL;
193190 static char *function = "pyesedb_column_new";
195192 if( column == NULL )
196193 {
197194 PyErr_Format(
198 PyExc_TypeError,
195 PyExc_ValueError,
199196 "%s: invalid column.",
200197 function );
201198
203200 }
204201 pyesedb_column = PyObject_New(
205202 struct pyesedb_column,
206 &pyesedb_column_type_object );
203 type_object );
207204
208205 if( pyesedb_column == NULL )
209206 {
224221
225222 goto on_error;
226223 }
227 pyesedb_column->column = column;
228 pyesedb_column->table_object = table_object;
224 pyesedb_column->column = column;
225 pyesedb_column->parent_object = parent_object;
229226
230227 Py_IncRef(
231 (PyObject *) pyesedb_column->table_object );
228 (PyObject *) pyesedb_column->parent_object );
232229
233230 return( (PyObject *) pyesedb_column );
234231
252249 if( pyesedb_column == NULL )
253250 {
254251 PyErr_Format(
255 PyExc_TypeError,
252 PyExc_ValueError,
256253 "%s: invalid column.",
257254 function );
258255
270267 void pyesedb_column_free(
271268 pyesedb_column_t *pyesedb_column )
272269 {
270 struct _typeobject *ob_type = NULL;
273271 libcerror_error_t *error = NULL;
274 struct _typeobject *ob_type = NULL;
275272 static char *function = "pyesedb_column_free";
273 int result = 0;
276274
277275 if( pyesedb_column == NULL )
278276 {
279277 PyErr_Format(
280 PyExc_TypeError,
278 PyExc_ValueError,
281279 "%s: invalid column.",
282280 function );
283281
286284 if( pyesedb_column->column == NULL )
287285 {
288286 PyErr_Format(
289 PyExc_TypeError,
287 PyExc_ValueError,
290288 "%s: invalid column - missing libesedb column.",
291289 function );
292290
313311
314312 return;
315313 }
316 if( libesedb_column_free(
317 &( pyesedb_column->column ),
318 &error ) != 1 )
314 Py_BEGIN_ALLOW_THREADS
315
316 result = libesedb_column_free(
317 &( pyesedb_column->column ),
318 &error );
319
320 Py_END_ALLOW_THREADS
321
322 if( result != 1 )
319323 {
320324 pyesedb_error_raise(
321325 error,
326330 libcerror_error_free(
327331 &error );
328332 }
329 if( pyesedb_column->table_object != NULL )
333 if( pyesedb_column->parent_object != NULL )
330334 {
331335 Py_DecRef(
332 (PyObject *) pyesedb_column->table_object );
336 (PyObject *) pyesedb_column->parent_object );
333337 }
334338 ob_type->tp_free(
335339 (PyObject*) pyesedb_column );
342346 pyesedb_column_t *pyesedb_column,
343347 PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED )
344348 {
349 PyObject *integer_object = NULL;
345350 libcerror_error_t *error = NULL;
346 PyObject *integer_object = NULL;
347351 static char *function = "pyesedb_column_get_identifier";
348 uint32_t identifier = 0;
352 uint32_t value_32bit = 0;
349353 int result = 0;
350354
351355 PYESEDB_UNREFERENCED_PARAMETER( arguments )
353357 if( pyesedb_column == NULL )
354358 {
355359 PyErr_Format(
356 PyExc_TypeError,
360 PyExc_ValueError,
357361 "%s: invalid column.",
358362 function );
359363
363367
364368 result = libesedb_column_get_identifier(
365369 pyesedb_column->column,
366 &identifier,
370 &value_32bit,
367371 &error );
368372
369373 Py_END_ALLOW_THREADS
370374
371 if( result != 1 )
375 if( result == -1 )
372376 {
373377 pyesedb_error_raise(
374378 error,
381385
382386 return( NULL );
383387 }
384 integer_object = pyesedb_integer_unsigned_new_from_64bit(
385 (uint64_t) identifier );
388 else if( result == 0 )
389 {
390 Py_IncRef(
391 Py_None );
392
393 return( Py_None );
394 }
395 integer_object = PyLong_FromUnsignedLong(
396 (unsigned long) value_32bit );
386397
387398 return( integer_object );
388399 }
394405 pyesedb_column_t *pyesedb_column,
395406 PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED )
396407 {
408 PyObject *integer_object = NULL;
397409 libcerror_error_t *error = NULL;
398 PyObject *integer_object = NULL;
399410 static char *function = "pyesedb_column_get_type";
400 uint32_t type = 0;
411 uint32_t value_32bit = 0;
401412 int result = 0;
402413
403414 PYESEDB_UNREFERENCED_PARAMETER( arguments )
405416 if( pyesedb_column == NULL )
406417 {
407418 PyErr_Format(
408 PyExc_TypeError,
419 PyExc_ValueError,
409420 "%s: invalid column.",
410421 function );
411422
415426
416427 result = libesedb_column_get_type(
417428 pyesedb_column->column,
418 &type,
429 &value_32bit,
419430 &error );
420431
421432 Py_END_ALLOW_THREADS
422433
423 if( result != 1 )
434 if( result == -1 )
424435 {
425436 pyesedb_error_raise(
426437 error,
433444
434445 return( NULL );
435446 }
436 integer_object = pyesedb_integer_unsigned_new_from_64bit(
437 (uint64_t) type );
447 else if( result == 0 )
448 {
449 Py_IncRef(
450 Py_None );
451
452 return( Py_None );
453 }
454 integer_object = PyLong_FromUnsignedLong(
455 (unsigned long) value_32bit );
438456
439457 return( integer_object );
440458 }
446464 pyesedb_column_t *pyesedb_column,
447465 PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED )
448466 {
467 PyObject *string_object = NULL;
449468 libcerror_error_t *error = NULL;
450 PyObject *string_object = NULL;
451469 const char *errors = NULL;
452 uint8_t *name = NULL;
453470 static char *function = "pyesedb_column_get_name";
454 size_t name_size = 0;
471 char *utf8_string = NULL;
472 size_t utf8_string_size = 0;
455473 int result = 0;
456474
457475 PYESEDB_UNREFERENCED_PARAMETER( arguments )
459477 if( pyesedb_column == NULL )
460478 {
461479 PyErr_Format(
462 PyExc_TypeError,
480 PyExc_ValueError,
463481 "%s: invalid column.",
464482 function );
465483
469487
470488 result = libesedb_column_get_utf8_name_size(
471489 pyesedb_column->column,
472 &name_size,
490 &utf8_string_size,
473491 &error );
474492
475493 Py_END_ALLOW_THREADS
479497 pyesedb_error_raise(
480498 error,
481499 PyExc_IOError,
482 "%s: unable to retrieve name size.",
500 "%s: unable to determine size of name as UTF-8 string.",
483501 function );
484502
485503 libcerror_error_free(
488506 goto on_error;
489507 }
490508 else if( ( result == 0 )
491 || ( name_size == 0 ) )
509 || ( utf8_string_size == 0 ) )
492510 {
493511 Py_IncRef(
494512 Py_None );
495513
496514 return( Py_None );
497515 }
498 name = (uint8_t *) PyMem_Malloc(
499 sizeof( uint8_t ) * name_size );
500
501 if( name == NULL )
502 {
503 PyErr_Format(
504 PyExc_IOError,
505 "%s: unable to create name.",
516 utf8_string = (char *) PyMem_Malloc(
517 sizeof( char ) * utf8_string_size );
518
519 if( utf8_string == NULL )
520 {
521 PyErr_Format(
522 PyExc_MemoryError,
523 "%s: unable to create UTF-8 string.",
506524 function );
507525
508526 goto on_error;
510528 Py_BEGIN_ALLOW_THREADS
511529
512530 result = libesedb_column_get_utf8_name(
513 pyesedb_column->column,
514 name,
515 name_size,
516 &error );
531 pyesedb_column->column,
532 (uint8_t *) utf8_string,
533 utf8_string_size,
534 &error );
517535
518536 Py_END_ALLOW_THREADS
519537
522540 pyesedb_error_raise(
523541 error,
524542 PyExc_IOError,
525 "%s: unable to retrieve name.",
543 "%s: unable to retrieve name as UTF-8 string.",
526544 function );
527545
528546 libcerror_error_free(
530548
531549 goto on_error;
532550 }
533 /* Pass the string length to PyUnicode_DecodeUTF8
534 * otherwise it makes the end of string character is part
535 * of the string
551 /* Pass the string length to PyUnicode_DecodeUTF8 otherwise it makes
552 * the end of string character is part of the string
536553 */
537554 string_object = PyUnicode_DecodeUTF8(
538 (char *) name,
539 (Py_ssize_t) name_size - 1,
540 errors );
541
555 utf8_string,
556 (Py_ssize_t) utf8_string_size - 1,
557 errors );
558
559 if( string_object == NULL )
560 {
561 PyErr_Format(
562 PyExc_IOError,
563 "%s: unable to convert UTF-8 string into Unicode object.",
564 function );
565
566 goto on_error;
567 }
542568 PyMem_Free(
543 name );
569 utf8_string );
544570
545571 return( string_object );
546572
547573 on_error:
548 if( name != NULL )
574 if( utf8_string != NULL )
549575 {
550576 PyMem_Free(
551 name );
577 utf8_string );
552578 }
553579 return( NULL );
554580 }
00 /*
1 * Python object definition of the libesedb column
1 * Python object wrapper of libesedb_column_t
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2626
2727 #include "pyesedb_libesedb.h"
2828 #include "pyesedb_python.h"
29 #include "pyesedb_table.h"
3029
3130 #if defined( __cplusplus )
3231 extern "C" {
4443 */
4544 libesedb_column_t *column;
4645
47 /* The table object
46 /* The parent object
4847 */
49 pyesedb_table_t *table_object;
48 PyObject *parent_object;
5049 };
5150
5251 extern PyMethodDef pyesedb_column_object_methods[];
5352 extern PyTypeObject pyesedb_column_type_object;
5453
5554 PyObject *pyesedb_column_new(
55 PyTypeObject *type_object,
5656 libesedb_column_t *column,
57 pyesedb_table_t *table_object );
57 PyObject *parent_object );
5858
5959 int pyesedb_column_init(
6060 pyesedb_column_t *pyesedb_column );
7878 }
7979 #endif
8080
81 #endif
81 #endif /* !defined( _PYESEDB_COLUMN_H ) */
8282
00 /*
11 * Python object definition of the libesedb column types
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
414414 PyObject *pyesedb_column_types_new(
415415 void )
416416 {
417 pyesedb_column_types_t *pyesedb_column_types = NULL;
418 static char *function = "pyesedb_column_types_new";
419
420 pyesedb_column_types = PyObject_New(
421 struct pyesedb_column_types,
422 &pyesedb_column_types_type_object );
423
424 if( pyesedb_column_types == NULL )
417 pyesedb_column_types_t *definitions_object = NULL;
418 static char *function = "pyesedb_column_types_new";
419
420 definitions_object = PyObject_New(
421 struct pyesedb_column_types,
422 &pyesedb_column_types_type_object );
423
424 if( definitions_object == NULL )
425425 {
426426 PyErr_Format(
427427 PyExc_MemoryError,
428 "%s: unable to initialize column types.",
428 "%s: unable to create definitions object.",
429429 function );
430430
431431 goto on_error;
432432 }
433433 if( pyesedb_column_types_init(
434 pyesedb_column_types ) != 0 )
434 definitions_object ) != 0 )
435435 {
436436 PyErr_Format(
437437 PyExc_MemoryError,
438 "%s: unable to initialize column types.",
438 "%s: unable to initialize definitions object.",
439439 function );
440440
441441 goto on_error;
442442 }
443 return( (PyObject *) pyesedb_column_types );
443 return( (PyObject *) definitions_object );
444444
445445 on_error:
446 if( pyesedb_column_types != NULL )
446 if( definitions_object != NULL )
447447 {
448448 Py_DecRef(
449 (PyObject *) pyesedb_column_types );
449 (PyObject *) definitions_object );
450450 }
451451 return( NULL );
452452 }
455455 * Returns 0 if successful or -1 on error
456456 */
457457 int pyesedb_column_types_init(
458 pyesedb_column_types_t *pyesedb_column_types )
458 pyesedb_column_types_t *definitions_object )
459459 {
460460 static char *function = "pyesedb_column_types_init";
461461
462 if( pyesedb_column_types == NULL )
462 if( definitions_object == NULL )
463463 {
464464 PyErr_Format(
465465 PyExc_TypeError,
466 "%s: invalid column types.",
466 "%s: invalid definitions object.",
467467 function );
468468
469469 return( -1 );
474474 /* Frees a column types object
475475 */
476476 void pyesedb_column_types_free(
477 pyesedb_column_types_t *pyesedb_column_types )
477 pyesedb_column_types_t *definitions_object )
478478 {
479479 struct _typeobject *ob_type = NULL;
480480 static char *function = "pyesedb_column_types_free";
481481
482 if( pyesedb_column_types == NULL )
482 if( definitions_object == NULL )
483483 {
484484 PyErr_Format(
485485 PyExc_TypeError,
486 "%s: invalid column types.",
486 "%s: invalid definitions object.",
487487 function );
488488
489489 return;
490490 }
491491 ob_type = Py_TYPE(
492 pyesedb_column_types );
492 definitions_object );
493493
494494 if( ob_type == NULL )
495495 {
510510 return;
511511 }
512512 ob_type->tp_free(
513 (PyObject*) pyesedb_column_types );
513 (PyObject*) definitions_object );
514514 }
515515
00 /*
11 * Python object definition of the libesedb column types
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4949 void );
5050
5151 int pyesedb_column_types_init(
52 pyesedb_column_types_t *pyesedb_column_types );
52 pyesedb_column_types_t *definitions_object );
5353
5454 void pyesedb_column_types_free(
55 pyesedb_column_types_t *pyesedb_column_types );
55 pyesedb_column_types_t *definitions_object );
5656
5757 #if defined( __cplusplus )
5858 }
5959 #endif
6060
61 #endif
61 #endif /* !defined( _PYESEDB_COLUMN_TYPES_H ) */
6262
00 /*
1 * Python object definition of the columns sequence and iterator
1 * Python object definition of the sequence and iterator object of columns
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3030 #include "pyesedb_libcerror.h"
3131 #include "pyesedb_libesedb.h"
3232 #include "pyesedb_python.h"
33 #include "pyesedb_table.h"
3433
3534 PySequenceMethods pyesedb_columns_sequence_methods = {
3635 /* sq_length */
9796 /* tp_flags */
9897 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_ITER,
9998 /* tp_doc */
100 "internal pyesedb columns sequence and iterator object",
99 "pyesedb internal sequence and iterator object of columns",
101100 /* tp_traverse */
102101 0,
103102 /* tp_clear */
154153 * Returns a Python object if successful or NULL on error
155154 */
156155 PyObject *pyesedb_columns_new(
157 pyesedb_table_t *table_object,
158 PyObject* (*get_column_by_index)(
159 pyesedb_table_t *table_object,
160 int column_entry ),
161 int number_of_columns )
162 {
163 pyesedb_columns_t *pyesedb_columns = NULL;
164 static char *function = "pyesedb_columns_new";
165
166 if( table_object == NULL )
167 {
168 PyErr_Format(
169 PyExc_ValueError,
170 "%s: invalid table object.",
171 function );
172
173 return( NULL );
174 }
175 if( get_column_by_index == NULL )
176 {
177 PyErr_Format(
178 PyExc_ValueError,
179 "%s: invalid get column by index function.",
156 PyObject *parent_object,
157 PyObject* (*get_item_by_index)(
158 PyObject *parent_object,
159 int index ),
160 int number_of_items )
161 {
162 pyesedb_columns_t *columns_object = NULL;
163 static char *function = "pyesedb_columns_new";
164
165 if( parent_object == NULL )
166 {
167 PyErr_Format(
168 PyExc_ValueError,
169 "%s: invalid parent object.",
170 function );
171
172 return( NULL );
173 }
174 if( get_item_by_index == NULL )
175 {
176 PyErr_Format(
177 PyExc_ValueError,
178 "%s: invalid get item by index function.",
180179 function );
181180
182181 return( NULL );
183182 }
184183 /* Make sure the columns values are initialized
185184 */
186 pyesedb_columns = PyObject_New(
185 columns_object = PyObject_New(
187186 struct pyesedb_columns,
188187 &pyesedb_columns_type_object );
189188
190 if( pyesedb_columns == NULL )
189 if( columns_object == NULL )
191190 {
192191 PyErr_Format(
193192 PyExc_MemoryError,
194 "%s: unable to initialize columns.",
193 "%s: unable to create columns object.",
195194 function );
196195
197196 goto on_error;
198197 }
199198 if( pyesedb_columns_init(
200 pyesedb_columns ) != 0 )
199 columns_object ) != 0 )
201200 {
202201 PyErr_Format(
203202 PyExc_MemoryError,
204 "%s: unable to initialize columns.",
203 "%s: unable to initialize columns object.",
205204 function );
206205
207206 goto on_error;
208207 }
209 pyesedb_columns->table_object = table_object;
210 pyesedb_columns->get_column_by_index = get_column_by_index;
211 pyesedb_columns->number_of_columns = number_of_columns;
208 columns_object->parent_object = parent_object;
209 columns_object->get_item_by_index = get_item_by_index;
210 columns_object->number_of_items = number_of_items;
212211
213212 Py_IncRef(
214 (PyObject *) pyesedb_columns->table_object );
215
216 return( (PyObject *) pyesedb_columns );
213 (PyObject *) columns_object->parent_object );
214
215 return( (PyObject *) columns_object );
217216
218217 on_error:
219 if( pyesedb_columns != NULL )
218 if( columns_object != NULL )
220219 {
221220 Py_DecRef(
222 (PyObject *) pyesedb_columns );
221 (PyObject *) columns_object );
223222 }
224223 return( NULL );
225224 }
228227 * Returns 0 if successful or -1 on error
229228 */
230229 int pyesedb_columns_init(
231 pyesedb_columns_t *pyesedb_columns )
230 pyesedb_columns_t *columns_object )
232231 {
233232 static char *function = "pyesedb_columns_init";
234233
235 if( pyesedb_columns == NULL )
236 {
237 PyErr_Format(
238 PyExc_ValueError,
239 "%s: invalid columns.",
234 if( columns_object == NULL )
235 {
236 PyErr_Format(
237 PyExc_ValueError,
238 "%s: invalid columns object.",
240239 function );
241240
242241 return( -1 );
243242 }
244243 /* Make sure the columns values are initialized
245244 */
246 pyesedb_columns->table_object = NULL;
247 pyesedb_columns->get_column_by_index = NULL;
248 pyesedb_columns->column_entry = 0;
249 pyesedb_columns->number_of_columns = 0;
245 columns_object->parent_object = NULL;
246 columns_object->get_item_by_index = NULL;
247 columns_object->current_index = 0;
248 columns_object->number_of_items = 0;
250249
251250 return( 0 );
252251 }
254253 /* Frees a columns object
255254 */
256255 void pyesedb_columns_free(
257 pyesedb_columns_t *pyesedb_columns )
256 pyesedb_columns_t *columns_object )
258257 {
259258 struct _typeobject *ob_type = NULL;
260259 static char *function = "pyesedb_columns_free";
261260
262 if( pyesedb_columns == NULL )
263 {
264 PyErr_Format(
265 PyExc_ValueError,
266 "%s: invalid columns.",
261 if( columns_object == NULL )
262 {
263 PyErr_Format(
264 PyExc_ValueError,
265 "%s: invalid columns object.",
267266 function );
268267
269268 return;
270269 }
271270 ob_type = Py_TYPE(
272 pyesedb_columns );
271 columns_object );
273272
274273 if( ob_type == NULL )
275274 {
289288
290289 return;
291290 }
292 if( pyesedb_columns->table_object != NULL )
291 if( columns_object->parent_object != NULL )
293292 {
294293 Py_DecRef(
295 (PyObject *) pyesedb_columns->table_object );
294 (PyObject *) columns_object->parent_object );
296295 }
297296 ob_type->tp_free(
298 (PyObject*) pyesedb_columns );
297 (PyObject*) columns_object );
299298 }
300299
301300 /* The columns len() function
302301 */
303302 Py_ssize_t pyesedb_columns_len(
304 pyesedb_columns_t *pyesedb_columns )
303 pyesedb_columns_t *columns_object )
305304 {
306305 static char *function = "pyesedb_columns_len";
307306
308 if( pyesedb_columns == NULL )
309 {
310 PyErr_Format(
311 PyExc_ValueError,
312 "%s: invalid columns.",
307 if( columns_object == NULL )
308 {
309 PyErr_Format(
310 PyExc_ValueError,
311 "%s: invalid columns object.",
313312 function );
314313
315314 return( -1 );
316315 }
317 return( (Py_ssize_t) pyesedb_columns->number_of_columns );
316 return( (Py_ssize_t) columns_object->number_of_items );
318317 }
319318
320319 /* The columns getitem() function
321320 */
322321 PyObject *pyesedb_columns_getitem(
323 pyesedb_columns_t *pyesedb_columns,
322 pyesedb_columns_t *columns_object,
324323 Py_ssize_t item_index )
325324 {
326325 PyObject *column_object = NULL;
327326 static char *function = "pyesedb_columns_getitem";
328327
329 if( pyesedb_columns == NULL )
330 {
331 PyErr_Format(
332 PyExc_ValueError,
333 "%s: invalid columns.",
334 function );
335
336 return( NULL );
337 }
338 if( pyesedb_columns->get_column_by_index == NULL )
339 {
340 PyErr_Format(
341 PyExc_ValueError,
342 "%s: invalid columns - missing get column by index function.",
343 function );
344
345 return( NULL );
346 }
347 if( pyesedb_columns->number_of_columns < 0 )
348 {
349 PyErr_Format(
350 PyExc_ValueError,
351 "%s: invalid columns - invalid number of columns.",
328 if( columns_object == NULL )
329 {
330 PyErr_Format(
331 PyExc_ValueError,
332 "%s: invalid columns object.",
333 function );
334
335 return( NULL );
336 }
337 if( columns_object->get_item_by_index == NULL )
338 {
339 PyErr_Format(
340 PyExc_ValueError,
341 "%s: invalid columns object - missing get item by index function.",
342 function );
343
344 return( NULL );
345 }
346 if( columns_object->number_of_items < 0 )
347 {
348 PyErr_Format(
349 PyExc_ValueError,
350 "%s: invalid columns object - invalid number of items.",
352351 function );
353352
354353 return( NULL );
355354 }
356355 if( ( item_index < 0 )
357 || ( item_index >= (Py_ssize_t) pyesedb_columns->number_of_columns ) )
358 {
359 PyErr_Format(
360 PyExc_ValueError,
361 "%s: invalid invalid item index column out of bounds.",
362 function );
363
364 return( NULL );
365 }
366 column_object = pyesedb_columns->get_column_by_index(
367 pyesedb_columns->table_object,
356 || ( item_index >= (Py_ssize_t) columns_object->number_of_items ) )
357 {
358 PyErr_Format(
359 PyExc_ValueError,
360 "%s: invalid invalid item index value out of bounds.",
361 function );
362
363 return( NULL );
364 }
365 column_object = columns_object->get_item_by_index(
366 columns_object->parent_object,
368367 (int) item_index );
369368
370369 return( column_object );
373372 /* The columns iter() function
374373 */
375374 PyObject *pyesedb_columns_iter(
376 pyesedb_columns_t *pyesedb_columns )
375 pyesedb_columns_t *columns_object )
377376 {
378377 static char *function = "pyesedb_columns_iter";
379378
380 if( pyesedb_columns == NULL )
381 {
382 PyErr_Format(
383 PyExc_ValueError,
384 "%s: invalid columns.",
379 if( columns_object == NULL )
380 {
381 PyErr_Format(
382 PyExc_ValueError,
383 "%s: invalid columns object.",
385384 function );
386385
387386 return( NULL );
388387 }
389388 Py_IncRef(
390 (PyObject *) pyesedb_columns );
391
392 return( (PyObject *) pyesedb_columns );
389 (PyObject *) columns_object );
390
391 return( (PyObject *) columns_object );
393392 }
394393
395394 /* The columns iternext() function
396395 */
397396 PyObject *pyesedb_columns_iternext(
398 pyesedb_columns_t *pyesedb_columns )
397 pyesedb_columns_t *columns_object )
399398 {
400399 PyObject *column_object = NULL;
401400 static char *function = "pyesedb_columns_iternext";
402401
403 if( pyesedb_columns == NULL )
404 {
405 PyErr_Format(
406 PyExc_ValueError,
407 "%s: invalid columns.",
408 function );
409
410 return( NULL );
411 }
412 if( pyesedb_columns->get_column_by_index == NULL )
413 {
414 PyErr_Format(
415 PyExc_ValueError,
416 "%s: invalid columns - missing get column by index function.",
417 function );
418
419 return( NULL );
420 }
421 if( pyesedb_columns->column_entry < 0 )
422 {
423 PyErr_Format(
424 PyExc_ValueError,
425 "%s: invalid columns - invalid column entry.",
426 function );
427
428 return( NULL );
429 }
430 if( pyesedb_columns->number_of_columns < 0 )
431 {
432 PyErr_Format(
433 PyExc_ValueError,
434 "%s: invalid columns - invalid number of columns.",
435 function );
436
437 return( NULL );
438 }
439 if( pyesedb_columns->column_entry >= pyesedb_columns->number_of_columns )
402 if( columns_object == NULL )
403 {
404 PyErr_Format(
405 PyExc_ValueError,
406 "%s: invalid columns object.",
407 function );
408
409 return( NULL );
410 }
411 if( columns_object->get_item_by_index == NULL )
412 {
413 PyErr_Format(
414 PyExc_ValueError,
415 "%s: invalid columns object - missing get item by index function.",
416 function );
417
418 return( NULL );
419 }
420 if( columns_object->current_index < 0 )
421 {
422 PyErr_Format(
423 PyExc_ValueError,
424 "%s: invalid columns object - invalid current index.",
425 function );
426
427 return( NULL );
428 }
429 if( columns_object->number_of_items < 0 )
430 {
431 PyErr_Format(
432 PyExc_ValueError,
433 "%s: invalid columns object - invalid number of items.",
434 function );
435
436 return( NULL );
437 }
438 if( columns_object->current_index >= columns_object->number_of_items )
440439 {
441440 PyErr_SetNone(
442441 PyExc_StopIteration );
443442
444443 return( NULL );
445444 }
446 column_object = pyesedb_columns->get_column_by_index(
447 pyesedb_columns->table_object,
448 pyesedb_columns->column_entry );
445 column_object = columns_object->get_item_by_index(
446 columns_object->parent_object,
447 columns_object->current_index );
449448
450449 if( column_object != NULL )
451450 {
452 pyesedb_columns->column_entry++;
451 columns_object->current_index++;
453452 }
454453 return( column_object );
455454 }
00 /*
1 * Python object definition of the columns sequence and iterator
1 * Python object definition of the sequence and iterator object of columns
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2626
2727 #include "pyesedb_libesedb.h"
2828 #include "pyesedb_python.h"
29 #include "pyesedb_table.h"
3029
3130 #if defined( __cplusplus )
3231 extern "C" {
4039 */
4140 PyObject_HEAD
4241
43 /* The table object
42 /* The parent object
4443 */
45 pyesedb_table_t *table_object;
44 PyObject *parent_object;
4645
47 /* The get column by index callback function
46 /* The get item by index callback function
4847 */
49 PyObject* (*get_column_by_index)(
50 pyesedb_table_t *table_object,
51 int column_entry );
48 PyObject* (*get_item_by_index)(
49 PyObject *parent_object,
50 int index );
5251
53 /* The (current) column entry
52 /* The current index
5453 */
55 int column_entry;
54 int current_index;
5655
57 /* The number of columns
56 /* The number of items
5857 */
59 int number_of_columns;
58 int number_of_items;
6059 };
6160
6261 extern PyTypeObject pyesedb_columns_type_object;
6362
6463 PyObject *pyesedb_columns_new(
65 pyesedb_table_t *table_object,
66 PyObject* (*get_column_by_index)(
67 pyesedb_table_t *table_object,
68 int column_entry ),
69 int number_of_columns );
64 PyObject *parent_object,
65 PyObject* (*get_item_by_index)(
66 PyObject *parent_object,
67 int index ),
68 int number_of_items );
7069
7170 int pyesedb_columns_init(
72 pyesedb_columns_t *pyesedb_columns );
71 pyesedb_columns_t *columns_object );
7372
7473 void pyesedb_columns_free(
75 pyesedb_columns_t *pyesedb_columns );
74 pyesedb_columns_t *columns_object );
7675
7776 Py_ssize_t pyesedb_columns_len(
78 pyesedb_columns_t *pyesedb_columns );
77 pyesedb_columns_t *columns_object );
7978
8079 PyObject *pyesedb_columns_getitem(
81 pyesedb_columns_t *pyesedb_columns,
80 pyesedb_columns_t *columns_object,
8281 Py_ssize_t item_index );
8382
8483 PyObject *pyesedb_columns_iter(
85 pyesedb_columns_t *pyesedb_columns );
84 pyesedb_columns_t *columns_object );
8685
8786 PyObject *pyesedb_columns_iternext(
88 pyesedb_columns_t *pyesedb_columns );
87 pyesedb_columns_t *columns_object );
8988
9089 #if defined( __cplusplus )
9190 }
9291 #endif
9392
94 #endif
93 #endif /* !defined( _PYESEDB_COLUMNS_H ) */
9594
00 /*
11 * Date and time functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
1919 */
2020
2121 #include <common.h>
22 #include <byte_stream.h>
2223 #include <types.h>
2324
2425 #include "pyesedb_datetime.h"
3233 PyObject *pyesedb_datetime_new_from_fat_date_time(
3334 uint32_t fat_date_time )
3435 {
35 static char *function = "pyesedb_datetime_new_from_fat_date_time";
36 PyObject *date_time_object = NULL;
37 uint16_t year = 0;
38 uint8_t days_in_month = 0;
39 uint8_t day_of_month = 0;
40 uint8_t hours = 0;
41 uint8_t minutes = 0;
42 uint8_t month = 0;
43 uint8_t seconds = 0;
36 PyObject *datetime_object = NULL;
37 static char *function = "pyesedb_datetime_new_from_fat_date_time";
38 uint16_t year = 0;
39 uint8_t day_of_month = 0;
40 uint8_t days_in_month = 0;
41 uint8_t hours = 0;
42 uint8_t minutes = 0;
43 uint8_t month = 0;
44 uint8_t seconds = 0;
4445
4546 /* The day of month is stored in the next 5 bits
4647 */
131132 }
132133 PyDateTime_IMPORT;
133134
134 date_time_object = (PyObject *) PyDateTime_FromDateAndTime(
135 (int) year,
136 (int) month,
137 (int) day_of_month,
138 (int) hours,
139 (int) minutes,
140 (int) seconds,
141 0 );
142
143 return( date_time_object );
135 datetime_object = (PyObject *) PyDateTime_FromDateAndTime(
136 (int) year,
137 (int) month,
138 (int) day_of_month,
139 (int) hours,
140 (int) minutes,
141 (int) seconds,
142 0 );
143
144 return( datetime_object );
144145 }
145146
146147 /* Creates a new datetime object from a FILETIME
149150 PyObject *pyesedb_datetime_new_from_filetime(
150151 uint64_t filetime )
151152 {
152 static char *function = "pyesedb_datetime_new_from_filetime";
153 PyObject *date_time_object = NULL;
154 uint32_t micro_seconds = 0;
155 uint32_t days_in_century = 0;
156 uint16_t days_in_year = 0;
157 uint16_t year = 0;
158 uint8_t day_of_month = 0;
159 uint8_t days_in_month = 0;
160 uint8_t hours = 0;
161 uint8_t minutes = 0;
162 uint8_t month = 0;
163 uint8_t seconds = 0;
153 PyObject *datetime_object = NULL;
154 static char *function = "pyesedb_datetime_new_from_filetime";
155 uint32_t days_in_century = 0;
156 uint32_t micro_seconds = 0;
157 uint16_t days_in_year = 0;
158 uint16_t year = 0;
159 uint8_t day_of_month = 0;
160 uint8_t days_in_month = 0;
161 uint8_t hours = 0;
162 uint8_t minutes = 0;
163 uint8_t month = 0;
164 uint8_t seconds = 0;
164165
165166 /* The timestamp is in units of 100 nano seconds correct the value to seconds
166167 */
306307
307308 PyDateTime_IMPORT;
308309
309 date_time_object = (PyObject *) PyDateTime_FromDateAndTime(
310 (int) year,
311 (int) month,
312 (int) day_of_month,
313 (int) hours,
314 (int) minutes,
315 (int) seconds,
316 (int) micro_seconds );
317
318 return( date_time_object );
310 datetime_object = (PyObject *) PyDateTime_FromDateAndTime(
311 (int) year,
312 (int) month,
313 (int) day_of_month,
314 (int) hours,
315 (int) minutes,
316 (int) seconds,
317 (int) micro_seconds );
318
319 return( datetime_object );
319320 }
320321
321 /* Creates a new datetime object from a POSIX time
322 /* Creates a new datetime object from a floatingtime
322323 * Returns a Python object if successful or NULL on error
323324 */
324 PyObject *pyesedb_datetime_new_from_posix_time(
325 uint32_t posix_time )
325 PyObject *pyesedb_datetime_new_from_floatingtime(
326 uint64_t floatingtime )
326327 {
327 static char *function = "pyesedb_datetime_new_from_posix_time";
328 PyObject *date_time_object = NULL;
329 uint16_t days_in_year = 0;
330 uint16_t year = 0;
331 uint8_t day_of_month = 0;
332 uint8_t days_in_month = 0;
333 uint8_t hours = 0;
334 uint8_t minutes = 0;
335 uint8_t month = 0;
336 uint8_t seconds = 0;
337
338 /* There are 60 seconds in a minute correct the value to minutes
339 */
340 seconds = posix_time % 60;
341 posix_time /= 60;
342
343 /* There are 60 minutes in an hour correct the value to hours
344 */
345 minutes = posix_time % 60;
346 posix_time /= 60;
347
348 /* There are 24 hours in a day correct the value to days
349 */
350 hours = posix_time % 24;
351 posix_time /= 24;
352
353 /* Add 1 day to compensate that Jan 1 1601 is represented as 0
354 */
355 posix_time += 1;
356
357 /* Determine the number of years starting at '1 Jan 1970 00:00:00'
328 byte_stream_float64_t timestamp;
329
330 PyObject *datetime_object = NULL;
331 static char *function = "pyesedb_datetime_new_from_floatingtime";
332 uint32_t days_in_century = 0;
333 uint32_t micro_seconds = 0;
334 uint16_t days_in_year = 0;
335 uint16_t year = 0;
336 uint8_t day_of_month = 0;
337 uint8_t days_in_month = 0;
338 uint8_t hours = 0;
339 uint8_t minutes = 0;
340 uint8_t month = 0;
341 uint8_t seconds = 0;
342
343 timestamp.integer = floatingtime;
344
345 /* Determine the number of years starting at '30 Dec 1899 00:00:00'
358346 * correct the value to days within the year
359347 */
360 year = 1970;
361
362 if( posix_time >= 10957 )
363 {
364 year = 2000;
365
366 posix_time -= 10957;
367 }
368 while( posix_time > 0 )
348 year = 1899;
349
350 if( timestamp.floating_point >= 2 )
351 {
352 year = 1900;
353
354 timestamp.floating_point -= 2;
355 }
356 while( timestamp.floating_point > 0 )
357 {
358 if( ( year % 400 ) == 0 )
359 {
360 days_in_century = 36525;
361 }
362 else
363 {
364 days_in_century = 36524;
365 }
366 if( timestamp.floating_point <= days_in_century )
367 {
368 break;
369 }
370 timestamp.floating_point -= days_in_century;
371
372 year += 100;
373 }
374 while( timestamp.floating_point > 0 )
369375 {
370376 /* Check for a leap year
371377 * The year is ( ( dividable by 4 ) and ( not dividable by 100 ) ) or ( dividable by 400 )
380386 {
381387 days_in_year = 365;
382388 }
383 if( posix_time <= days_in_year )
384 {
385 break;
386 }
387 posix_time -= days_in_year;
389 if( timestamp.floating_point <= days_in_year )
390 {
391 break;
392 }
393 timestamp.floating_point -= days_in_year;
388394
389395 year += 1;
390396 }
392398 */
393399 month = 1;
394400
395 while( posix_time > 0 )
401 while( timestamp.floating_point > 0 )
396402 {
397403 /* February (2)
398404 */
442448
443449 return( NULL );
444450 }
451 if( timestamp.floating_point <= days_in_month )
452 {
453 break;
454 }
455 timestamp.floating_point -= days_in_month;
456
457 month += 1;
458 }
459 /* Determine the day
460 */
461 day_of_month = (uint8_t) timestamp.floating_point;
462 timestamp.floating_point -= day_of_month;
463
464 /* There are 24 hours in a day correct the value to hours
465 */
466 timestamp.floating_point *= 24;
467 hours = (uint8_t) timestamp.floating_point;
468 timestamp.floating_point -= hours;
469
470 /* There are 60 minutes in an hour correct the value to minutes
471 */
472 timestamp.floating_point *= 60;
473 minutes = (uint8_t) timestamp.floating_point;
474 timestamp.floating_point -= minutes;
475
476 /* There are 60 seconds in a minute correct the value to seconds
477 */
478 timestamp.floating_point *= 60;
479 seconds = (uint8_t) timestamp.floating_point;
480 timestamp.floating_point -= seconds;
481
482 /* There are 1000 micro seconds in a seconds correct the value to micro seconds
483 */
484 timestamp.floating_point *= 1000000;
485 micro_seconds = (uint8_t) timestamp.floating_point;
486 timestamp.floating_point -= micro_seconds;
487
488 PyDateTime_IMPORT;
489
490 datetime_object = (PyObject *) PyDateTime_FromDateAndTime(
491 (int) year,
492 (int) month,
493 (int) day_of_month,
494 (int) hours,
495 (int) minutes,
496 (int) seconds,
497 (int) micro_seconds );
498
499 return( datetime_object );
500 }
501
502 /* Creates a new datetime object from a POSIX time
503 * Returns a Python object if successful or NULL on error
504 */
505 PyObject *pyesedb_datetime_new_from_posix_time(
506 uint32_t posix_time )
507 {
508 PyObject *datetime_object = NULL;
509 static char *function = "pyesedb_datetime_new_from_posix_time";
510 uint16_t days_in_year = 0;
511 uint16_t year = 0;
512 uint8_t day_of_month = 0;
513 uint8_t days_in_month = 0;
514 uint8_t hours = 0;
515 uint8_t minutes = 0;
516 uint8_t month = 0;
517 uint8_t seconds = 0;
518
519 /* There are 60 seconds in a minute correct the value to minutes
520 */
521 seconds = posix_time % 60;
522 posix_time /= 60;
523
524 /* There are 60 minutes in an hour correct the value to hours
525 */
526 minutes = posix_time % 60;
527 posix_time /= 60;
528
529 /* There are 24 hours in a day correct the value to days
530 */
531 hours = posix_time % 24;
532 posix_time /= 24;
533
534 /* Add 1 day to compensate that Jan 1 1601 is represented as 0
535 */
536 posix_time += 1;
537
538 /* Determine the number of years starting at '1 Jan 1970 00:00:00'
539 * correct the value to days within the year
540 */
541 year = 1970;
542
543 if( posix_time >= 10957 )
544 {
545 year = 2000;
546
547 posix_time -= 10957;
548 }
549 while( posix_time > 0 )
550 {
551 /* Check for a leap year
552 * The year is ( ( dividable by 4 ) and ( not dividable by 100 ) ) or ( dividable by 400 )
553 */
554 if( ( ( ( year % 4 ) == 0 )
555 && ( ( year % 100 ) != 0 ) )
556 || ( ( year % 400 ) == 0 ) )
557 {
558 days_in_year = 366;
559 }
560 else
561 {
562 days_in_year = 365;
563 }
564 if( posix_time <= days_in_year )
565 {
566 break;
567 }
568 posix_time -= days_in_year;
569
570 year += 1;
571 }
572 /* Determine the month correct the value to days within the month
573 */
574 month = 1;
575
576 while( posix_time > 0 )
577 {
578 /* February (2)
579 */
580 if( month == 2 )
581 {
582 if( ( ( ( year % 4 ) == 0 )
583 && ( ( year % 100 ) != 0 ) )
584 || ( ( year % 400 ) == 0 ) )
585 {
586 days_in_month = 29;
587 }
588 else
589 {
590 days_in_month = 28;
591 }
592 }
593 /* April (4), June (6), September (9), November (11)
594 */
595 else if( ( month == 4 )
596 || ( month == 6 )
597 || ( month == 9 )
598 || ( month == 11 ) )
599 {
600 days_in_month = 30;
601 }
602 /* Januari (1), March (3), May (5), July (7), August (8), October (10), December (12)
603 */
604 else if( ( month == 1 )
605 || ( month == 3 )
606 || ( month == 5 )
607 || ( month == 7 )
608 || ( month == 8 )
609 || ( month == 10 )
610 || ( month == 12 ) )
611 {
612 days_in_month = 31;
613 }
614 /* This should never happen, but just in case
615 */
616 else
617 {
618 PyErr_Format(
619 PyExc_IOError,
620 "%s: unsupported month: %" PRIu8 ".",
621 function,
622 month );
623
624 return( NULL );
625 }
445626 if( posix_time <= days_in_month )
446627 {
447628 break;
456637
457638 PyDateTime_IMPORT;
458639
459 date_time_object = (PyObject *) PyDateTime_FromDateAndTime(
460 (int) year,
461 (int) month,
462 (int) day_of_month,
463 (int) hours,
464 (int) minutes,
465 (int) seconds,
466 0 );
467
468 return( date_time_object );
640 datetime_object = (PyObject *) PyDateTime_FromDateAndTime(
641 (int) year,
642 (int) month,
643 (int) day_of_month,
644 (int) hours,
645 (int) minutes,
646 (int) seconds,
647 0 );
648
649 return( datetime_object );
469650 }
470651
00 /*
11 * Date and time functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3636 PyObject *pyesedb_datetime_new_from_filetime(
3737 uint64_t filetime );
3838
39 PyObject *pyesedb_datetime_new_from_floatingtime(
40 uint64_t floatingtime );
41
3942 PyObject *pyesedb_datetime_new_from_posix_time(
4043 uint32_t posix_time );
4144
4346 }
4447 #endif
4548
46 #endif
49 #endif /* !defined( _PYESEDB_DATETIME_H ) */
4750
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2020
2121 #include <common.h>
2222 #include <memory.h>
23 #include <narrow_string.h>
2324 #include <types.h>
2425
2526 #if defined( HAVE_STDARG_H ) || defined( WINAPI )
3233
3334 #include "pyesedb_error.h"
3435 #include "pyesedb_libcerror.h"
35 #include "pyesedb_libcstring.h"
3636 #include "pyesedb_python.h"
3737
3838 #if defined( HAVE_STDARG_H ) || defined( WINAPI )
112112
113113 return;
114114 }
115 error_string_length = libcstring_narrow_string_length(
115 error_string_length = narrow_string_length(
116116 error_string );
117117
118118 if( ( error_string_length >= 1 )
252252
253253 return;
254254 }
255 error_string_length = libcstring_narrow_string_length(
255 error_string_length = narrow_string_length(
256256 error_string );
257257
258258 if( ( error_string_length >= 1 )
266266 &exception_traceback );
267267
268268 string_object = PyObject_Repr(
269 exception_value );
269 exception_value );
270270
271271 #if PY_MAJOR_VERSION >= 3
272272 utf8_string_object = PyUnicode_AsUTF8String(
00 /*
11 * Error functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
1 * Python object definition of the libesedb file
1 * Python object wrapper of libesedb_file_t
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
1919 */
2020
2121 #include <common.h>
22 #include <narrow_string.h>
2223 #include <types.h>
2324
2425 #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI )
2930 #include "pyesedb_file.h"
3031 #include "pyesedb_file_object_io_handle.h"
3132 #include "pyesedb_integer.h"
33 #include "pyesedb_libbfio.h"
3234 #include "pyesedb_libcerror.h"
3335 #include "pyesedb_libclocale.h"
34 #include "pyesedb_libcstring.h"
3536 #include "pyesedb_libesedb.h"
3637 #include "pyesedb_python.h"
3738 #include "pyesedb_table.h"
3940 #include "pyesedb_unused.h"
4041
4142 #if !defined( LIBESEDB_HAVE_BFIO )
43
4244 LIBESEDB_EXTERN \
4345 int libesedb_file_open_file_io_handle(
4446 libesedb_file_t *file,
4547 libbfio_handle_t *file_io_handle,
4648 int access_flags,
4749 libesedb_error_t **error );
48 #endif
50
51 #endif /* !defined( LIBESEDB_HAVE_BFIO ) */
4952
5053 PyMethodDef pyesedb_file_object_methods[] = {
5154
536539 char *mode = NULL;
537540 int result = 0;
538541
539 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
542 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
540543 const wchar_t *filename_wide = NULL;
541544 #else
542545 PyObject *utf8_string_object = NULL;
596599 {
597600 PyErr_Clear();
598601
599 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
602 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
600603 filename_wide = (wchar_t *) PyUnicode_AsUnicode(
601604 string_object );
602605 Py_BEGIN_ALLOW_THREADS
771774
772775 return( NULL );
773776 }
777 if( pyesedb_file->file_io_handle != NULL )
778 {
779 pyesedb_error_raise(
780 error,
781 PyExc_IOError,
782 "%s: invalid file - file IO handle already set.",
783 function );
784
785 goto on_error;
786 }
774787 if( pyesedb_file_object_initialize(
775788 &( pyesedb_file->file_io_handle ),
776789 file_object,
11701183 * Returns a Python object if successful or NULL on error
11711184 */
11721185 PyObject *pyesedb_file_get_table_by_index(
1173 pyesedb_file_t *pyesedb_file,
1186 PyObject *pyesedb_file,
11741187 int table_entry )
11751188 {
11761189 libcerror_error_t *error = NULL;
11911204 Py_BEGIN_ALLOW_THREADS
11921205
11931206 result = libesedb_file_get_table(
1194 pyesedb_file->file,
1207 ( (pyesedb_file_t *) pyesedb_file )->file,
11951208 table_entry,
11961209 &table,
11971210 &error );
12591272 return( NULL );
12601273 }
12611274 table_object = pyesedb_file_get_table_by_index(
1262 pyesedb_file,
1275 (PyObject *) pyesedb_file,
12631276 table_entry );
12641277
12651278 return( table_object );
13121325 return( NULL );
13131326 }
13141327 tables_object = pyesedb_tables_new(
1315 pyesedb_file,
1328 (PyObject *) pyesedb_file,
13161329 &pyesedb_file_get_table_by_index,
13171330 number_of_tables );
13181331
13631376 {
13641377 goto on_error;
13651378 }
1366 table_name_length = libcstring_narrow_string_length(
1379 table_name_length = narrow_string_length(
13671380 table_name );
13681381
13691382 Py_BEGIN_ALLOW_THREADS
14011414 }
14021415 table_object = pyesedb_table_new(
14031416 table,
1404 pyesedb_file );
1417 (PyObject *) pyesedb_file );
14051418
14061419 if( table_object == NULL )
14071420 {
00 /*
1 * Python object definition of the libesedb file
1 * Python object wrapper of libesedb_file_t
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2525 #include <types.h>
2626
2727 #include "pyesedb_libbfio.h"
28 #include "pyesedb_libcerror.h"
2928 #include "pyesedb_libesedb.h"
3029 #include "pyesedb_python.h"
3130
111110 PyObject *arguments );
112111
113112 PyObject *pyesedb_file_get_table_by_index(
114 pyesedb_file_t *pyesedb_file,
113 PyObject *pyesedb_file,
115114 int table_index );
116115
117116 PyObject *pyesedb_file_get_table(
132131 }
133132 #endif
134133
135 #endif
134 #endif /* !defined( _PYESEDB_FILE_H ) */
136135
00 /*
11 * Python file object IO handle functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2727 #include "pyesedb_integer.h"
2828 #include "pyesedb_libbfio.h"
2929 #include "pyesedb_libcerror.h"
30 #include "pyesedb_libcstring.h"
3130 #include "pyesedb_python.h"
3231
3332 /* Creates a file object IO handle
211210 pyesedb_file_object_io_handle_t **file_object_io_handle,
212211 libcerror_error_t **error )
213212 {
213 static char *function = "pyesedb_file_object_io_handle_free";
214214 PyGILState_STATE gil_state = 0;
215 static char *function = "pyesedb_file_object_io_handle_free";
216215
217216 if( file_object_io_handle == NULL )
218217 {
422421 PyObject *argument_size = NULL;
423422 PyObject *method_name = NULL;
424423 PyObject *method_result = NULL;
424 static char *function = "pyesedb_file_object_read_buffer";
425425 char *safe_buffer = NULL;
426 static char *function = "pyesedb_file_object_read_buffer";
427426 Py_ssize_t safe_read_count = 0;
428427 ssize_t read_count = 0;
429428 int result = 0;
13751374 {
13761375 PyObject *method_name = NULL;
13771376 static char *function = "pyesedb_file_object_io_handle_get_size";
1377 PyGILState_STATE gil_state = 0;
13781378 off64_t current_offset = 0;
1379 PyGILState_STATE gil_state = 0;
13801379 int result = 0;
13811380
13821381 if( file_object_io_handle == NULL )
00 /*
11 * Python file object IO handle functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2626
2727 #include "pyesedb_libbfio.h"
2828 #include "pyesedb_libcerror.h"
29 #include "pyesedb_libcstring.h"
3029 #include "pyesedb_python.h"
3130
3231 #if defined( __cplusplus )
0 /*
1 * Python object definition of the libesedb file types
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <types.h>
23
24 #if defined( HAVE_STDLIB_H ) || defined( HAVE_WINAPI )
25 #include <stdlib.h>
26 #endif
27
28 #include "pyesedb_file_types.h"
29 #include "pyesedb_libesedb.h"
30 #include "pyesedb_python.h"
31 #include "pyesedb_unused.h"
32
33 PyTypeObject pyesedb_file_types_type_object = {
34 PyVarObject_HEAD_INIT( NULL, 0 )
35
36 /* tp_name */
37 "pyesedb.file_types",
38 /* tp_basicsize */
39 sizeof( pyesedb_file_types_t ),
40 /* tp_itemsize */
41 0,
42 /* tp_dealloc */
43 (destructor) pyesedb_file_types_free,
44 /* tp_print */
45 0,
46 /* tp_getattr */
47 0,
48 /* tp_setattr */
49 0,
50 /* tp_compare */
51 0,
52 /* tp_repr */
53 0,
54 /* tp_as_number */
55 0,
56 /* tp_as_sequence */
57 0,
58 /* tp_as_mapping */
59 0,
60 /* tp_hash */
61 0,
62 /* tp_call */
63 0,
64 /* tp_str */
65 0,
66 /* tp_getattro */
67 0,
68 /* tp_setattro */
69 0,
70 /* tp_as_buffer */
71 0,
72 /* tp_flags */
73 Py_TPFLAGS_DEFAULT,
74 /* tp_doc */
75 "pyesedb file types object (wraps LIBESEDB_FILE_TYPES)",
76 /* tp_traverse */
77 0,
78 /* tp_clear */
79 0,
80 /* tp_richcompare */
81 0,
82 /* tp_weaklistoffset */
83 0,
84 /* tp_iter */
85 0,
86 /* tp_iternext */
87 0,
88 /* tp_methods */
89 0,
90 /* tp_members */
91 0,
92 /* tp_getset */
93 0,
94 /* tp_base */
95 0,
96 /* tp_dict */
97 0,
98 /* tp_descr_get */
99 0,
100 /* tp_descr_set */
101 0,
102 /* tp_dictoffset */
103 0,
104 /* tp_init */
105 (initproc) pyesedb_file_types_init,
106 /* tp_alloc */
107 0,
108 /* tp_new */
109 0,
110 /* tp_free */
111 0,
112 /* tp_is_gc */
113 0,
114 /* tp_bases */
115 NULL,
116 /* tp_mro */
117 NULL,
118 /* tp_cache */
119 NULL,
120 /* tp_subclasses */
121 NULL,
122 /* tp_weaklist */
123 NULL,
124 /* tp_del */
125 0
126 };
127
128 /* Initializes the type object
129 * Returns 1 if successful or -1 on error
130 */
131 int pyesedb_file_types_init_type(
132 PyTypeObject *type_object )
133 {
134 PyObject *value_object = NULL;
135
136 if( type_object == NULL )
137 {
138 return( -1 );
139 }
140 type_object->tp_dict = PyDict_New();
141
142 if( type_object->tp_dict == NULL )
143 {
144 return( -1 );
145 }
146 #if PY_MAJOR_VERSION >= 3
147 value_object = PyLong_FromLong(
148 LIBESEDB_FILE_TYPE_DATABASE );
149 #else
150 value_object = PyInt_FromLong(
151 LIBESEDB_FILE_TYPE_DATABASE );
152 #endif
153 if( PyDict_SetItemString(
154 type_object->tp_dict,
155 "DATABASE",
156 value_object ) != 0 )
157 {
158 goto on_error;
159 }
160 #if PY_MAJOR_VERSION >= 3
161 value_object = PyLong_FromLong(
162 LIBESEDB_FILE_TYPE_STREAMING_FILE );
163 #else
164 value_object = PyInt_FromLong(
165 LIBESEDB_FILE_TYPE_STREAMING_FILE );
166 #endif
167 if( PyDict_SetItemString(
168 type_object->tp_dict,
169 "STREAMING_FILE",
170 value_object ) != 0 )
171 {
172 goto on_error;
173 }
174 return( 1 );
175
176 on_error:
177 if( type_object->tp_dict != NULL )
178 {
179 Py_DecRef(
180 type_object->tp_dict );
181
182 type_object->tp_dict = NULL;
183 }
184 return( -1 );
185 }
186
187 /* Creates a new file types object
188 * Returns a Python object if successful or NULL on error
189 */
190 PyObject *pyesedb_file_types_new(
191 void )
192 {
193 pyesedb_file_types_t *definitions_object = NULL;
194 static char *function = "pyesedb_file_types_new";
195
196 definitions_object = PyObject_New(
197 struct pyesedb_file_types,
198 &pyesedb_file_types_type_object );
199
200 if( definitions_object == NULL )
201 {
202 PyErr_Format(
203 PyExc_MemoryError,
204 "%s: unable to create definitions object.",
205 function );
206
207 goto on_error;
208 }
209 if( pyesedb_file_types_init(
210 definitions_object ) != 0 )
211 {
212 PyErr_Format(
213 PyExc_MemoryError,
214 "%s: unable to initialize definitions object.",
215 function );
216
217 goto on_error;
218 }
219 return( (PyObject *) definitions_object );
220
221 on_error:
222 if( definitions_object != NULL )
223 {
224 Py_DecRef(
225 (PyObject *) definitions_object );
226 }
227 return( NULL );
228 }
229
230 /* Intializes a file types object
231 * Returns 0 if successful or -1 on error
232 */
233 int pyesedb_file_types_init(
234 pyesedb_file_types_t *definitions_object )
235 {
236 static char *function = "pyesedb_file_types_init";
237
238 if( definitions_object == NULL )
239 {
240 PyErr_Format(
241 PyExc_TypeError,
242 "%s: invalid definitions object.",
243 function );
244
245 return( -1 );
246 }
247 return( 0 );
248 }
249
250 /* Frees a file types object
251 */
252 void pyesedb_file_types_free(
253 pyesedb_file_types_t *definitions_object )
254 {
255 struct _typeobject *ob_type = NULL;
256 static char *function = "pyesedb_file_types_free";
257
258 if( definitions_object == NULL )
259 {
260 PyErr_Format(
261 PyExc_TypeError,
262 "%s: invalid definitions object.",
263 function );
264
265 return;
266 }
267 ob_type = Py_TYPE(
268 definitions_object );
269
270 if( ob_type == NULL )
271 {
272 PyErr_Format(
273 PyExc_ValueError,
274 "%s: missing ob_type.",
275 function );
276
277 return;
278 }
279 if( ob_type->tp_free == NULL )
280 {
281 PyErr_Format(
282 PyExc_ValueError,
283 "%s: invalid ob_type - missing tp_free.",
284 function );
285
286 return;
287 }
288 ob_type->tp_free(
289 (PyObject*) definitions_object );
290 }
291
0 /*
1 * Python object definition of the libesedb file types
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _PYESEDB_FILE_TYPES_H )
22 #define _PYESEDB_FILE_TYPES_H
23
24 #include <common.h>
25 #include <types.h>
26
27 #include "pyesedb_libesedb.h"
28 #include "pyesedb_python.h"
29
30 #if defined( __cplusplus )
31 extern "C" {
32 #endif
33
34 typedef struct pyesedb_file_types pyesedb_file_types_t;
35
36 struct pyesedb_file_types
37 {
38 /* Python object initialization
39 */
40 PyObject_HEAD
41 };
42
43 extern PyTypeObject pyesedb_file_types_type_object;
44
45 int pyesedb_file_types_init_type(
46 PyTypeObject *type_object );
47
48 PyObject *pyesedb_file_types_new(
49 void );
50
51 int pyesedb_file_types_init(
52 pyesedb_file_types_t *definitions_object );
53
54 void pyesedb_file_types_free(
55 pyesedb_file_types_t *definitions_object );
56
57 #if defined( __cplusplus )
58 }
59 #endif
60
61 #endif /* !defined( _PYESEDB_FILE_TYPES_H ) */
62
00 /*
1 * Python object definition of the libesedb index
1 * Python object wrapper of libesedb_index_t
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2525 #include <stdlib.h>
2626 #endif
2727
28 #include "pyesedb_column.h"
29 #include "pyesedb_columns.h"
3028 #include "pyesedb_error.h"
31 #include "pyesedb_file.h"
32 #include "pyesedb_integer.h"
29 #include "pyesedb_index.h"
3330 #include "pyesedb_libcerror.h"
34 #include "pyesedb_libcstring.h"
3531 #include "pyesedb_libesedb.h"
3632 #include "pyesedb_python.h"
3733 #include "pyesedb_record.h"
3834 #include "pyesedb_records.h"
39 #include "pyesedb_index.h"
4035 #include "pyesedb_unused.h"
4136
4237 PyMethodDef pyesedb_index_object_methods[] = {
43
44 /* Functions to access the index values */
4538
4639 { "get_identifier",
4740 (PyCFunction) pyesedb_index_get_identifier,
4841 METH_NOARGS,
49 "get_identifier() -> Integer\n"
42 "get_identifier() -> Integer or None\n"
5043 "\n"
5144 "Retrieves the identifier." },
5245
5750 "\n"
5851 "Retrieves the name." },
5952
60 /* Functions to access the records */
61
6253 { "get_number_of_records",
6354 (PyCFunction) pyesedb_index_get_number_of_records,
6455 METH_NOARGS,
65 "get_number_of_records() -> Integer\n"
56 "get_number_of_records() -> Integer or None\n"
6657 "\n"
67 "Retrieves the number of records" },
58 "Retrieves the number of records." },
6859
6960 { "get_record",
7061 (PyCFunction) pyesedb_index_get_record,
7162 METH_VARARGS | METH_KEYWORDS,
72 "get_record(record_index) -> Object or None\n"
63 "get_record(record_entry) -> Object or None\n"
7364 "\n"
74 "Retrieves a specific record" },
65 "Retrieves the record specified by the entry." },
7566
7667 /* Sentinel */
7768 { NULL, NULL, 0, NULL }
9485 { "number_of_records",
9586 (getter) pyesedb_index_get_number_of_records,
9687 (setter) 0,
97 "The number of records",
88 "The number of records.",
9889 NULL },
9990
10091 { "records",
10192 (getter) pyesedb_index_get_records,
10293 (setter) 0,
103 "The records",
94 "The records.",
10495 NULL },
10596
10697 /* Sentinel */
206197 * Returns a Python object if successful or NULL on error
207198 */
208199 PyObject *pyesedb_index_new(
200 PyTypeObject *type_object,
209201 libesedb_index_t *index,
210 pyesedb_file_t *file_object )
202 PyObject *parent_object )
211203 {
212204 pyesedb_index_t *pyesedb_index = NULL;
213205 static char *function = "pyesedb_index_new";
215207 if( index == NULL )
216208 {
217209 PyErr_Format(
218 PyExc_TypeError,
210 PyExc_ValueError,
219211 "%s: invalid index.",
220212 function );
221213
223215 }
224216 pyesedb_index = PyObject_New(
225217 struct pyesedb_index,
226 &pyesedb_index_type_object );
218 type_object );
227219
228220 if( pyesedb_index == NULL )
229221 {
244236
245237 goto on_error;
246238 }
247 pyesedb_index->index = index;
248 pyesedb_index->file_object = file_object;
239 pyesedb_index->index = index;
240 pyesedb_index->parent_object = parent_object;
249241
250242 Py_IncRef(
251 (PyObject *) pyesedb_index->file_object );
243 (PyObject *) pyesedb_index->parent_object );
252244
253245 return( (PyObject *) pyesedb_index );
254246
272264 if( pyesedb_index == NULL )
273265 {
274266 PyErr_Format(
275 PyExc_TypeError,
267 PyExc_ValueError,
276268 "%s: invalid index.",
277269 function );
278270
290282 void pyesedb_index_free(
291283 pyesedb_index_t *pyesedb_index )
292284 {
285 struct _typeobject *ob_type = NULL;
293286 libcerror_error_t *error = NULL;
294 struct _typeobject *ob_type = NULL;
295287 static char *function = "pyesedb_index_free";
288 int result = 0;
296289
297290 if( pyesedb_index == NULL )
298291 {
299292 PyErr_Format(
300 PyExc_TypeError,
293 PyExc_ValueError,
301294 "%s: invalid index.",
295 function );
296
297 return;
298 }
299 if( pyesedb_index->index == NULL )
300 {
301 PyErr_Format(
302 PyExc_ValueError,
303 "%s: invalid index - missing libesedb index.",
302304 function );
303305
304306 return;
324326
325327 return;
326328 }
327 if( pyesedb_index->index == NULL )
328 {
329 PyErr_Format(
330 PyExc_TypeError,
331 "%s: invalid index - missing libesedb index.",
332 function );
333
334 return;
335 }
336 if( libesedb_index_free(
337 &( pyesedb_index->index ),
338 &error ) != 1 )
329 Py_BEGIN_ALLOW_THREADS
330
331 result = libesedb_index_free(
332 &( pyesedb_index->index ),
333 &error );
334
335 Py_END_ALLOW_THREADS
336
337 if( result != 1 )
339338 {
340339 pyesedb_error_raise(
341340 error,
346345 libcerror_error_free(
347346 &error );
348347 }
349 if( pyesedb_index->file_object != NULL )
348 if( pyesedb_index->parent_object != NULL )
350349 {
351350 Py_DecRef(
352 (PyObject *) pyesedb_index->file_object );
351 (PyObject *) pyesedb_index->parent_object );
353352 }
354353 ob_type->tp_free(
355354 (PyObject*) pyesedb_index );
362361 pyesedb_index_t *pyesedb_index,
363362 PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED )
364363 {
364 PyObject *integer_object = NULL;
365365 libcerror_error_t *error = NULL;
366 PyObject *integer_object = NULL;
367366 static char *function = "pyesedb_index_get_identifier";
368 uint32_t identifier = 0;
367 uint32_t value_32bit = 0;
369368 int result = 0;
370369
371370 PYESEDB_UNREFERENCED_PARAMETER( arguments )
373372 if( pyesedb_index == NULL )
374373 {
375374 PyErr_Format(
376 PyExc_TypeError,
375 PyExc_ValueError,
377376 "%s: invalid index.",
378377 function );
379378
383382
384383 result = libesedb_index_get_identifier(
385384 pyesedb_index->index,
386 &identifier,
385 &value_32bit,
387386 &error );
388387
389388 Py_END_ALLOW_THREADS
390389
391 if( result != 1 )
390 if( result == -1 )
392391 {
393392 pyesedb_error_raise(
394393 error,
401400
402401 return( NULL );
403402 }
404 integer_object = pyesedb_integer_unsigned_new_from_64bit(
405 (uint64_t) identifier );
403 else if( result == 0 )
404 {
405 Py_IncRef(
406 Py_None );
407
408 return( Py_None );
409 }
410 integer_object = PyLong_FromUnsignedLong(
411 (unsigned long) value_32bit );
406412
407413 return( integer_object );
408414 }
414420 pyesedb_index_t *pyesedb_index,
415421 PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED )
416422 {
423 PyObject *string_object = NULL;
417424 libcerror_error_t *error = NULL;
418 PyObject *string_object = NULL;
419425 const char *errors = NULL;
420 uint8_t *name = NULL;
421426 static char *function = "pyesedb_index_get_name";
422 size_t name_size = 0;
427 char *utf8_string = NULL;
428 size_t utf8_string_size = 0;
423429 int result = 0;
424430
425431 PYESEDB_UNREFERENCED_PARAMETER( arguments )
427433 if( pyesedb_index == NULL )
428434 {
429435 PyErr_Format(
430 PyExc_TypeError,
436 PyExc_ValueError,
431437 "%s: invalid index.",
432438 function );
433439
437443
438444 result = libesedb_index_get_utf8_name_size(
439445 pyesedb_index->index,
440 &name_size,
446 &utf8_string_size,
441447 &error );
442448
443449 Py_END_ALLOW_THREADS
447453 pyesedb_error_raise(
448454 error,
449455 PyExc_IOError,
450 "%s: unable to retrieve name size.",
456 "%s: unable to determine size of name as UTF-8 string.",
451457 function );
452458
453459 libcerror_error_free(
456462 goto on_error;
457463 }
458464 else if( ( result == 0 )
459 || ( name_size == 0 ) )
465 || ( utf8_string_size == 0 ) )
460466 {
461467 Py_IncRef(
462468 Py_None );
463469
464470 return( Py_None );
465471 }
466 name = (uint8_t *) PyMem_Malloc(
467 sizeof( uint8_t ) * name_size );
468
469 if( name == NULL )
470 {
471 PyErr_Format(
472 PyExc_IOError,
473 "%s: unable to create name.",
472 utf8_string = (char *) PyMem_Malloc(
473 sizeof( char ) * utf8_string_size );
474
475 if( utf8_string == NULL )
476 {
477 PyErr_Format(
478 PyExc_MemoryError,
479 "%s: unable to create UTF-8 string.",
474480 function );
475481
476482 goto on_error;
478484 Py_BEGIN_ALLOW_THREADS
479485
480486 result = libesedb_index_get_utf8_name(
481 pyesedb_index->index,
482 name,
483 name_size,
484 &error );
487 pyesedb_index->index,
488 (uint8_t *) utf8_string,
489 utf8_string_size,
490 &error );
485491
486492 Py_END_ALLOW_THREADS
487493
490496 pyesedb_error_raise(
491497 error,
492498 PyExc_IOError,
493 "%s: unable to retrieve name.",
499 "%s: unable to retrieve name as UTF-8 string.",
494500 function );
495501
496502 libcerror_error_free(
498504
499505 goto on_error;
500506 }
501 /* Pass the string length to PyUnicode_DecodeUTF8
502 * otherwise it makes the end of string character is part
503 * of the string
507 /* Pass the string length to PyUnicode_DecodeUTF8 otherwise it makes
508 * the end of string character is part of the string
504509 */
505510 string_object = PyUnicode_DecodeUTF8(
506 (char *) name,
507 (Py_ssize_t) name_size - 1,
508 errors );
509
511 utf8_string,
512 (Py_ssize_t) utf8_string_size - 1,
513 errors );
514
515 if( string_object == NULL )
516 {
517 PyErr_Format(
518 PyExc_IOError,
519 "%s: unable to convert UTF-8 string into Unicode object.",
520 function );
521
522 goto on_error;
523 }
510524 PyMem_Free(
511 name );
525 utf8_string );
512526
513527 return( string_object );
514528
515529 on_error:
516 if( name != NULL )
530 if( utf8_string != NULL )
517531 {
518532 PyMem_Free(
519 name );
533 utf8_string );
520534 }
521535 return( NULL );
522536 }
528542 pyesedb_index_t *pyesedb_index,
529543 PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED )
530544 {
545 PyObject *integer_object = NULL;
531546 libcerror_error_t *error = NULL;
532 PyObject *integer_object = NULL;
533547 static char *function = "pyesedb_index_get_number_of_records";
534548 int number_of_records = 0;
535549 int result = 0;
539553 if( pyesedb_index == NULL )
540554 {
541555 PyErr_Format(
542 PyExc_TypeError,
556 PyExc_ValueError,
543557 "%s: invalid index.",
544558 function );
545559
581595 * Returns a Python object if successful or NULL on error
582596 */
583597 PyObject *pyesedb_index_get_record_by_index(
584 pyesedb_index_t *pyesedb_index,
598 PyObject *pyesedb_index,
585599 int record_index )
586600 {
601 PyObject *record_object = NULL;
587602 libcerror_error_t *error = NULL;
588603 libesedb_record_t *record = NULL;
589 PyObject *record_object = NULL;
590604 static char *function = "pyesedb_index_get_record_by_index";
591605 int result = 0;
592606
593607 if( pyesedb_index == NULL )
594608 {
595609 PyErr_Format(
596 PyExc_TypeError,
610 PyExc_ValueError,
597611 "%s: invalid index.",
598612 function );
599613
602616 Py_BEGIN_ALLOW_THREADS
603617
604618 result = libesedb_index_get_record(
605 pyesedb_index->index,
619 ( (pyesedb_index_t *) pyesedb_index )->index,
606620 record_index,
607621 &record,
608622 &error );
670684 return( NULL );
671685 }
672686 record_object = pyesedb_index_get_record_by_index(
673 pyesedb_index,
687 (PyObject *) pyesedb_index,
674688 record_index );
675689
676690 return( record_object );
677691 }
678692
679 /* Retrieves a records sequence and iterator object for the records
693 /* Retrieves a sequence and iterator object for the records
680694 * Returns a Python object if successful or NULL on error
681695 */
682696 PyObject *pyesedb_index_get_records(
683697 pyesedb_index_t *pyesedb_index,
684698 PyObject *arguments PYESEDB_ATTRIBUTE_UNUSED )
685699 {
686 libcerror_error_t *error = NULL;
687 PyObject *records_object = NULL;
688 static char *function = "pyesedb_index_get_records";
689 int number_of_records = 0;
690 int result = 0;
700 PyObject *sequence_object = NULL;
701 libcerror_error_t *error = NULL;
702 static char *function = "pyesedb_index_get_records";
703 int number_of_records = 0;
704 int result = 0;
691705
692706 PYESEDB_UNREFERENCED_PARAMETER( arguments )
693707
694708 if( pyesedb_index == NULL )
695709 {
696710 PyErr_Format(
697 PyExc_TypeError,
711 PyExc_ValueError,
698712 "%s: invalid index.",
699713 function );
700714
722736
723737 return( NULL );
724738 }
725 records_object = pyesedb_records_new(
726 (PyObject *) pyesedb_index,
727 (PyObject *(*)(PyObject *, int)) &pyesedb_index_get_record_by_index,
728 number_of_records );
729
730 if( records_object == NULL )
731 {
732 PyErr_Format(
739 sequence_object = pyesedb_records_new(
740 (PyObject *) pyesedb_index,
741 &pyesedb_index_get_record_by_index,
742 number_of_records );
743
744 if( sequence_object == NULL )
745 {
746 pyesedb_error_raise(
747 error,
733748 PyExc_MemoryError,
734 "%s: unable to create records object.",
735 function );
736
737 return( NULL );
738 }
739 return( records_object );
740 }
741
749 "%s: unable to create sequence object.",
750 function );
751
752 return( NULL );
753 }
754 return( sequence_object );
755 }
756
00 /*
1 * Python object definition of the libesedb index
1 * Python object wrapper of libesedb_index_t
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2424 #include <common.h>
2525 #include <types.h>
2626
27 #include "pyesedb_file.h"
2827 #include "pyesedb_libesedb.h"
2928 #include "pyesedb_python.h"
3029
4443 */
4544 libesedb_index_t *index;
4645
47 /* The file object
46 /* The parent object
4847 */
49 pyesedb_file_t *file_object;
48 PyObject *parent_object;
5049 };
5150
5251 extern PyMethodDef pyesedb_index_object_methods[];
5352 extern PyTypeObject pyesedb_index_type_object;
5453
5554 PyObject *pyesedb_index_new(
55 PyTypeObject *type_object,
5656 libesedb_index_t *index,
57 pyesedb_file_t *file_object );
57 PyObject *parent_object );
5858
5959 int pyesedb_index_init(
6060 pyesedb_index_t *pyesedb_index );
7575 PyObject *arguments );
7676
7777 PyObject *pyesedb_index_get_record_by_index(
78 pyesedb_index_t *pyesedb_index,
78 PyObject *pyesedb_index,
7979 int record_index );
8080
8181 PyObject *pyesedb_index_get_record(
9191 }
9292 #endif
9393
94 #endif
94 #endif /* !defined( _PYESEDB_INDEX_H ) */
9595
00 /*
1 * Python object definition of the indexes sequence and iterator
1 * Python object definition of the sequence and iterator object of indexes
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2525 #include <stdlib.h>
2626 #endif
2727
28 #include "pyesedb_index.h"
29 #include "pyesedb_indexes.h"
2830 #include "pyesedb_libcerror.h"
2931 #include "pyesedb_libesedb.h"
3032 #include "pyesedb_python.h"
31 #include "pyesedb_index.h"
32 #include "pyesedb_indexes.h"
33 #include "pyesedb_table.h"
3433
3534 PySequenceMethods pyesedb_indexes_sequence_methods = {
3635 /* sq_length */
9796 /* tp_flags */
9897 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_ITER,
9998 /* tp_doc */
100 "internal pyesedb indexes sequence and iterator object",
99 "pyesedb internal sequence and iterator object of indexes",
101100 /* tp_traverse */
102101 0,
103102 /* tp_clear */
154153 * Returns a Python object if successful or NULL on error
155154 */
156155 PyObject *pyesedb_indexes_new(
157 pyesedb_table_t *table_object,
158 PyObject* (*get_index_by_index)(
159 pyesedb_table_t *table_object,
160 int index_entry ),
161 int number_of_indexes )
162 {
163 pyesedb_indexes_t *pyesedb_indexes = NULL;
164 static char *function = "pyesedb_indexes_new";
165
166 if( table_object == NULL )
167 {
168 PyErr_Format(
169 PyExc_ValueError,
170 "%s: invalid table object.",
171 function );
172
173 return( NULL );
174 }
175 if( get_index_by_index == NULL )
176 {
177 PyErr_Format(
178 PyExc_ValueError,
179 "%s: invalid get index by index function.",
156 PyObject *parent_object,
157 PyObject* (*get_item_by_index)(
158 PyObject *parent_object,
159 int index ),
160 int number_of_items )
161 {
162 pyesedb_indexes_t *indexes_object = NULL;
163 static char *function = "pyesedb_indexes_new";
164
165 if( parent_object == NULL )
166 {
167 PyErr_Format(
168 PyExc_ValueError,
169 "%s: invalid parent object.",
170 function );
171
172 return( NULL );
173 }
174 if( get_item_by_index == NULL )
175 {
176 PyErr_Format(
177 PyExc_ValueError,
178 "%s: invalid get item by index function.",
180179 function );
181180
182181 return( NULL );
183182 }
184183 /* Make sure the indexes values are initialized
185184 */
186 pyesedb_indexes = PyObject_New(
187 struct pyesedb_indexes,
188 &pyesedb_indexes_type_object );
189
190 if( pyesedb_indexes == NULL )
185 indexes_object = PyObject_New(
186 struct pyesedb_indexes,
187 &pyesedb_indexes_type_object );
188
189 if( indexes_object == NULL )
191190 {
192191 PyErr_Format(
193192 PyExc_MemoryError,
194 "%s: unable to initialize indexes.",
193 "%s: unable to create indexes object.",
195194 function );
196195
197196 goto on_error;
198197 }
199198 if( pyesedb_indexes_init(
200 pyesedb_indexes ) != 0 )
199 indexes_object ) != 0 )
201200 {
202201 PyErr_Format(
203202 PyExc_MemoryError,
204 "%s: unable to initialize indexes.",
203 "%s: unable to initialize indexes object.",
205204 function );
206205
207206 goto on_error;
208207 }
209 pyesedb_indexes->table_object = table_object;
210 pyesedb_indexes->get_index_by_index = get_index_by_index;
211 pyesedb_indexes->number_of_indexes = number_of_indexes;
208 indexes_object->parent_object = parent_object;
209 indexes_object->get_item_by_index = get_item_by_index;
210 indexes_object->number_of_items = number_of_items;
212211
213212 Py_IncRef(
214 (PyObject *) pyesedb_indexes->table_object );
215
216 return( (PyObject *) pyesedb_indexes );
213 (PyObject *) indexes_object->parent_object );
214
215 return( (PyObject *) indexes_object );
217216
218217 on_error:
219 if( pyesedb_indexes != NULL )
218 if( indexes_object != NULL )
220219 {
221220 Py_DecRef(
222 (PyObject *) pyesedb_indexes );
221 (PyObject *) indexes_object );
223222 }
224223 return( NULL );
225224 }
226225
227 /* Intializes a indexes object
226 /* Intializes an indexes object
228227 * Returns 0 if successful or -1 on error
229228 */
230229 int pyesedb_indexes_init(
231 pyesedb_indexes_t *pyesedb_indexes )
230 pyesedb_indexes_t *indexes_object )
232231 {
233232 static char *function = "pyesedb_indexes_init";
234233
235 if( pyesedb_indexes == NULL )
236 {
237 PyErr_Format(
238 PyExc_ValueError,
239 "%s: invalid indexes.",
234 if( indexes_object == NULL )
235 {
236 PyErr_Format(
237 PyExc_ValueError,
238 "%s: invalid indexes object.",
240239 function );
241240
242241 return( -1 );
243242 }
244243 /* Make sure the indexes values are initialized
245244 */
246 pyesedb_indexes->table_object = NULL;
247 pyesedb_indexes->get_index_by_index = NULL;
248 pyesedb_indexes->index_entry = 0;
249 pyesedb_indexes->number_of_indexes = 0;
245 indexes_object->parent_object = NULL;
246 indexes_object->get_item_by_index = NULL;
247 indexes_object->current_index = 0;
248 indexes_object->number_of_items = 0;
250249
251250 return( 0 );
252251 }
253252
254 /* Frees a indexes object
253 /* Frees an indexes object
255254 */
256255 void pyesedb_indexes_free(
257 pyesedb_indexes_t *pyesedb_indexes )
256 pyesedb_indexes_t *indexes_object )
258257 {
259258 struct _typeobject *ob_type = NULL;
260259 static char *function = "pyesedb_indexes_free";
261260
262 if( pyesedb_indexes == NULL )
263 {
264 PyErr_Format(
265 PyExc_ValueError,
266 "%s: invalid indexes.",
261 if( indexes_object == NULL )
262 {
263 PyErr_Format(
264 PyExc_ValueError,
265 "%s: invalid indexes object.",
267266 function );
268267
269268 return;
270269 }
271270 ob_type = Py_TYPE(
272 pyesedb_indexes );
271 indexes_object );
273272
274273 if( ob_type == NULL )
275274 {
289288
290289 return;
291290 }
292 if( pyesedb_indexes->table_object != NULL )
291 if( indexes_object->parent_object != NULL )
293292 {
294293 Py_DecRef(
295 (PyObject *) pyesedb_indexes->table_object );
294 (PyObject *) indexes_object->parent_object );
296295 }
297296 ob_type->tp_free(
298 (PyObject*) pyesedb_indexes );
297 (PyObject*) indexes_object );
299298 }
300299
301300 /* The indexes len() function
302301 */
303302 Py_ssize_t pyesedb_indexes_len(
304 pyesedb_indexes_t *pyesedb_indexes )
303 pyesedb_indexes_t *indexes_object )
305304 {
306305 static char *function = "pyesedb_indexes_len";
307306
308 if( pyesedb_indexes == NULL )
309 {
310 PyErr_Format(
311 PyExc_ValueError,
312 "%s: invalid indexes.",
307 if( indexes_object == NULL )
308 {
309 PyErr_Format(
310 PyExc_ValueError,
311 "%s: invalid indexes object.",
313312 function );
314313
315314 return( -1 );
316315 }
317 return( (Py_ssize_t) pyesedb_indexes->number_of_indexes );
316 return( (Py_ssize_t) indexes_object->number_of_items );
318317 }
319318
320319 /* The indexes getitem() function
321320 */
322321 PyObject *pyesedb_indexes_getitem(
323 pyesedb_indexes_t *pyesedb_indexes,
322 pyesedb_indexes_t *indexes_object,
324323 Py_ssize_t item_index )
325324 {
326325 PyObject *index_object = NULL;
327326 static char *function = "pyesedb_indexes_getitem";
328327
329 if( pyesedb_indexes == NULL )
330 {
331 PyErr_Format(
332 PyExc_ValueError,
333 "%s: invalid indexes.",
334 function );
335
336 return( NULL );
337 }
338 if( pyesedb_indexes->get_index_by_index == NULL )
339 {
340 PyErr_Format(
341 PyExc_ValueError,
342 "%s: invalid indexes - missing get index by index function.",
343 function );
344
345 return( NULL );
346 }
347 if( pyesedb_indexes->number_of_indexes < 0 )
348 {
349 PyErr_Format(
350 PyExc_ValueError,
351 "%s: invalid indexes - invalid number of indexes.",
328 if( indexes_object == NULL )
329 {
330 PyErr_Format(
331 PyExc_ValueError,
332 "%s: invalid indexes object.",
333 function );
334
335 return( NULL );
336 }
337 if( indexes_object->get_item_by_index == NULL )
338 {
339 PyErr_Format(
340 PyExc_ValueError,
341 "%s: invalid indexes object - missing get item by index function.",
342 function );
343
344 return( NULL );
345 }
346 if( indexes_object->number_of_items < 0 )
347 {
348 PyErr_Format(
349 PyExc_ValueError,
350 "%s: invalid indexes object - invalid number of items.",
352351 function );
353352
354353 return( NULL );
355354 }
356355 if( ( item_index < 0 )
357 || ( item_index >= (Py_ssize_t) pyesedb_indexes->number_of_indexes ) )
356 || ( item_index >= (Py_ssize_t) indexes_object->number_of_items ) )
358357 {
359358 PyErr_Format(
360359 PyExc_ValueError,
363362
364363 return( NULL );
365364 }
366 index_object = pyesedb_indexes->get_index_by_index(
367 pyesedb_indexes->table_object,
365 index_object = indexes_object->get_item_by_index(
366 indexes_object->parent_object,
368367 (int) item_index );
369368
370369 return( index_object );
373372 /* The indexes iter() function
374373 */
375374 PyObject *pyesedb_indexes_iter(
376 pyesedb_indexes_t *pyesedb_indexes )
375 pyesedb_indexes_t *indexes_object )
377376 {
378377 static char *function = "pyesedb_indexes_iter";
379378
380 if( pyesedb_indexes == NULL )
381 {
382 PyErr_Format(
383 PyExc_ValueError,
384 "%s: invalid indexes.",
379 if( indexes_object == NULL )
380 {
381 PyErr_Format(
382 PyExc_ValueError,
383 "%s: invalid indexes object.",
385384 function );
386385
387386 return( NULL );
388387 }
389388 Py_IncRef(
390 (PyObject *) pyesedb_indexes );
391
392 return( (PyObject *) pyesedb_indexes );
389 (PyObject *) indexes_object );
390
391 return( (PyObject *) indexes_object );
393392 }
394393
395394 /* The indexes iternext() function
396395 */
397396 PyObject *pyesedb_indexes_iternext(
398 pyesedb_indexes_t *pyesedb_indexes )
397 pyesedb_indexes_t *indexes_object )
399398 {
400399 PyObject *index_object = NULL;
401400 static char *function = "pyesedb_indexes_iternext";
402401
403 if( pyesedb_indexes == NULL )
404 {
405 PyErr_Format(
406 PyExc_ValueError,
407 "%s: invalid indexes.",
408 function );
409
410 return( NULL );
411 }
412 if( pyesedb_indexes->get_index_by_index == NULL )
413 {
414 PyErr_Format(
415 PyExc_ValueError,
416 "%s: invalid indexes - missing get index by index function.",
417 function );
418
419 return( NULL );
420 }
421 if( pyesedb_indexes->index_entry < 0 )
422 {
423 PyErr_Format(
424 PyExc_ValueError,
425 "%s: invalid indexes - invalid index entry.",
426 function );
427
428 return( NULL );
429 }
430 if( pyesedb_indexes->number_of_indexes < 0 )
431 {
432 PyErr_Format(
433 PyExc_ValueError,
434 "%s: invalid indexes - invalid number of indexes.",
435 function );
436
437 return( NULL );
438 }
439 if( pyesedb_indexes->index_entry >= pyesedb_indexes->number_of_indexes )
402 if( indexes_object == NULL )
403 {
404 PyErr_Format(
405 PyExc_ValueError,
406 "%s: invalid indexes object.",
407 function );
408
409 return( NULL );
410 }
411 if( indexes_object->get_item_by_index == NULL )
412 {
413 PyErr_Format(
414 PyExc_ValueError,
415 "%s: invalid indexes object - missing get item by index function.",
416 function );
417
418 return( NULL );
419 }
420 if( indexes_object->current_index < 0 )
421 {
422 PyErr_Format(
423 PyExc_ValueError,
424 "%s: invalid indexes object - invalid current index.",
425 function );
426
427 return( NULL );
428 }
429 if( indexes_object->number_of_items < 0 )
430 {
431 PyErr_Format(
432 PyExc_ValueError,
433 "%s: invalid indexes object - invalid number of items.",
434 function );
435
436 return( NULL );
437 }
438 if( indexes_object->current_index >= indexes_object->number_of_items )
440439 {
441440 PyErr_SetNone(
442441 PyExc_StopIteration );
443442
444443 return( NULL );
445444 }
446 index_object = pyesedb_indexes->get_index_by_index(
447 pyesedb_indexes->table_object,
448 pyesedb_indexes->index_entry );
445 index_object = indexes_object->get_item_by_index(
446 indexes_object->parent_object,
447 indexes_object->current_index );
449448
450449 if( index_object != NULL )
451450 {
452 pyesedb_indexes->index_entry++;
451 indexes_object->current_index++;
453452 }
454453 return( index_object );
455454 }
00 /*
1 * Python object definition of the indexes sequence and iterator
1 * Python object definition of the sequence and iterator object of indexes
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2626
2727 #include "pyesedb_libesedb.h"
2828 #include "pyesedb_python.h"
29 #include "pyesedb_table.h"
3029
3130 #if defined( __cplusplus )
3231 extern "C" {
4039 */
4140 PyObject_HEAD
4241
43 /* The table object
42 /* The parent object
4443 */
45 pyesedb_table_t *table_object;
44 PyObject *parent_object;
4645
47 /* The get index by index callback function
46 /* The get item by index callback function
4847 */
49 PyObject* (*get_index_by_index)(
50 pyesedb_table_t *table_object,
51 int index_entry );
48 PyObject* (*get_item_by_index)(
49 PyObject *parent_object,
50 int index );
5251
53 /* The (current) index entry
52 /* The current index
5453 */
55 int index_entry;
54 int current_index;
5655
57 /* The number of indexes
56 /* The number of items
5857 */
59 int number_of_indexes;
58 int number_of_items;
6059 };
6160
6261 extern PyTypeObject pyesedb_indexes_type_object;
6362
6463 PyObject *pyesedb_indexes_new(
65 pyesedb_table_t *table_object,
66 PyObject* (*get_index_by_index)(
67 pyesedb_table_t *table_object,
68 int index_entry ),
69 int number_of_indexes );
64 PyObject *parent_object,
65 PyObject* (*get_item_by_index)(
66 PyObject *parent_object,
67 int index ),
68 int number_of_items );
7069
7170 int pyesedb_indexes_init(
72 pyesedb_indexes_t *pyesedb_indexes );
71 pyesedb_indexes_t *indexes_object );
7372
7473 void pyesedb_indexes_free(
75 pyesedb_indexes_t *pyesedb_indexes );
74 pyesedb_indexes_t *indexes_object );
7675
7776 Py_ssize_t pyesedb_indexes_len(
78 pyesedb_indexes_t *pyesedb_indexes );
77 pyesedb_indexes_t *indexes_object );
7978
8079 PyObject *pyesedb_indexes_getitem(
81 pyesedb_indexes_t *pyesedb_indexes,
80 pyesedb_indexes_t *indexes_object,
8281 Py_ssize_t item_index );
8382
8483 PyObject *pyesedb_indexes_iter(
85 pyesedb_indexes_t *pyesedb_indexes );
84 pyesedb_indexes_t *indexes_object );
8685
8786 PyObject *pyesedb_indexes_iternext(
88 pyesedb_indexes_t *pyesedb_indexes );
87 pyesedb_indexes_t *indexes_object );
8988
9089 #if defined( __cplusplus )
9190 }
9291 #endif
9392
94 #endif
93 #endif /* !defined( _PYESEDB_INDEXES_H ) */
9594
00 /*
11 * Integer functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Integer functions
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The libbfio header wrapper
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4747
4848 #include <libbfio.h>
4949
50 #endif
50 #endif /* defined( HAVE_LOCAL_LIBBFIO ) */
5151
52 #endif
52 #endif /* !defined( _PYESEDB_LIBBFIO_H ) */
5353
00 /*
11 * The internal libcerror header
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * The internal libclocale header
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
+0
-51
pyesedb/pyesedb_libcstring.h less more
0 /*
1 * The internal libcstring header
2 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _PYESEDB_LIBCSTRING_H )
22 #define _PYESEDB_LIBCSTRING_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring
27 */
28 #if defined( HAVE_LOCAL_LIBCSTRING )
29
30 #include <libcstring_definitions.h>
31 #include <libcstring_narrow_string.h>
32 #include <libcstring_system_string.h>
33 #include <libcstring_types.h>
34 #include <libcstring_wide_string.h>
35
36 #else
37
38 /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT
39 * before including libcstring.h
40 */
41 #if defined( _WIN32 ) && defined( DLL_IMPORT )
42 #define LIBCSTRING_DLL_IMPORT
43 #endif
44
45 #include <libcstring.h>
46
47 #endif /* defined( HAVE_LOCAL_LIBCSTRING ) */
48
49 #endif /* !defined( _PYESEDB_LIBCSTRING_H ) */
50
00 /*
11 * The internal libesedb header
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Python object definition of the libesedb long value
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2828 #include "pyesedb_error.h"
2929 #include "pyesedb_integer.h"
3030 #include "pyesedb_libcerror.h"
31 #include "pyesedb_libcstring.h"
3231 #include "pyesedb_libesedb.h"
3332 #include "pyesedb_long_value.h"
3433 #include "pyesedb_python.h"
00 /*
11 * Python object definition of the libesedb long value
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
7474 }
7575 #endif
7676
77 #endif
77 #endif /* !defined( _PYESEDB_LONG_VALUE_H ) */
7878
00 /*
11 * Python object definition of the libesedb multi value
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Python object definition of the libesedb multi value
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
8888 }
8989 #endif
9090
91 #endif
91 #endif /* !defined( _PYESEDB_MULTI_VALUE_H ) */
9292
00 /*
11 * The python header wrapper
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Python object definition of the libesedb record
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2828 #include "pyesedb_error.h"
2929 #include "pyesedb_integer.h"
3030 #include "pyesedb_libcerror.h"
31 #include "pyesedb_libcstring.h"
3231 #include "pyesedb_libesedb.h"
3332 #include "pyesedb_long_value.h"
3433 #include "pyesedb_python.h"
00 /*
11 * Python object definition of the libesedb record
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
119119 }
120120 #endif
121121
122 #endif
122 #endif /* !defined( _PYESEDB_RECORD_H ) */
123123
00 /*
1 * Python object definition of the records sequence and iterator
1 * Python object definition of the sequence and iterator object of records
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
9696 /* tp_flags */
9797 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_ITER,
9898 /* tp_doc */
99 "internal pyesedb records sequence and iterator object",
99 "pyesedb internal sequence and iterator object of records",
100100 /* tp_traverse */
101101 0,
102102 /* tp_clear */
154154 */
155155 PyObject *pyesedb_records_new(
156156 PyObject *parent_object,
157 PyObject* (*get_record_by_index)(
157 PyObject* (*get_item_by_index)(
158158 PyObject *parent_object,
159 int record_entry ),
160 int number_of_records )
161 {
162 pyesedb_records_t *pyesedb_records = NULL;
163 static char *function = "pyesedb_records_new";
159 int index ),
160 int number_of_items )
161 {
162 pyesedb_records_t *records_object = NULL;
163 static char *function = "pyesedb_records_new";
164164
165165 if( parent_object == NULL )
166166 {
171171
172172 return( NULL );
173173 }
174 if( get_record_by_index == NULL )
175 {
176 PyErr_Format(
177 PyExc_ValueError,
178 "%s: invalid get record by index function.",
174 if( get_item_by_index == NULL )
175 {
176 PyErr_Format(
177 PyExc_ValueError,
178 "%s: invalid get item by index function.",
179179 function );
180180
181181 return( NULL );
182182 }
183183 /* Make sure the records values are initialized
184184 */
185 pyesedb_records = PyObject_New(
186 struct pyesedb_records,
187 &pyesedb_records_type_object );
188
189 if( pyesedb_records == NULL )
185 records_object = PyObject_New(
186 struct pyesedb_records,
187 &pyesedb_records_type_object );
188
189 if( records_object == NULL )
190190 {
191191 PyErr_Format(
192192 PyExc_MemoryError,
193 "%s: unable to initialize records.",
193 "%s: unable to create records object.",
194194 function );
195195
196196 goto on_error;
197197 }
198198 if( pyesedb_records_init(
199 pyesedb_records ) != 0 )
199 records_object ) != 0 )
200200 {
201201 PyErr_Format(
202202 PyExc_MemoryError,
203 "%s: unable to initialize records.",
203 "%s: unable to initialize records object.",
204204 function );
205205
206206 goto on_error;
207207 }
208 pyesedb_records->parent_object = parent_object;
209 pyesedb_records->get_record_by_index = get_record_by_index;
210 pyesedb_records->number_of_records = number_of_records;
208 records_object->parent_object = parent_object;
209 records_object->get_item_by_index = get_item_by_index;
210 records_object->number_of_items = number_of_items;
211211
212212 Py_IncRef(
213 (PyObject *) pyesedb_records->parent_object );
214
215 return( (PyObject *) pyesedb_records );
213 (PyObject *) records_object->parent_object );
214
215 return( (PyObject *) records_object );
216216
217217 on_error:
218 if( pyesedb_records != NULL )
218 if( records_object != NULL )
219219 {
220220 Py_DecRef(
221 (PyObject *) pyesedb_records );
221 (PyObject *) records_object );
222222 }
223223 return( NULL );
224224 }
227227 * Returns 0 if successful or -1 on error
228228 */
229229 int pyesedb_records_init(
230 pyesedb_records_t *pyesedb_records )
230 pyesedb_records_t *records_object )
231231 {
232232 static char *function = "pyesedb_records_init";
233233
234 if( pyesedb_records == NULL )
235 {
236 PyErr_Format(
237 PyExc_ValueError,
238 "%s: invalid records.",
234 if( records_object == NULL )
235 {
236 PyErr_Format(
237 PyExc_ValueError,
238 "%s: invalid records object.",
239239 function );
240240
241241 return( -1 );
242242 }
243243 /* Make sure the records values are initialized
244244 */
245 pyesedb_records->parent_object = NULL;
246 pyesedb_records->get_record_by_index = NULL;
247 pyesedb_records->record_entry = 0;
248 pyesedb_records->number_of_records = 0;
245 records_object->parent_object = NULL;
246 records_object->get_item_by_index = NULL;
247 records_object->current_index = 0;
248 records_object->number_of_items = 0;
249249
250250 return( 0 );
251251 }
253253 /* Frees a records object
254254 */
255255 void pyesedb_records_free(
256 pyesedb_records_t *pyesedb_records )
256 pyesedb_records_t *records_object )
257257 {
258258 struct _typeobject *ob_type = NULL;
259259 static char *function = "pyesedb_records_free";
260260
261 if( pyesedb_records == NULL )
262 {
263 PyErr_Format(
264 PyExc_ValueError,
265 "%s: invalid records.",
261 if( records_object == NULL )
262 {
263 PyErr_Format(
264 PyExc_ValueError,
265 "%s: invalid records object.",
266266 function );
267267
268268 return;
269269 }
270270 ob_type = Py_TYPE(
271 pyesedb_records );
271 records_object );
272272
273273 if( ob_type == NULL )
274274 {
288288
289289 return;
290290 }
291 if( pyesedb_records->parent_object != NULL )
291 if( records_object->parent_object != NULL )
292292 {
293293 Py_DecRef(
294 (PyObject *) pyesedb_records->parent_object );
294 (PyObject *) records_object->parent_object );
295295 }
296296 ob_type->tp_free(
297 (PyObject*) pyesedb_records );
297 (PyObject*) records_object );
298298 }
299299
300300 /* The records len() function
301301 */
302302 Py_ssize_t pyesedb_records_len(
303 pyesedb_records_t *pyesedb_records )
303 pyesedb_records_t *records_object )
304304 {
305305 static char *function = "pyesedb_records_len";
306306
307 if( pyesedb_records == NULL )
308 {
309 PyErr_Format(
310 PyExc_ValueError,
311 "%s: invalid records.",
307 if( records_object == NULL )
308 {
309 PyErr_Format(
310 PyExc_ValueError,
311 "%s: invalid records object.",
312312 function );
313313
314314 return( -1 );
315315 }
316 return( (Py_ssize_t) pyesedb_records->number_of_records );
316 return( (Py_ssize_t) records_object->number_of_items );
317317 }
318318
319319 /* The records getitem() function
320320 */
321321 PyObject *pyesedb_records_getitem(
322 pyesedb_records_t *pyesedb_records,
322 pyesedb_records_t *records_object,
323323 Py_ssize_t item_index )
324324 {
325325 PyObject *record_object = NULL;
326326 static char *function = "pyesedb_records_getitem";
327327
328 if( pyesedb_records == NULL )
329 {
330 PyErr_Format(
331 PyExc_ValueError,
332 "%s: invalid records.",
333 function );
334
335 return( NULL );
336 }
337 if( pyesedb_records->get_record_by_index == NULL )
338 {
339 PyErr_Format(
340 PyExc_ValueError,
341 "%s: invalid records - missing get record by index function.",
342 function );
343
344 return( NULL );
345 }
346 if( pyesedb_records->number_of_records < 0 )
347 {
348 PyErr_Format(
349 PyExc_ValueError,
350 "%s: invalid records - invalid number of records.",
328 if( records_object == NULL )
329 {
330 PyErr_Format(
331 PyExc_ValueError,
332 "%s: invalid records object.",
333 function );
334
335 return( NULL );
336 }
337 if( records_object->get_item_by_index == NULL )
338 {
339 PyErr_Format(
340 PyExc_ValueError,
341 "%s: invalid records object - missing get item by index function.",
342 function );
343
344 return( NULL );
345 }
346 if( records_object->number_of_items < 0 )
347 {
348 PyErr_Format(
349 PyExc_ValueError,
350 "%s: invalid records object - invalid number of items.",
351351 function );
352352
353353 return( NULL );
354354 }
355355 if( ( item_index < 0 )
356 || ( item_index >= (Py_ssize_t) pyesedb_records->number_of_records ) )
356 || ( item_index >= (Py_ssize_t) records_object->number_of_items ) )
357357 {
358358 PyErr_Format(
359359 PyExc_ValueError,
362362
363363 return( NULL );
364364 }
365 record_object = pyesedb_records->get_record_by_index(
366 pyesedb_records->parent_object,
365 record_object = records_object->get_item_by_index(
366 records_object->parent_object,
367367 (int) item_index );
368368
369369 return( record_object );
372372 /* The records iter() function
373373 */
374374 PyObject *pyesedb_records_iter(
375 pyesedb_records_t *pyesedb_records )
375 pyesedb_records_t *records_object )
376376 {
377377 static char *function = "pyesedb_records_iter";
378378
379 if( pyesedb_records == NULL )
380 {
381 PyErr_Format(
382 PyExc_ValueError,
383 "%s: invalid records.",
379 if( records_object == NULL )
380 {
381 PyErr_Format(
382 PyExc_ValueError,
383 "%s: invalid records object.",
384384 function );
385385
386386 return( NULL );
387387 }
388388 Py_IncRef(
389 (PyObject *) pyesedb_records );
390
391 return( (PyObject *) pyesedb_records );
389 (PyObject *) records_object );
390
391 return( (PyObject *) records_object );
392392 }
393393
394394 /* The records iternext() function
395395 */
396396 PyObject *pyesedb_records_iternext(
397 pyesedb_records_t *pyesedb_records )
397 pyesedb_records_t *records_object )
398398 {
399399 PyObject *record_object = NULL;
400400 static char *function = "pyesedb_records_iternext";
401401
402 if( pyesedb_records == NULL )
403 {
404 PyErr_Format(
405 PyExc_ValueError,
406 "%s: invalid records.",
407 function );
408
409 return( NULL );
410 }
411 if( pyesedb_records->get_record_by_index == NULL )
412 {
413 PyErr_Format(
414 PyExc_ValueError,
415 "%s: invalid records - missing get record by index function.",
416 function );
417
418 return( NULL );
419 }
420 if( pyesedb_records->record_entry < 0 )
421 {
422 PyErr_Format(
423 PyExc_ValueError,
424 "%s: invalid records - invalid record entry.",
425 function );
426
427 return( NULL );
428 }
429 if( pyesedb_records->number_of_records < 0 )
430 {
431 PyErr_Format(
432 PyExc_ValueError,
433 "%s: invalid records - invalid number of records.",
434 function );
435
436 return( NULL );
437 }
438 if( pyesedb_records->record_entry >= pyesedb_records->number_of_records )
402 if( records_object == NULL )
403 {
404 PyErr_Format(
405 PyExc_ValueError,
406 "%s: invalid records object.",
407 function );
408
409 return( NULL );
410 }
411 if( records_object->get_item_by_index == NULL )
412 {
413 PyErr_Format(
414 PyExc_ValueError,
415 "%s: invalid records object - missing get item by index function.",
416 function );
417
418 return( NULL );
419 }
420 if( records_object->current_index < 0 )
421 {
422 PyErr_Format(
423 PyExc_ValueError,
424 "%s: invalid records object - invalid current index.",
425 function );
426
427 return( NULL );
428 }
429 if( records_object->number_of_items < 0 )
430 {
431 PyErr_Format(
432 PyExc_ValueError,
433 "%s: invalid records object - invalid number of items.",
434 function );
435
436 return( NULL );
437 }
438 if( records_object->current_index >= records_object->number_of_items )
439439 {
440440 PyErr_SetNone(
441441 PyExc_StopIteration );
442442
443443 return( NULL );
444444 }
445 record_object = pyesedb_records->get_record_by_index(
446 pyesedb_records->parent_object,
447 pyesedb_records->record_entry );
445 record_object = records_object->get_item_by_index(
446 records_object->parent_object,
447 records_object->current_index );
448448
449449 if( record_object != NULL )
450450 {
451 pyesedb_records->record_entry++;
451 records_object->current_index++;
452452 }
453453 return( record_object );
454454 }
00 /*
1 * Python object definition of the records sequence and iterator
1 * Python object definition of the sequence and iterator object of records
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3939 */
4040 PyObject_HEAD
4141
42 /* The parent (table or index) object
42 /* The parent object
4343 */
4444 PyObject *parent_object;
4545
46 /* The get record by index callback function
46 /* The get item by index callback function
4747 */
48 PyObject* (*get_record_by_index)(
48 PyObject* (*get_item_by_index)(
4949 PyObject *parent_object,
50 int record_entry );
50 int index );
5151
52 /* The (current) record entry
52 /* The current index
5353 */
54 int record_entry;
54 int current_index;
5555
56 /* The number of records
56 /* The number of items
5757 */
58 int number_of_records;
58 int number_of_items;
5959 };
6060
6161 extern PyTypeObject pyesedb_records_type_object;
6262
6363 PyObject *pyesedb_records_new(
6464 PyObject *parent_object,
65 PyObject* (*get_record_by_index)(
65 PyObject* (*get_item_by_index)(
6666 PyObject *parent_object,
67 int record_entry ),
68 int number_of_records );
67 int index ),
68 int number_of_items );
6969
7070 int pyesedb_records_init(
71 pyesedb_records_t *pyesedb_records );
71 pyesedb_records_t *records_object );
7272
7373 void pyesedb_records_free(
74 pyesedb_records_t *pyesedb_records );
74 pyesedb_records_t *records_object );
7575
7676 Py_ssize_t pyesedb_records_len(
77 pyesedb_records_t *pyesedb_records );
77 pyesedb_records_t *records_object );
7878
7979 PyObject *pyesedb_records_getitem(
80 pyesedb_records_t *pyesedb_records,
80 pyesedb_records_t *records_object,
8181 Py_ssize_t item_index );
8282
8383 PyObject *pyesedb_records_iter(
84 pyesedb_records_t *pyesedb_records );
84 pyesedb_records_t *records_object );
8585
8686 PyObject *pyesedb_records_iternext(
87 pyesedb_records_t *pyesedb_records );
87 pyesedb_records_t *records_object );
8888
8989 #if defined( __cplusplus )
9090 }
9191 #endif
9292
93 #endif
93 #endif /* !defined( _PYESEDB_RECORDS_H ) */
9494
00 /*
11 * Python object definition of the libesedb table
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
3131 #include "pyesedb_file.h"
3232 #include "pyesedb_integer.h"
3333 #include "pyesedb_libcerror.h"
34 #include "pyesedb_libcstring.h"
3534 #include "pyesedb_libesedb.h"
3635 #include "pyesedb_python.h"
3736 #include "pyesedb_record.h"
248247 */
249248 PyObject *pyesedb_table_new(
250249 libesedb_table_t *table,
251 pyesedb_file_t *file_object )
250 PyObject *file_object )
252251 {
253252 pyesedb_table_t *pyesedb_table = NULL;
254253 static char *function = "pyesedb_table_new";
737736 * Returns a Python object if successful or NULL on error
738737 */
739738 PyObject *pyesedb_table_get_column_by_index(
740 pyesedb_table_t *pyesedb_table,
739 PyObject *pyesedb_table,
741740 int column_index )
742741 {
743742 libcerror_error_t *error = NULL;
758757 Py_BEGIN_ALLOW_THREADS
759758
760759 result = libesedb_table_get_column(
761 pyesedb_table->table,
760 ( (pyesedb_table_t *) pyesedb_table )->table,
762761 column_index,
763762 &column,
764763 0,
781780 goto on_error;
782781 }
783782 column_object = pyesedb_column_new(
783 &pyesedb_column_type_object,
784784 column,
785785 pyesedb_table );
786786
827827 return( NULL );
828828 }
829829 column_object = pyesedb_table_get_column_by_index(
830 pyesedb_table,
830 (PyObject *) pyesedb_table,
831831 column_index );
832832
833833 return( column_object );
881881 return( NULL );
882882 }
883883 columns_object = pyesedb_columns_new(
884 pyesedb_table,
884 (PyObject *) pyesedb_table,
885885 &pyesedb_table_get_column_by_index,
886886 number_of_columns );
887887
957957 * Returns a Python object if successful or NULL on error
958958 */
959959 PyObject *pyesedb_table_get_record_by_index(
960 pyesedb_table_t *pyesedb_table,
960 PyObject *pyesedb_table,
961961 int record_index )
962962 {
963963 libcerror_error_t *error = NULL;
978978 Py_BEGIN_ALLOW_THREADS
979979
980980 result = libesedb_table_get_record(
981 pyesedb_table->table,
981 ( (pyesedb_table_t *) pyesedb_table )->table,
982982 record_index,
983983 &record,
984984 &error );
10461046 return( NULL );
10471047 }
10481048 record_object = pyesedb_table_get_record_by_index(
1049 pyesedb_table,
1049 (PyObject *) pyesedb_table,
10501050 record_index );
10511051
10521052 return( record_object );
11001100 }
11011101 records_object = pyesedb_records_new(
11021102 (PyObject *) pyesedb_table,
1103 (PyObject *(*)(PyObject *, int)) &pyesedb_table_get_record_by_index,
1103 &pyesedb_table_get_record_by_index,
11041104 number_of_records );
11051105
11061106 if( records_object == NULL )
00 /*
11 * Python object definition of the libesedb table
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4646
4747 /* The file object
4848 */
49 pyesedb_file_t *file_object;
49 PyObject *file_object;
5050 };
5151
5252 extern PyMethodDef pyesedb_table_object_methods[];
5454
5555 PyObject *pyesedb_table_new(
5656 libesedb_table_t *table,
57 pyesedb_file_t *file_object );
57 PyObject *file_object );
5858
5959 int pyesedb_table_init(
6060 pyesedb_table_t *pyesedb_table );
7979 PyObject *arguments );
8080
8181 PyObject *pyesedb_table_get_column_by_index(
82 pyesedb_table_t *pyesedb_table,
82 PyObject *pyesedb_table,
8383 int column_index );
8484
8585 PyObject *pyesedb_table_get_column(
9696 PyObject *arguments );
9797
9898 PyObject *pyesedb_table_get_record_by_index(
99 pyesedb_table_t *pyesedb_table,
99 PyObject *pyesedb_table,
100100 int record_index );
101101
102102 PyObject *pyesedb_table_get_record(
112112 }
113113 #endif
114114
115 #endif
115 #endif /* !defined( _PYESEDB_TABLE_H ) */
116116
00 /*
1 * Python object definition of the tables sequence and iterator
1 * Python object definition of the sequence and iterator object of tables
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2525 #include <stdlib.h>
2626 #endif
2727
28 #include "pyesedb_file.h"
2928 #include "pyesedb_libcerror.h"
3029 #include "pyesedb_libesedb.h"
3130 #include "pyesedb_python.h"
9796 /* tp_flags */
9897 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_ITER,
9998 /* tp_doc */
100 "internal pyesedb tables sequence and iterator object",
99 "pyesedb internal sequence and iterator object of tables",
101100 /* tp_traverse */
102101 0,
103102 /* tp_clear */
154153 * Returns a Python object if successful or NULL on error
155154 */
156155 PyObject *pyesedb_tables_new(
157 pyesedb_file_t *file_object,
158 PyObject* (*get_table_by_index)(
159 pyesedb_file_t *file_object,
160 int table_entry ),
161 int number_of_tables )
162 {
163 pyesedb_tables_t *pyesedb_tables = NULL;
164 static char *function = "pyesedb_tables_new";
165
166 if( file_object == NULL )
167 {
168 PyErr_Format(
169 PyExc_ValueError,
170 "%s: invalid file object.",
171 function );
172
173 return( NULL );
174 }
175 if( get_table_by_index == NULL )
176 {
177 PyErr_Format(
178 PyExc_ValueError,
179 "%s: invalid get table by index function.",
156 PyObject *parent_object,
157 PyObject* (*get_item_by_index)(
158 PyObject *parent_object,
159 int index ),
160 int number_of_items )
161 {
162 pyesedb_tables_t *tables_object = NULL;
163 static char *function = "pyesedb_tables_new";
164
165 if( parent_object == NULL )
166 {
167 PyErr_Format(
168 PyExc_ValueError,
169 "%s: invalid parent object.",
170 function );
171
172 return( NULL );
173 }
174 if( get_item_by_index == NULL )
175 {
176 PyErr_Format(
177 PyExc_ValueError,
178 "%s: invalid get item by index function.",
180179 function );
181180
182181 return( NULL );
183182 }
184183 /* Make sure the tables values are initialized
185184 */
186 pyesedb_tables = PyObject_New(
187 struct pyesedb_tables,
188 &pyesedb_tables_type_object );
189
190 if( pyesedb_tables == NULL )
185 tables_object = PyObject_New(
186 struct pyesedb_tables,
187 &pyesedb_tables_type_object );
188
189 if( tables_object == NULL )
191190 {
192191 PyErr_Format(
193192 PyExc_MemoryError,
194 "%s: unable to initialize tables.",
193 "%s: unable to create tables object.",
195194 function );
196195
197196 goto on_error;
198197 }
199198 if( pyesedb_tables_init(
200 pyesedb_tables ) != 0 )
199 tables_object ) != 0 )
201200 {
202201 PyErr_Format(
203202 PyExc_MemoryError,
204 "%s: unable to initialize tables.",
203 "%s: unable to initialize tables object.",
205204 function );
206205
207206 goto on_error;
208207 }
209 pyesedb_tables->file_object = file_object;
210 pyesedb_tables->get_table_by_index = get_table_by_index;
211 pyesedb_tables->number_of_tables = number_of_tables;
208 tables_object->parent_object = parent_object;
209 tables_object->get_item_by_index = get_item_by_index;
210 tables_object->number_of_items = number_of_items;
212211
213212 Py_IncRef(
214 (PyObject *) pyesedb_tables->file_object );
215
216 return( (PyObject *) pyesedb_tables );
213 (PyObject *) tables_object->parent_object );
214
215 return( (PyObject *) tables_object );
217216
218217 on_error:
219 if( pyesedb_tables != NULL )
218 if( tables_object != NULL )
220219 {
221220 Py_DecRef(
222 (PyObject *) pyesedb_tables );
221 (PyObject *) tables_object );
223222 }
224223 return( NULL );
225224 }
228227 * Returns 0 if successful or -1 on error
229228 */
230229 int pyesedb_tables_init(
231 pyesedb_tables_t *pyesedb_tables )
230 pyesedb_tables_t *tables_object )
232231 {
233232 static char *function = "pyesedb_tables_init";
234233
235 if( pyesedb_tables == NULL )
236 {
237 PyErr_Format(
238 PyExc_ValueError,
239 "%s: invalid tables.",
234 if( tables_object == NULL )
235 {
236 PyErr_Format(
237 PyExc_ValueError,
238 "%s: invalid tables object.",
240239 function );
241240
242241 return( -1 );
243242 }
244243 /* Make sure the tables values are initialized
245244 */
246 pyesedb_tables->file_object = NULL;
247 pyesedb_tables->get_table_by_index = NULL;
248 pyesedb_tables->table_entry = 0;
249 pyesedb_tables->number_of_tables = 0;
245 tables_object->parent_object = NULL;
246 tables_object->get_item_by_index = NULL;
247 tables_object->current_index = 0;
248 tables_object->number_of_items = 0;
250249
251250 return( 0 );
252251 }
254253 /* Frees a tables object
255254 */
256255 void pyesedb_tables_free(
257 pyesedb_tables_t *pyesedb_tables )
256 pyesedb_tables_t *tables_object )
258257 {
259258 struct _typeobject *ob_type = NULL;
260259 static char *function = "pyesedb_tables_free";
261260
262 if( pyesedb_tables == NULL )
263 {
264 PyErr_Format(
265 PyExc_ValueError,
266 "%s: invalid tables.",
261 if( tables_object == NULL )
262 {
263 PyErr_Format(
264 PyExc_ValueError,
265 "%s: invalid tables object.",
267266 function );
268267
269268 return;
270269 }
271270 ob_type = Py_TYPE(
272 pyesedb_tables );
271 tables_object );
273272
274273 if( ob_type == NULL )
275274 {
289288
290289 return;
291290 }
292 if( pyesedb_tables->file_object != NULL )
291 if( tables_object->parent_object != NULL )
293292 {
294293 Py_DecRef(
295 (PyObject *) pyesedb_tables->file_object );
294 (PyObject *) tables_object->parent_object );
296295 }
297296 ob_type->tp_free(
298 (PyObject*) pyesedb_tables );
297 (PyObject*) tables_object );
299298 }
300299
301300 /* The tables len() function
302301 */
303302 Py_ssize_t pyesedb_tables_len(
304 pyesedb_tables_t *pyesedb_tables )
303 pyesedb_tables_t *tables_object )
305304 {
306305 static char *function = "pyesedb_tables_len";
307306
308 if( pyesedb_tables == NULL )
309 {
310 PyErr_Format(
311 PyExc_ValueError,
312 "%s: invalid tables.",
307 if( tables_object == NULL )
308 {
309 PyErr_Format(
310 PyExc_ValueError,
311 "%s: invalid tables object.",
313312 function );
314313
315314 return( -1 );
316315 }
317 return( (Py_ssize_t) pyesedb_tables->number_of_tables );
316 return( (Py_ssize_t) tables_object->number_of_items );
318317 }
319318
320319 /* The tables getitem() function
321320 */
322321 PyObject *pyesedb_tables_getitem(
323 pyesedb_tables_t *pyesedb_tables,
322 pyesedb_tables_t *tables_object,
324323 Py_ssize_t item_index )
325324 {
326325 PyObject *table_object = NULL;
327 static char *function = "pyesedb_tables_getitem";
328
329 if( pyesedb_tables == NULL )
330 {
331 PyErr_Format(
332 PyExc_ValueError,
333 "%s: invalid tables.",
334 function );
335
336 return( NULL );
337 }
338 if( pyesedb_tables->get_table_by_index == NULL )
339 {
340 PyErr_Format(
341 PyExc_ValueError,
342 "%s: invalid tables - missing get table by index function.",
343 function );
344
345 return( NULL );
346 }
347 if( pyesedb_tables->number_of_tables < 0 )
348 {
349 PyErr_Format(
350 PyExc_ValueError,
351 "%s: invalid tables - invalid number of tables.",
326 static char *function = "pyesedb_tables_getitem";
327
328 if( tables_object == NULL )
329 {
330 PyErr_Format(
331 PyExc_ValueError,
332 "%s: invalid tables object.",
333 function );
334
335 return( NULL );
336 }
337 if( tables_object->get_item_by_index == NULL )
338 {
339 PyErr_Format(
340 PyExc_ValueError,
341 "%s: invalid tables object - missing get item by index function.",
342 function );
343
344 return( NULL );
345 }
346 if( tables_object->number_of_items < 0 )
347 {
348 PyErr_Format(
349 PyExc_ValueError,
350 "%s: invalid tables object - invalid number of items.",
352351 function );
353352
354353 return( NULL );
355354 }
356355 if( ( item_index < 0 )
357 || ( item_index >= (Py_ssize_t) pyesedb_tables->number_of_tables ) )
356 || ( item_index >= (Py_ssize_t) tables_object->number_of_items ) )
358357 {
359358 PyErr_Format(
360359 PyExc_ValueError,
363362
364363 return( NULL );
365364 }
366 table_object = pyesedb_tables->get_table_by_index(
367 pyesedb_tables->file_object,
365 table_object = tables_object->get_item_by_index(
366 tables_object->parent_object,
368367 (int) item_index );
369368
370369 return( table_object );
373372 /* The tables iter() function
374373 */
375374 PyObject *pyesedb_tables_iter(
376 pyesedb_tables_t *pyesedb_tables )
375 pyesedb_tables_t *tables_object )
377376 {
378377 static char *function = "pyesedb_tables_iter";
379378
380 if( pyesedb_tables == NULL )
381 {
382 PyErr_Format(
383 PyExc_ValueError,
384 "%s: invalid tables.",
379 if( tables_object == NULL )
380 {
381 PyErr_Format(
382 PyExc_ValueError,
383 "%s: invalid tables object.",
385384 function );
386385
387386 return( NULL );
388387 }
389388 Py_IncRef(
390 (PyObject *) pyesedb_tables );
391
392 return( (PyObject *) pyesedb_tables );
389 (PyObject *) tables_object );
390
391 return( (PyObject *) tables_object );
393392 }
394393
395394 /* The tables iternext() function
396395 */
397396 PyObject *pyesedb_tables_iternext(
398 pyesedb_tables_t *pyesedb_tables )
397 pyesedb_tables_t *tables_object )
399398 {
400399 PyObject *table_object = NULL;
401400 static char *function = "pyesedb_tables_iternext";
402401
403 if( pyesedb_tables == NULL )
404 {
405 PyErr_Format(
406 PyExc_ValueError,
407 "%s: invalid tables.",
408 function );
409
410 return( NULL );
411 }
412 if( pyesedb_tables->get_table_by_index == NULL )
413 {
414 PyErr_Format(
415 PyExc_ValueError,
416 "%s: invalid tables - missing get table by index function.",
417 function );
418
419 return( NULL );
420 }
421 if( pyesedb_tables->table_entry < 0 )
422 {
423 PyErr_Format(
424 PyExc_ValueError,
425 "%s: invalid tables - invalid table entry.",
426 function );
427
428 return( NULL );
429 }
430 if( pyesedb_tables->number_of_tables < 0 )
431 {
432 PyErr_Format(
433 PyExc_ValueError,
434 "%s: invalid tables - invalid number of tables.",
435 function );
436
437 return( NULL );
438 }
439 if( pyesedb_tables->table_entry >= pyesedb_tables->number_of_tables )
402 if( tables_object == NULL )
403 {
404 PyErr_Format(
405 PyExc_ValueError,
406 "%s: invalid tables object.",
407 function );
408
409 return( NULL );
410 }
411 if( tables_object->get_item_by_index == NULL )
412 {
413 PyErr_Format(
414 PyExc_ValueError,
415 "%s: invalid tables object - missing get item by index function.",
416 function );
417
418 return( NULL );
419 }
420 if( tables_object->current_index < 0 )
421 {
422 PyErr_Format(
423 PyExc_ValueError,
424 "%s: invalid tables object - invalid current index.",
425 function );
426
427 return( NULL );
428 }
429 if( tables_object->number_of_items < 0 )
430 {
431 PyErr_Format(
432 PyExc_ValueError,
433 "%s: invalid tables object - invalid number of items.",
434 function );
435
436 return( NULL );
437 }
438 if( tables_object->current_index >= tables_object->number_of_items )
440439 {
441440 PyErr_SetNone(
442441 PyExc_StopIteration );
443442
444443 return( NULL );
445444 }
446 table_object = pyesedb_tables->get_table_by_index(
447 pyesedb_tables->file_object,
448 pyesedb_tables->table_entry );
445 table_object = tables_object->get_item_by_index(
446 tables_object->parent_object,
447 tables_object->current_index );
449448
450449 if( table_object != NULL )
451450 {
452 pyesedb_tables->table_entry++;
451 tables_object->current_index++;
453452 }
454453 return( table_object );
455454 }
00 /*
1 * Python object definition of the tables sequence and iterator
1 * Python object definition of the sequence and iterator object of tables
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
2424 #include <common.h>
2525 #include <types.h>
2626
27 #include "pyesedb_file.h"
2827 #include "pyesedb_libesedb.h"
2928 #include "pyesedb_python.h"
3029
4039 */
4140 PyObject_HEAD
4241
43 /* The file object
42 /* The parent object
4443 */
45 pyesedb_file_t *file_object;
44 PyObject *parent_object;
4645
47 /* The get table by index callback function
46 /* The get item by index callback function
4847 */
49 PyObject* (*get_table_by_index)(
50 pyesedb_file_t *file_object,
51 int table_entry );
48 PyObject* (*get_item_by_index)(
49 PyObject *parent_object,
50 int index );
5251
53 /* The (current) table entry
52 /* The current index
5453 */
55 int table_entry;
54 int current_index;
5655
57 /* The number of tables
56 /* The number of items
5857 */
59 int number_of_tables;
58 int number_of_items;
6059 };
6160
6261 extern PyTypeObject pyesedb_tables_type_object;
6362
6463 PyObject *pyesedb_tables_new(
65 pyesedb_file_t *file_object,
66 PyObject* (*get_table_by_index)(
67 pyesedb_file_t *file_object,
68 int table_entry ),
69 int number_of_tables );
64 PyObject *parent_object,
65 PyObject* (*get_item_by_index)(
66 PyObject *parent_object,
67 int index ),
68 int number_of_items );
7069
7170 int pyesedb_tables_init(
72 pyesedb_tables_t *pyesedb_tables );
71 pyesedb_tables_t *tables_object );
7372
7473 void pyesedb_tables_free(
75 pyesedb_tables_t *pyesedb_tables );
74 pyesedb_tables_t *tables_object );
7675
7776 Py_ssize_t pyesedb_tables_len(
78 pyesedb_tables_t *pyesedb_tables );
77 pyesedb_tables_t *tables_object );
7978
8079 PyObject *pyesedb_tables_getitem(
81 pyesedb_tables_t *pyesedb_tables,
80 pyesedb_tables_t *tables_object,
8281 Py_ssize_t item_index );
8382
8483 PyObject *pyesedb_tables_iter(
85 pyesedb_tables_t *pyesedb_tables );
84 pyesedb_tables_t *tables_object );
8685
8786 PyObject *pyesedb_tables_iternext(
88 pyesedb_tables_t *pyesedb_tables );
87 pyesedb_tables_t *tables_object );
8988
9089 #if defined( __cplusplus )
9190 }
9291 #endif
9392
94 #endif
93 #endif /* !defined( _PYESEDB_TABLES_H ) */
9594
00 /*
11 * The internal unused definition
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
00 /*
11 * Python object definition of the libesedb value flags
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
218218 PyObject *pyesedb_value_flags_new(
219219 void )
220220 {
221 pyesedb_value_flags_t *pyesedb_value_flags = NULL;
222 static char *function = "pyesedb_value_flags_new";
223
224 pyesedb_value_flags = PyObject_New(
225 struct pyesedb_value_flags,
226 &pyesedb_value_flags_type_object );
227
228 if( pyesedb_value_flags == NULL )
221 pyesedb_value_flags_t *definitions_object = NULL;
222 static char *function = "pyesedb_value_flags_new";
223
224 definitions_object = PyObject_New(
225 struct pyesedb_value_flags,
226 &pyesedb_value_flags_type_object );
227
228 if( definitions_object == NULL )
229229 {
230230 PyErr_Format(
231231 PyExc_MemoryError,
232 "%s: unable to initialize value flags.",
232 "%s: unable to create definitions object.",
233233 function );
234234
235235 goto on_error;
236236 }
237237 if( pyesedb_value_flags_init(
238 pyesedb_value_flags ) != 0 )
238 definitions_object ) != 0 )
239239 {
240240 PyErr_Format(
241241 PyExc_MemoryError,
242 "%s: unable to initialize value flags.",
243 function );
244
245 goto on_error;
246 }
247 return( (PyObject *) pyesedb_value_flags );
242 "%s: unable to initialize definitions object.",
243 function );
244
245 goto on_error;
246 }
247 return( (PyObject *) definitions_object );
248248
249249 on_error:
250 if( pyesedb_value_flags != NULL )
250 if( definitions_object != NULL )
251251 {
252252 Py_DecRef(
253 (PyObject *) pyesedb_value_flags );
253 (PyObject *) definitions_object );
254254 }
255255 return( NULL );
256256 }
259259 * Returns 0 if successful or -1 on error
260260 */
261261 int pyesedb_value_flags_init(
262 pyesedb_value_flags_t *pyesedb_value_flags )
262 pyesedb_value_flags_t *definitions_object )
263263 {
264264 static char *function = "pyesedb_value_flags_init";
265265
266 if( pyesedb_value_flags == NULL )
266 if( definitions_object == NULL )
267267 {
268268 PyErr_Format(
269269 PyExc_TypeError,
270 "%s: invalid value flags.",
270 "%s: invalid definitions object.",
271271 function );
272272
273273 return( -1 );
278278 /* Frees a value flags object
279279 */
280280 void pyesedb_value_flags_free(
281 pyesedb_value_flags_t *pyesedb_value_flags )
281 pyesedb_value_flags_t *definitions_object )
282282 {
283283 struct _typeobject *ob_type = NULL;
284284 static char *function = "pyesedb_value_flags_free";
285285
286 if( pyesedb_value_flags == NULL )
286 if( definitions_object == NULL )
287287 {
288288 PyErr_Format(
289289 PyExc_TypeError,
290 "%s: invalid value flags.",
290 "%s: invalid definitions object.",
291291 function );
292292
293293 return;
294294 }
295295 ob_type = Py_TYPE(
296 pyesedb_value_flags );
296 definitions_object );
297297
298298 if( ob_type == NULL )
299299 {
314314 return;
315315 }
316316 ob_type->tp_free(
317 (PyObject*) pyesedb_value_flags );
317 (PyObject*) definitions_object );
318318 }
319319
00 /*
11 * Python object definition of the libesedb value flags
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
4949 void );
5050
5151 int pyesedb_value_flags_init(
52 pyesedb_value_flags_t *pyesedb_value_flags );
52 pyesedb_value_flags_t *definitions_object );
5353
5454 void pyesedb_value_flags_free(
55 pyesedb_value_flags_t *pyesedb_value_flags );
55 pyesedb_value_flags_t *definitions_object );
5656
5757 #if defined( __cplusplus )
5858 }
5959 #endif
6060
61 #endif
61 #endif /* !defined( _PYESEDB_VALUE_FLAGS_H ) */
6262
77 AM_CFLAGS = \
88 -I$(top_srcdir)/include \
99 -I$(top_srcdir)/common \
10 @LIBCSTRING_CPPFLAGS@ \
1110 @LIBCERROR_CPPFLAGS@ \
1211 @LIBCDATA_CPPFLAGS@ \
1312 @LIBCLOCALE_CPPFLAGS@ \
2726 pyesedb_error.c pyesedb_error.h \
2827 pyesedb_file.c pyesedb_file.h \
2928 pyesedb_file_object_io_handle.c pyesedb_file_object_io_handle.h \
29 pyesedb_file_types.c pyesedb_file_types.h \
3030 pyesedb_index.c pyesedb_index.h \
3131 pyesedb_indexes.c pyesedb_indexes.h \
3232 pyesedb_integer.c pyesedb_integer.h \
3333 pyesedb_libbfio.h \
3434 pyesedb_libcerror.h \
3535 pyesedb_libclocale.h \
36 pyesedb_libcstring.h \
3736 pyesedb_libesedb.h \
3837 pyesedb_long_value.c pyesedb_long_value.h \
3938 pyesedb_multi_value.c pyesedb_multi_value.h \
5049 nodist_pyesedb_la_SOURCES = $(BUILT_SOURCES)
5150
5251 pyesedb_la_LIBADD = \
53 @LIBCSTRING_LIBADD@ \
5452 @LIBCERROR_LIBADD@ \
5553 ../libesedb/libesedb.la \
5654 @LIBCDATA_LIBADD@ \
9797 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9898 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9999 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101100 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102101 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103102 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
108107 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109108 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110109 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
110 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
111 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
113112 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114113 $(ACLOCAL_M4)
115114 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
154153 @HAVE_PYTHON2_TRUE@ pyesedb_la-pyesedb_error.lo \
155154 @HAVE_PYTHON2_TRUE@ pyesedb_la-pyesedb_file.lo \
156155 @HAVE_PYTHON2_TRUE@ pyesedb_la-pyesedb_file_object_io_handle.lo \
156 @HAVE_PYTHON2_TRUE@ pyesedb_la-pyesedb_file_types.lo \
157157 @HAVE_PYTHON2_TRUE@ pyesedb_la-pyesedb_index.lo \
158158 @HAVE_PYTHON2_TRUE@ pyesedb_la-pyesedb_indexes.lo \
159159 @HAVE_PYTHON2_TRUE@ pyesedb_la-pyesedb_integer.lo \
276276 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
277277 HAVE_LIBCPATH = @HAVE_LIBCPATH@
278278 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
279 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
280 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
281279 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
282280 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
283281 HAVE_LIBFDATA = @HAVE_LIBFDATA@
296294 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
297295 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
298296 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
299 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
300 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
301297 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
302298 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
303299 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
344340 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
345341 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
346342 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
347 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
348 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
349 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
350 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
351343 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
352344 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
353345 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
380372 LTLIBICONV = @LTLIBICONV@
381373 LTLIBINTL = @LTLIBINTL@
382374 LTLIBOBJS = @LTLIBOBJS@
375 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
383376 MAKEINFO = @MAKEINFO@
384377 MANIFEST_TOOL = @MANIFEST_TOOL@
385378 MKDIR_P = @MKDIR_P@
486479 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
487480 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
488481 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
489 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
490 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
491 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
492 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
493 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
494 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
495482 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
496483 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
497484 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
560547 libcpath_LIBS = @libcpath_LIBS@
561548 libcsplit_CFLAGS = @libcsplit_CFLAGS@
562549 libcsplit_LIBS = @libcsplit_LIBS@
563 libcstring_CFLAGS = @libcstring_CFLAGS@
564 libcstring_LIBS = @libcstring_LIBS@
565 libcsystem_CFLAGS = @libcsystem_CFLAGS@
566 libcsystem_LIBS = @libcsystem_LIBS@
567550 libcthreads_CFLAGS = @libcthreads_CFLAGS@
568551 libcthreads_LIBS = @libcthreads_LIBS@
569552 libdir = @libdir@
620603 @HAVE_PYTHON2_TRUE@AM_CFLAGS = \
621604 @HAVE_PYTHON2_TRUE@ -I$(top_srcdir)/include \
622605 @HAVE_PYTHON2_TRUE@ -I$(top_srcdir)/common \
623 @HAVE_PYTHON2_TRUE@ @LIBCSTRING_CPPFLAGS@ \
624606 @HAVE_PYTHON2_TRUE@ @LIBCERROR_CPPFLAGS@ \
625607 @HAVE_PYTHON2_TRUE@ @LIBCDATA_CPPFLAGS@ \
626608 @HAVE_PYTHON2_TRUE@ @LIBCLOCALE_CPPFLAGS@ \
639621 @HAVE_PYTHON2_TRUE@ pyesedb_error.c pyesedb_error.h \
640622 @HAVE_PYTHON2_TRUE@ pyesedb_file.c pyesedb_file.h \
641623 @HAVE_PYTHON2_TRUE@ pyesedb_file_object_io_handle.c pyesedb_file_object_io_handle.h \
624 @HAVE_PYTHON2_TRUE@ pyesedb_file_types.c pyesedb_file_types.h \
642625 @HAVE_PYTHON2_TRUE@ pyesedb_index.c pyesedb_index.h \
643626 @HAVE_PYTHON2_TRUE@ pyesedb_indexes.c pyesedb_indexes.h \
644627 @HAVE_PYTHON2_TRUE@ pyesedb_integer.c pyesedb_integer.h \
645628 @HAVE_PYTHON2_TRUE@ pyesedb_libbfio.h \
646629 @HAVE_PYTHON2_TRUE@ pyesedb_libcerror.h \
647630 @HAVE_PYTHON2_TRUE@ pyesedb_libclocale.h \
648 @HAVE_PYTHON2_TRUE@ pyesedb_libcstring.h \
649631 @HAVE_PYTHON2_TRUE@ pyesedb_libesedb.h \
650632 @HAVE_PYTHON2_TRUE@ pyesedb_long_value.c pyesedb_long_value.h \
651633 @HAVE_PYTHON2_TRUE@ pyesedb_multi_value.c pyesedb_multi_value.h \
660642 @HAVE_PYTHON2_TRUE@pyexec_LTLIBRARIES = pyesedb.la
661643 @HAVE_PYTHON2_TRUE@nodist_pyesedb_la_SOURCES = $(BUILT_SOURCES)
662644 @HAVE_PYTHON2_TRUE@pyesedb_la_LIBADD = \
663 @HAVE_PYTHON2_TRUE@ @LIBCSTRING_LIBADD@ \
664645 @HAVE_PYTHON2_TRUE@ @LIBCERROR_LIBADD@ \
665646 @HAVE_PYTHON2_TRUE@ ../libesedb/libesedb.la \
666647 @HAVE_PYTHON2_TRUE@ @LIBCDATA_LIBADD@ \
761742 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_error.Plo@am__quote@
762743 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_file.Plo@am__quote@
763744 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_file_object_io_handle.Plo@am__quote@
745 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_file_types.Plo@am__quote@
764746 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_index.Plo@am__quote@
765747 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_indexes.Plo@am__quote@
766748 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_integer.Plo@am__quote@
848830 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb_file_object_io_handle.c' object='pyesedb_la-pyesedb_file_object_io_handle.lo' libtool=yes @AMDEPBACKSLASH@
849831 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
850832 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb_file_object_io_handle.lo `test -f 'pyesedb_file_object_io_handle.c' || echo '$(srcdir)/'`pyesedb_file_object_io_handle.c
833
834 pyesedb_la-pyesedb_file_types.lo: pyesedb_file_types.c
835 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb_file_types.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb_file_types.Tpo -c -o pyesedb_la-pyesedb_file_types.lo `test -f 'pyesedb_file_types.c' || echo '$(srcdir)/'`pyesedb_file_types.c
836 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyesedb_la-pyesedb_file_types.Tpo $(DEPDIR)/pyesedb_la-pyesedb_file_types.Plo
837 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb_file_types.c' object='pyesedb_la-pyesedb_file_types.lo' libtool=yes @AMDEPBACKSLASH@
838 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
839 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb_file_types.lo `test -f 'pyesedb_file_types.c' || echo '$(srcdir)/'`pyesedb_file_types.c
851840
852841 pyesedb_la-pyesedb_index.lo: pyesedb_index.c
853842 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb_index.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb_index.Tpo -c -o pyesedb_la-pyesedb_index.lo `test -f 'pyesedb_index.c' || echo '$(srcdir)/'`pyesedb_index.c
77 AM_CFLAGS = \
88 -I$(top_srcdir)/include \
99 -I$(top_srcdir)/common \
10 @LIBCSTRING_CPPFLAGS@ \
1110 @LIBCERROR_CPPFLAGS@ \
1211 @LIBCDATA_CPPFLAGS@ \
1312 @LIBCLOCALE_CPPFLAGS@ \
2726 pyesedb_error.c pyesedb_error.h \
2827 pyesedb_file.c pyesedb_file.h \
2928 pyesedb_file_object_io_handle.c pyesedb_file_object_io_handle.h \
29 pyesedb_file_types.c pyesedb_file_types.h \
3030 pyesedb_index.c pyesedb_index.h \
3131 pyesedb_indexes.c pyesedb_indexes.h \
3232 pyesedb_integer.c pyesedb_integer.h \
3333 pyesedb_libbfio.h \
3434 pyesedb_libcerror.h \
3535 pyesedb_libclocale.h \
36 pyesedb_libcstring.h \
3736 pyesedb_libesedb.h \
3837 pyesedb_long_value.c pyesedb_long_value.h \
3938 pyesedb_multi_value.c pyesedb_multi_value.h \
5049 nodist_pyesedb_la_SOURCES = $(BUILT_SOURCES)
5150
5251 pyesedb_la_LIBADD = \
53 @LIBCSTRING_LIBADD@ \
5452 @LIBCERROR_LIBADD@ \
5553 ../libesedb/libesedb.la \
5654 @LIBCDATA_LIBADD@ \
9797 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
9898 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
9999 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
100 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
101100 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
102101 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
103102 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
108107 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
109108 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
110109 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
111 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
112 $(top_srcdir)/configure.ac
110 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
111 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
113112 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
114113 $(ACLOCAL_M4)
115114 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
154153 @HAVE_PYTHON3_TRUE@ pyesedb_la-pyesedb_error.lo \
155154 @HAVE_PYTHON3_TRUE@ pyesedb_la-pyesedb_file.lo \
156155 @HAVE_PYTHON3_TRUE@ pyesedb_la-pyesedb_file_object_io_handle.lo \
156 @HAVE_PYTHON3_TRUE@ pyesedb_la-pyesedb_file_types.lo \
157157 @HAVE_PYTHON3_TRUE@ pyesedb_la-pyesedb_index.lo \
158158 @HAVE_PYTHON3_TRUE@ pyesedb_la-pyesedb_indexes.lo \
159159 @HAVE_PYTHON3_TRUE@ pyesedb_la-pyesedb_integer.lo \
276276 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
277277 HAVE_LIBCPATH = @HAVE_LIBCPATH@
278278 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
279 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
280 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
281279 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
282280 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
283281 HAVE_LIBFDATA = @HAVE_LIBFDATA@
296294 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
297295 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
298296 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
299 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
300 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
301297 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
302298 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
303299 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
344340 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
345341 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
346342 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
347 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
348 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
349 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
350 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
351343 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
352344 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
353345 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
380372 LTLIBICONV = @LTLIBICONV@
381373 LTLIBINTL = @LTLIBINTL@
382374 LTLIBOBJS = @LTLIBOBJS@
375 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
383376 MAKEINFO = @MAKEINFO@
384377 MANIFEST_TOOL = @MANIFEST_TOOL@
385378 MKDIR_P = @MKDIR_P@
486479 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
487480 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
488481 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
489 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
490 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
491 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
492 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
493 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
494 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
495482 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
496483 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
497484 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
560547 libcpath_LIBS = @libcpath_LIBS@
561548 libcsplit_CFLAGS = @libcsplit_CFLAGS@
562549 libcsplit_LIBS = @libcsplit_LIBS@
563 libcstring_CFLAGS = @libcstring_CFLAGS@
564 libcstring_LIBS = @libcstring_LIBS@
565 libcsystem_CFLAGS = @libcsystem_CFLAGS@
566 libcsystem_LIBS = @libcsystem_LIBS@
567550 libcthreads_CFLAGS = @libcthreads_CFLAGS@
568551 libcthreads_LIBS = @libcthreads_LIBS@
569552 libdir = @libdir@
620603 @HAVE_PYTHON3_TRUE@AM_CFLAGS = \
621604 @HAVE_PYTHON3_TRUE@ -I$(top_srcdir)/include \
622605 @HAVE_PYTHON3_TRUE@ -I$(top_srcdir)/common \
623 @HAVE_PYTHON3_TRUE@ @LIBCSTRING_CPPFLAGS@ \
624606 @HAVE_PYTHON3_TRUE@ @LIBCERROR_CPPFLAGS@ \
625607 @HAVE_PYTHON3_TRUE@ @LIBCDATA_CPPFLAGS@ \
626608 @HAVE_PYTHON3_TRUE@ @LIBCLOCALE_CPPFLAGS@ \
639621 @HAVE_PYTHON3_TRUE@ pyesedb_error.c pyesedb_error.h \
640622 @HAVE_PYTHON3_TRUE@ pyesedb_file.c pyesedb_file.h \
641623 @HAVE_PYTHON3_TRUE@ pyesedb_file_object_io_handle.c pyesedb_file_object_io_handle.h \
624 @HAVE_PYTHON3_TRUE@ pyesedb_file_types.c pyesedb_file_types.h \
642625 @HAVE_PYTHON3_TRUE@ pyesedb_index.c pyesedb_index.h \
643626 @HAVE_PYTHON3_TRUE@ pyesedb_indexes.c pyesedb_indexes.h \
644627 @HAVE_PYTHON3_TRUE@ pyesedb_integer.c pyesedb_integer.h \
645628 @HAVE_PYTHON3_TRUE@ pyesedb_libbfio.h \
646629 @HAVE_PYTHON3_TRUE@ pyesedb_libcerror.h \
647630 @HAVE_PYTHON3_TRUE@ pyesedb_libclocale.h \
648 @HAVE_PYTHON3_TRUE@ pyesedb_libcstring.h \
649631 @HAVE_PYTHON3_TRUE@ pyesedb_libesedb.h \
650632 @HAVE_PYTHON3_TRUE@ pyesedb_long_value.c pyesedb_long_value.h \
651633 @HAVE_PYTHON3_TRUE@ pyesedb_multi_value.c pyesedb_multi_value.h \
660642 @HAVE_PYTHON3_TRUE@pyexec_LTLIBRARIES = pyesedb.la
661643 @HAVE_PYTHON3_TRUE@nodist_pyesedb_la_SOURCES = $(BUILT_SOURCES)
662644 @HAVE_PYTHON3_TRUE@pyesedb_la_LIBADD = \
663 @HAVE_PYTHON3_TRUE@ @LIBCSTRING_LIBADD@ \
664645 @HAVE_PYTHON3_TRUE@ @LIBCERROR_LIBADD@ \
665646 @HAVE_PYTHON3_TRUE@ ../libesedb/libesedb.la \
666647 @HAVE_PYTHON3_TRUE@ @LIBCDATA_LIBADD@ \
761742 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_error.Plo@am__quote@
762743 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_file.Plo@am__quote@
763744 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_file_object_io_handle.Plo@am__quote@
745 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_file_types.Plo@am__quote@
764746 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_index.Plo@am__quote@
765747 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_indexes.Plo@am__quote@
766748 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pyesedb_la-pyesedb_integer.Plo@am__quote@
848830 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb_file_object_io_handle.c' object='pyesedb_la-pyesedb_file_object_io_handle.lo' libtool=yes @AMDEPBACKSLASH@
849831 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
850832 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb_file_object_io_handle.lo `test -f 'pyesedb_file_object_io_handle.c' || echo '$(srcdir)/'`pyesedb_file_object_io_handle.c
833
834 pyesedb_la-pyesedb_file_types.lo: pyesedb_file_types.c
835 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb_file_types.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb_file_types.Tpo -c -o pyesedb_la-pyesedb_file_types.lo `test -f 'pyesedb_file_types.c' || echo '$(srcdir)/'`pyesedb_file_types.c
836 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pyesedb_la-pyesedb_file_types.Tpo $(DEPDIR)/pyesedb_la-pyesedb_file_types.Plo
837 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pyesedb_file_types.c' object='pyesedb_la-pyesedb_file_types.lo' libtool=yes @AMDEPBACKSLASH@
838 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
839 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pyesedb_la-pyesedb_file_types.lo `test -f 'pyesedb_file_types.c' || echo '$(srcdir)/'`pyesedb_file_types.c
851840
852841 pyesedb_la-pyesedb_index.lo: pyesedb_index.c
853842 @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pyesedb_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pyesedb_la-pyesedb_index.lo -MD -MP -MF $(DEPDIR)/pyesedb_la-pyesedb_index.Tpo -c -o pyesedb_la-pyesedb_index.lo `test -f 'pyesedb_index.c' || echo '$(srcdir)/'`pyesedb_index.c
00 AM_CPPFLAGS = \
11 -I$(top_srcdir)/include \
22 -I$(top_srcdir)/common \
3 @LIBCSTRING_CPPFLAGS@ \
43 @LIBCERROR_CPPFLAGS@ \
54 @LIBCDATA_CPPFLAGS@ \
65 @LIBCLOCALE_CPPFLAGS@ \
109 @LIBCFILE_CPPFLAGS@ \
1110 @LIBCPATH_CPPFLAGS@ \
1211 @LIBBFIO_CPPFLAGS@ \
13 @LIBCSYSTEM_CPPFLAGS@ \
12 @LIBFCACHE_CPPFLAGS@ \
13 @LIBFDATA_CPPFLAGS@ \
14 @LIBFDATETIME_CPPFLAGS@ \
15 @LIBFGUID_CPPFLAGS@ \
16 @LIBFVALUE_CPPFLAGS@ \
17 @LIBFWNT_CPPFLAGS@ \
18 @PTHREAD_CPPFLAGS@ \
1419 @LIBESEDB_DLL_IMPORT@
1520
1621 if HAVE_PYTHON_TESTS
1722 TESTS_PYESEDB = \
18 test_python_functions.sh
23 test_python_module.sh
1924 endif
2025
2126 TESTS = \
22 test_api_functions.sh \
27 test_library.sh \
2328 test_esedbinfo.sh \
2429 test_esedbexport.sh \
2530 $(TESTS_PYESEDB)
2631
2732 check_SCRIPTS = \
28 pyesedb_test_get_version.py \
29 pyesedb_test_open_close.py \
30 test_api_functions.sh \
33 pyesedb_test_support.py \
3134 test_esedbexport.sh \
3235 test_esedbinfo.sh \
33 test_python_functions.sh \
36 test_library.sh \
37 test_python_module.sh \
3438 test_runner.sh
3539
3640 EXTRA_DIST = \
3741 $(check_SCRIPTS)
3842
3943 check_PROGRAMS = \
40 esedb_test_get_version \
41 esedb_test_open_close
42
43 esedb_test_get_version_SOURCES = \
44 esedb_test_get_version.c \
45 esedb_test_libcstring.h \
46 esedb_test_libesedb.h \
47 esedb_test_unused.h
48
49 esedb_test_get_version_LDADD = \
50 ../libesedb/libesedb.la \
51 @LIBCSTRING_LIBADD@
52
53 esedb_test_open_close_SOURCES = \
54 esedb_test_libcerror.h \
55 esedb_test_libcstring.h \
56 esedb_test_libcsystem.h \
57 esedb_test_libesedb.h \
58 esedb_test_open_close.c
59
60 esedb_test_open_close_LDADD = \
61 @LIBCSYSTEM_LIBADD@ \
62 ../libesedb/libesedb.la \
44 esedb_test_catalog \
45 esedb_test_catalog_definition \
46 esedb_test_column \
47 esedb_test_column_type \
48 esedb_test_data_definition \
49 esedb_test_data_segment \
50 esedb_test_database \
51 esedb_test_error \
52 esedb_test_file \
53 esedb_test_index \
54 esedb_test_io_handle \
55 esedb_test_key \
56 esedb_test_long_value \
57 esedb_test_multi_value \
58 esedb_test_notify \
59 esedb_test_page \
60 esedb_test_page_tree \
61 esedb_test_page_value \
62 esedb_test_record \
63 esedb_test_support \
64 esedb_test_table \
65 esedb_test_table_definition
66
67 esedb_test_catalog_SOURCES = \
68 esedb_test_catalog.c \
69 esedb_test_libcerror.h \
70 esedb_test_libesedb.h \
71 esedb_test_macros.h \
72 esedb_test_memory.c esedb_test_memory.h \
73 esedb_test_unused.h
74
75 esedb_test_catalog_LDADD = \
76 ../libesedb/libesedb.la \
77 @LIBCERROR_LIBADD@
78
79 esedb_test_catalog_definition_SOURCES = \
80 esedb_test_catalog_definition.c \
81 esedb_test_libcerror.h \
82 esedb_test_libesedb.h \
83 esedb_test_macros.h \
84 esedb_test_memory.c esedb_test_memory.h \
85 esedb_test_unused.h
86
87 esedb_test_catalog_definition_LDADD = \
88 ../libesedb/libesedb.la \
89 @LIBCERROR_LIBADD@
90
91 esedb_test_column_SOURCES = \
92 esedb_test_column.c \
93 esedb_test_libcerror.h \
94 esedb_test_libesedb.h \
95 esedb_test_macros.h \
96 esedb_test_memory.c esedb_test_memory.h \
97 esedb_test_unused.h
98
99 esedb_test_column_LDADD = \
100 ../libesedb/libesedb.la \
101 @LIBCERROR_LIBADD@
102
103 esedb_test_column_type_SOURCES = \
104 esedb_test_column_type.c \
105 esedb_test_libcerror.h \
106 esedb_test_libesedb.h \
107 esedb_test_macros.h \
108 esedb_test_memory.c esedb_test_memory.h \
109 esedb_test_unused.h
110
111 esedb_test_column_type_LDADD = \
112 ../libesedb/libesedb.la \
113 @LIBCERROR_LIBADD@
114
115 esedb_test_data_definition_SOURCES = \
116 esedb_test_data_definition.c \
117 esedb_test_libcerror.h \
118 esedb_test_libesedb.h \
119 esedb_test_macros.h \
120 esedb_test_memory.c esedb_test_memory.h \
121 esedb_test_unused.h
122
123 esedb_test_data_definition_LDADD = \
124 ../libesedb/libesedb.la \
125 @LIBCERROR_LIBADD@
126
127 esedb_test_data_segment_SOURCES = \
128 esedb_test_data_segment.c \
129 esedb_test_libcerror.h \
130 esedb_test_libesedb.h \
131 esedb_test_macros.h \
132 esedb_test_memory.c esedb_test_memory.h \
133 esedb_test_unused.h
134
135 esedb_test_data_segment_LDADD = \
136 ../libesedb/libesedb.la \
137 @LIBCERROR_LIBADD@
138
139 esedb_test_database_SOURCES = \
140 esedb_test_database.c \
141 esedb_test_libcerror.h \
142 esedb_test_libesedb.h \
143 esedb_test_macros.h \
144 esedb_test_memory.c esedb_test_memory.h \
145 esedb_test_unused.h
146
147 esedb_test_database_LDADD = \
148 ../libesedb/libesedb.la \
149 @LIBCERROR_LIBADD@
150
151 esedb_test_error_SOURCES = \
152 esedb_test_error.c \
153 esedb_test_libesedb.h \
154 esedb_test_macros.h \
155 esedb_test_unused.h
156
157 esedb_test_error_LDADD = \
158 ../libesedb/libesedb.la
159
160 esedb_test_file_SOURCES = \
161 esedb_test_file.c \
162 esedb_test_getopt.c esedb_test_getopt.h \
163 esedb_test_libcerror.h \
164 esedb_test_libclocale.h \
165 esedb_test_libcnotify.h \
166 esedb_test_libesedb.h \
167 esedb_test_libuna.h \
168 esedb_test_macros.h \
169 esedb_test_memory.c esedb_test_memory.h
170
171 esedb_test_file_LDADD = \
172 @LIBUNA_LIBADD@ \
173 @LIBCNOTIFY_LIBADD@ \
174 @LIBCLOCALE_LIBADD@ \
175 @LIBCDATA_LIBADD@ \
176 ../libesedb/libesedb.la \
177 @LIBCTHREADS_LIBADD@ \
63178 @LIBCERROR_LIBADD@ \
64 @LIBCSTRING_LIBADD@
179 @PTHREAD_LIBADD@
180
181 esedb_test_index_SOURCES = \
182 esedb_test_index.c \
183 esedb_test_libcerror.h \
184 esedb_test_libesedb.h \
185 esedb_test_macros.h \
186 esedb_test_memory.c esedb_test_memory.h \
187 esedb_test_unused.h
188
189 esedb_test_index_LDADD = \
190 ../libesedb/libesedb.la \
191 @LIBCERROR_LIBADD@
192
193 esedb_test_io_handle_SOURCES = \
194 esedb_test_io_handle.c \
195 esedb_test_libcerror.h \
196 esedb_test_libesedb.h \
197 esedb_test_macros.h \
198 esedb_test_memory.c esedb_test_memory.h \
199 esedb_test_unused.h
200
201 esedb_test_io_handle_LDADD = \
202 ../libesedb/libesedb.la \
203 @LIBCERROR_LIBADD@
204
205 esedb_test_key_SOURCES = \
206 esedb_test_key.c \
207 esedb_test_libcerror.h \
208 esedb_test_libesedb.h \
209 esedb_test_libfdata.h \
210 esedb_test_macros.h \
211 esedb_test_memory.c esedb_test_memory.h \
212 esedb_test_unused.h
213
214 esedb_test_key_LDADD = \
215 ../libesedb/libesedb.la \
216 @LIBCERROR_LIBADD@
217
218 esedb_test_long_value_SOURCES = \
219 esedb_test_libcerror.h \
220 esedb_test_libesedb.h \
221 esedb_test_long_value.c \
222 esedb_test_macros.h \
223 esedb_test_memory.c esedb_test_memory.h \
224 esedb_test_unused.h
225
226 esedb_test_long_value_LDADD = \
227 ../libesedb/libesedb.la \
228 @LIBCERROR_LIBADD@
229
230 esedb_test_multi_value_SOURCES = \
231 esedb_test_libcerror.h \
232 esedb_test_libesedb.h \
233 esedb_test_macros.h \
234 esedb_test_memory.c esedb_test_memory.h \
235 esedb_test_multi_value.c \
236 esedb_test_unused.h
237
238 esedb_test_multi_value_LDADD = \
239 ../libesedb/libesedb.la \
240 @LIBCERROR_LIBADD@
241
242 esedb_test_notify_SOURCES = \
243 esedb_test_libesedb.h \
244 esedb_test_macros.h \
245 esedb_test_notify.c \
246 esedb_test_unused.h
247
248 esedb_test_notify_LDADD = \
249 ../libesedb/libesedb.la
250
251 esedb_test_page_SOURCES = \
252 esedb_test_libcerror.h \
253 esedb_test_libesedb.h \
254 esedb_test_macros.h \
255 esedb_test_memory.c esedb_test_memory.h \
256 esedb_test_page.c \
257 esedb_test_unused.h
258
259 esedb_test_page_LDADD = \
260 ../libesedb/libesedb.la \
261 @LIBCERROR_LIBADD@
262
263 esedb_test_page_tree_SOURCES = \
264 esedb_test_libcerror.h \
265 esedb_test_libesedb.h \
266 esedb_test_macros.h \
267 esedb_test_memory.c esedb_test_memory.h \
268 esedb_test_page_tree.c \
269 esedb_test_unused.h
270
271 esedb_test_page_tree_LDADD = \
272 ../libesedb/libesedb.la \
273 @LIBCERROR_LIBADD@
274
275 esedb_test_page_value_SOURCES = \
276 esedb_test_libcerror.h \
277 esedb_test_libesedb.h \
278 esedb_test_macros.h \
279 esedb_test_memory.c esedb_test_memory.h \
280 esedb_test_page_value.c \
281 esedb_test_unused.h
282
283 esedb_test_page_value_LDADD = \
284 ../libesedb/libesedb.la \
285 @LIBCERROR_LIBADD@
286
287 esedb_test_record_SOURCES = \
288 esedb_test_libcerror.h \
289 esedb_test_libesedb.h \
290 esedb_test_macros.h \
291 esedb_test_memory.c esedb_test_memory.h \
292 esedb_test_record.c \
293 esedb_test_unused.h
294
295 esedb_test_record_LDADD = \
296 ../libesedb/libesedb.la \
297 @LIBCERROR_LIBADD@
298
299 esedb_test_support_SOURCES = \
300 esedb_test_getopt.c esedb_test_getopt.h \
301 esedb_test_libbfio.h \
302 esedb_test_libcerror.h \
303 esedb_test_libclocale.h \
304 esedb_test_libcnotify.h \
305 esedb_test_libesedb.h \
306 esedb_test_libuna.h \
307 esedb_test_macros.h \
308 esedb_test_support.c
309
310 esedb_test_support_LDADD = \
311 @LIBBFIO_LIBADD@ \
312 @LIBCPATH_LIBADD@ \
313 @LIBCFILE_LIBADD@ \
314 @LIBUNA_LIBADD@ \
315 @LIBCNOTIFY_LIBADD@ \
316 @LIBCLOCALE_LIBADD@ \
317 @LIBCDATA_LIBADD@ \
318 ../libesedb/libesedb.la \
319 @LIBCERROR_LIBADD@
320
321 esedb_test_table_SOURCES = \
322 esedb_test_libcerror.h \
323 esedb_test_libesedb.h \
324 esedb_test_macros.h \
325 esedb_test_memory.c esedb_test_memory.h \
326 esedb_test_table.c \
327 esedb_test_unused.h
328
329 esedb_test_table_LDADD = \
330 ../libesedb/libesedb.la \
331 @LIBCERROR_LIBADD@
332
333 esedb_test_table_definition_SOURCES = \
334 esedb_test_libcerror.h \
335 esedb_test_libesedb.h \
336 esedb_test_macros.h \
337 esedb_test_memory.c esedb_test_memory.h \
338 esedb_test_table_definition.c \
339 esedb_test_unused.h
340
341 esedb_test_table_definition_LDADD = \
342 ../libesedb/libesedb.la \
343 @LIBCERROR_LIBADD@
65344
66345 MAINTAINERCLEANFILES = \
67346 Makefile.in
8686 POST_UNINSTALL = :
8787 build_triplet = @build@
8888 host_triplet = @host@
89 check_PROGRAMS = esedb_test_get_version$(EXEEXT) \
90 esedb_test_open_close$(EXEEXT)
89 check_PROGRAMS = esedb_test_catalog$(EXEEXT) \
90 esedb_test_catalog_definition$(EXEEXT) \
91 esedb_test_column$(EXEEXT) esedb_test_column_type$(EXEEXT) \
92 esedb_test_data_definition$(EXEEXT) \
93 esedb_test_data_segment$(EXEEXT) esedb_test_database$(EXEEXT) \
94 esedb_test_error$(EXEEXT) esedb_test_file$(EXEEXT) \
95 esedb_test_index$(EXEEXT) esedb_test_io_handle$(EXEEXT) \
96 esedb_test_key$(EXEEXT) esedb_test_long_value$(EXEEXT) \
97 esedb_test_multi_value$(EXEEXT) esedb_test_notify$(EXEEXT) \
98 esedb_test_page$(EXEEXT) esedb_test_page_tree$(EXEEXT) \
99 esedb_test_page_value$(EXEEXT) esedb_test_record$(EXEEXT) \
100 esedb_test_support$(EXEEXT) esedb_test_table$(EXEEXT) \
101 esedb_test_table_definition$(EXEEXT)
91102 subdir = tests
92103 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
93104 am__aclocal_m4_deps = $(top_srcdir)/m4/common.m4 \
98109 $(top_srcdir)/m4/libcerror.m4 $(top_srcdir)/m4/libcfile.m4 \
99110 $(top_srcdir)/m4/libclocale.m4 $(top_srcdir)/m4/libcnotify.m4 \
100111 $(top_srcdir)/m4/libcpath.m4 $(top_srcdir)/m4/libcsplit.m4 \
101 $(top_srcdir)/m4/libcstring.m4 $(top_srcdir)/m4/libcsystem.m4 \
102112 $(top_srcdir)/m4/libcthreads.m4 $(top_srcdir)/m4/libfcache.m4 \
103113 $(top_srcdir)/m4/libfdata.m4 $(top_srcdir)/m4/libfdatetime.m4 \
104114 $(top_srcdir)/m4/libfguid.m4 $(top_srcdir)/m4/libfmapi.m4 \
109119 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
110120 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
111121 $(top_srcdir)/m4/pthread.m4 $(top_srcdir)/m4/python.m4 \
112 $(top_srcdir)/m4/types.m4 $(top_srcdir)/acinclude.m4 \
113 $(top_srcdir)/configure.ac
122 $(top_srcdir)/m4/tests.m4 $(top_srcdir)/m4/types.m4 \
123 $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
114124 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
115125 $(ACLOCAL_M4)
116126 DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
118128 CONFIG_HEADER = $(top_builddir)/common/config.h
119129 CONFIG_CLEAN_FILES =
120130 CONFIG_CLEAN_VPATH_FILES =
121 am_esedb_test_get_version_OBJECTS = esedb_test_get_version.$(OBJEXT)
122 esedb_test_get_version_OBJECTS = $(am_esedb_test_get_version_OBJECTS)
123 esedb_test_get_version_DEPENDENCIES = ../libesedb/libesedb.la
131 am_esedb_test_catalog_OBJECTS = esedb_test_catalog.$(OBJEXT) \
132 esedb_test_memory.$(OBJEXT)
133 esedb_test_catalog_OBJECTS = $(am_esedb_test_catalog_OBJECTS)
134 esedb_test_catalog_DEPENDENCIES = ../libesedb/libesedb.la
124135 AM_V_lt = $(am__v_lt_@AM_V@)
125136 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
126137 am__v_lt_0 = --silent
127138 am__v_lt_1 =
128 am_esedb_test_open_close_OBJECTS = esedb_test_open_close.$(OBJEXT)
129 esedb_test_open_close_OBJECTS = $(am_esedb_test_open_close_OBJECTS)
130 esedb_test_open_close_DEPENDENCIES = ../libesedb/libesedb.la
139 am_esedb_test_catalog_definition_OBJECTS = \
140 esedb_test_catalog_definition.$(OBJEXT) \
141 esedb_test_memory.$(OBJEXT)
142 esedb_test_catalog_definition_OBJECTS = \
143 $(am_esedb_test_catalog_definition_OBJECTS)
144 esedb_test_catalog_definition_DEPENDENCIES = ../libesedb/libesedb.la
145 am_esedb_test_column_OBJECTS = esedb_test_column.$(OBJEXT) \
146 esedb_test_memory.$(OBJEXT)
147 esedb_test_column_OBJECTS = $(am_esedb_test_column_OBJECTS)
148 esedb_test_column_DEPENDENCIES = ../libesedb/libesedb.la
149 am_esedb_test_column_type_OBJECTS = esedb_test_column_type.$(OBJEXT) \
150 esedb_test_memory.$(OBJEXT)
151 esedb_test_column_type_OBJECTS = $(am_esedb_test_column_type_OBJECTS)
152 esedb_test_column_type_DEPENDENCIES = ../libesedb/libesedb.la
153 am_esedb_test_data_definition_OBJECTS = \
154 esedb_test_data_definition.$(OBJEXT) \
155 esedb_test_memory.$(OBJEXT)
156 esedb_test_data_definition_OBJECTS = \
157 $(am_esedb_test_data_definition_OBJECTS)
158 esedb_test_data_definition_DEPENDENCIES = ../libesedb/libesedb.la
159 am_esedb_test_data_segment_OBJECTS = \
160 esedb_test_data_segment.$(OBJEXT) esedb_test_memory.$(OBJEXT)
161 esedb_test_data_segment_OBJECTS = \
162 $(am_esedb_test_data_segment_OBJECTS)
163 esedb_test_data_segment_DEPENDENCIES = ../libesedb/libesedb.la
164 am_esedb_test_database_OBJECTS = esedb_test_database.$(OBJEXT) \
165 esedb_test_memory.$(OBJEXT)
166 esedb_test_database_OBJECTS = $(am_esedb_test_database_OBJECTS)
167 esedb_test_database_DEPENDENCIES = ../libesedb/libesedb.la
168 am_esedb_test_error_OBJECTS = esedb_test_error.$(OBJEXT)
169 esedb_test_error_OBJECTS = $(am_esedb_test_error_OBJECTS)
170 esedb_test_error_DEPENDENCIES = ../libesedb/libesedb.la
171 am_esedb_test_file_OBJECTS = esedb_test_file.$(OBJEXT) \
172 esedb_test_getopt.$(OBJEXT) esedb_test_memory.$(OBJEXT)
173 esedb_test_file_OBJECTS = $(am_esedb_test_file_OBJECTS)
174 esedb_test_file_DEPENDENCIES = ../libesedb/libesedb.la
175 am_esedb_test_index_OBJECTS = esedb_test_index.$(OBJEXT) \
176 esedb_test_memory.$(OBJEXT)
177 esedb_test_index_OBJECTS = $(am_esedb_test_index_OBJECTS)
178 esedb_test_index_DEPENDENCIES = ../libesedb/libesedb.la
179 am_esedb_test_io_handle_OBJECTS = esedb_test_io_handle.$(OBJEXT) \
180 esedb_test_memory.$(OBJEXT)
181 esedb_test_io_handle_OBJECTS = $(am_esedb_test_io_handle_OBJECTS)
182 esedb_test_io_handle_DEPENDENCIES = ../libesedb/libesedb.la
183 am_esedb_test_key_OBJECTS = esedb_test_key.$(OBJEXT) \
184 esedb_test_memory.$(OBJEXT)
185 esedb_test_key_OBJECTS = $(am_esedb_test_key_OBJECTS)
186 esedb_test_key_DEPENDENCIES = ../libesedb/libesedb.la
187 am_esedb_test_long_value_OBJECTS = esedb_test_long_value.$(OBJEXT) \
188 esedb_test_memory.$(OBJEXT)
189 esedb_test_long_value_OBJECTS = $(am_esedb_test_long_value_OBJECTS)
190 esedb_test_long_value_DEPENDENCIES = ../libesedb/libesedb.la
191 am_esedb_test_multi_value_OBJECTS = esedb_test_memory.$(OBJEXT) \
192 esedb_test_multi_value.$(OBJEXT)
193 esedb_test_multi_value_OBJECTS = $(am_esedb_test_multi_value_OBJECTS)
194 esedb_test_multi_value_DEPENDENCIES = ../libesedb/libesedb.la
195 am_esedb_test_notify_OBJECTS = esedb_test_notify.$(OBJEXT)
196 esedb_test_notify_OBJECTS = $(am_esedb_test_notify_OBJECTS)
197 esedb_test_notify_DEPENDENCIES = ../libesedb/libesedb.la
198 am_esedb_test_page_OBJECTS = esedb_test_memory.$(OBJEXT) \
199 esedb_test_page.$(OBJEXT)
200 esedb_test_page_OBJECTS = $(am_esedb_test_page_OBJECTS)
201 esedb_test_page_DEPENDENCIES = ../libesedb/libesedb.la
202 am_esedb_test_page_tree_OBJECTS = esedb_test_memory.$(OBJEXT) \
203 esedb_test_page_tree.$(OBJEXT)
204 esedb_test_page_tree_OBJECTS = $(am_esedb_test_page_tree_OBJECTS)
205 esedb_test_page_tree_DEPENDENCIES = ../libesedb/libesedb.la
206 am_esedb_test_page_value_OBJECTS = esedb_test_memory.$(OBJEXT) \
207 esedb_test_page_value.$(OBJEXT)
208 esedb_test_page_value_OBJECTS = $(am_esedb_test_page_value_OBJECTS)
209 esedb_test_page_value_DEPENDENCIES = ../libesedb/libesedb.la
210 am_esedb_test_record_OBJECTS = esedb_test_memory.$(OBJEXT) \
211 esedb_test_record.$(OBJEXT)
212 esedb_test_record_OBJECTS = $(am_esedb_test_record_OBJECTS)
213 esedb_test_record_DEPENDENCIES = ../libesedb/libesedb.la
214 am_esedb_test_support_OBJECTS = esedb_test_getopt.$(OBJEXT) \
215 esedb_test_support.$(OBJEXT)
216 esedb_test_support_OBJECTS = $(am_esedb_test_support_OBJECTS)
217 esedb_test_support_DEPENDENCIES = ../libesedb/libesedb.la
218 am_esedb_test_table_OBJECTS = esedb_test_memory.$(OBJEXT) \
219 esedb_test_table.$(OBJEXT)
220 esedb_test_table_OBJECTS = $(am_esedb_test_table_OBJECTS)
221 esedb_test_table_DEPENDENCIES = ../libesedb/libesedb.la
222 am_esedb_test_table_definition_OBJECTS = esedb_test_memory.$(OBJEXT) \
223 esedb_test_table_definition.$(OBJEXT)
224 esedb_test_table_definition_OBJECTS = \
225 $(am_esedb_test_table_definition_OBJECTS)
226 esedb_test_table_definition_DEPENDENCIES = ../libesedb/libesedb.la
131227 AM_V_P = $(am__v_P_@AM_V@)
132228 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
133229 am__v_P_0 = false
162258 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
163259 am__v_CCLD_0 = @echo " CCLD " $@;
164260 am__v_CCLD_1 =
165 SOURCES = $(esedb_test_get_version_SOURCES) \
166 $(esedb_test_open_close_SOURCES)
167 DIST_SOURCES = $(esedb_test_get_version_SOURCES) \
168 $(esedb_test_open_close_SOURCES)
261 SOURCES = $(esedb_test_catalog_SOURCES) \
262 $(esedb_test_catalog_definition_SOURCES) \
263 $(esedb_test_column_SOURCES) $(esedb_test_column_type_SOURCES) \
264 $(esedb_test_data_definition_SOURCES) \
265 $(esedb_test_data_segment_SOURCES) \
266 $(esedb_test_database_SOURCES) $(esedb_test_error_SOURCES) \
267 $(esedb_test_file_SOURCES) $(esedb_test_index_SOURCES) \
268 $(esedb_test_io_handle_SOURCES) $(esedb_test_key_SOURCES) \
269 $(esedb_test_long_value_SOURCES) \
270 $(esedb_test_multi_value_SOURCES) $(esedb_test_notify_SOURCES) \
271 $(esedb_test_page_SOURCES) $(esedb_test_page_tree_SOURCES) \
272 $(esedb_test_page_value_SOURCES) $(esedb_test_record_SOURCES) \
273 $(esedb_test_support_SOURCES) $(esedb_test_table_SOURCES) \
274 $(esedb_test_table_definition_SOURCES)
275 DIST_SOURCES = $(esedb_test_catalog_SOURCES) \
276 $(esedb_test_catalog_definition_SOURCES) \
277 $(esedb_test_column_SOURCES) $(esedb_test_column_type_SOURCES) \
278 $(esedb_test_data_definition_SOURCES) \
279 $(esedb_test_data_segment_SOURCES) \
280 $(esedb_test_database_SOURCES) $(esedb_test_error_SOURCES) \
281 $(esedb_test_file_SOURCES) $(esedb_test_index_SOURCES) \
282 $(esedb_test_io_handle_SOURCES) $(esedb_test_key_SOURCES) \
283 $(esedb_test_long_value_SOURCES) \
284 $(esedb_test_multi_value_SOURCES) $(esedb_test_notify_SOURCES) \
285 $(esedb_test_page_SOURCES) $(esedb_test_page_tree_SOURCES) \
286 $(esedb_test_page_value_SOURCES) $(esedb_test_record_SOURCES) \
287 $(esedb_test_support_SOURCES) $(esedb_test_table_SOURCES) \
288 $(esedb_test_table_definition_SOURCES)
169289 am__can_run_installinfo = \
170290 case $$AM_UPDATE_INFO_DIR in \
171291 n|no|NO) false;; \
438558 HAVE_LIBCNOTIFY = @HAVE_LIBCNOTIFY@
439559 HAVE_LIBCPATH = @HAVE_LIBCPATH@
440560 HAVE_LIBCSPLIT = @HAVE_LIBCSPLIT@
441 HAVE_LIBCSTRING = @HAVE_LIBCSTRING@
442 HAVE_LIBCSYSTEM = @HAVE_LIBCSYSTEM@
443561 HAVE_LIBCTHREADS = @HAVE_LIBCTHREADS@
444562 HAVE_LIBFCACHE = @HAVE_LIBFCACHE@
445563 HAVE_LIBFDATA = @HAVE_LIBFDATA@
458576 HAVE_LOCAL_LIBCNOTIFY = @HAVE_LOCAL_LIBCNOTIFY@
459577 HAVE_LOCAL_LIBCPATH = @HAVE_LOCAL_LIBCPATH@
460578 HAVE_LOCAL_LIBCSPLIT = @HAVE_LOCAL_LIBCSPLIT@
461 HAVE_LOCAL_LIBCSTRING = @HAVE_LOCAL_LIBCSTRING@
462 HAVE_LOCAL_LIBCSYSTEM = @HAVE_LOCAL_LIBCSYSTEM@
463579 HAVE_LOCAL_LIBCTHREADS = @HAVE_LOCAL_LIBCTHREADS@
464580 HAVE_LOCAL_LIBFCACHE = @HAVE_LOCAL_LIBFCACHE@
465581 HAVE_LOCAL_LIBFDATA = @HAVE_LOCAL_LIBFDATA@
506622 LIBCPATH_LIBADD = @LIBCPATH_LIBADD@
507623 LIBCSPLIT_CPPFLAGS = @LIBCSPLIT_CPPFLAGS@
508624 LIBCSPLIT_LIBADD = @LIBCSPLIT_LIBADD@
509 LIBCSTRING_CPPFLAGS = @LIBCSTRING_CPPFLAGS@
510 LIBCSTRING_LIBADD = @LIBCSTRING_LIBADD@
511 LIBCSYSTEM_CPPFLAGS = @LIBCSYSTEM_CPPFLAGS@
512 LIBCSYSTEM_LIBADD = @LIBCSYSTEM_LIBADD@
513625 LIBCTHREADS_CPPFLAGS = @LIBCTHREADS_CPPFLAGS@
514626 LIBCTHREADS_LIBADD = @LIBCTHREADS_LIBADD@
515627 LIBESEDB_DLL_IMPORT = @LIBESEDB_DLL_IMPORT@
542654 LTLIBICONV = @LTLIBICONV@
543655 LTLIBINTL = @LTLIBINTL@
544656 LTLIBOBJS = @LTLIBOBJS@
657 LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
545658 MAKEINFO = @MAKEINFO@
546659 MANIFEST_TOOL = @MANIFEST_TOOL@
547660 MKDIR_P = @MKDIR_P@
648761 ax_libcsplit_pc_libs_private = @ax_libcsplit_pc_libs_private@
649762 ax_libcsplit_spec_build_requires = @ax_libcsplit_spec_build_requires@
650763 ax_libcsplit_spec_requires = @ax_libcsplit_spec_requires@
651 ax_libcstring_pc_libs_private = @ax_libcstring_pc_libs_private@
652 ax_libcstring_spec_build_requires = @ax_libcstring_spec_build_requires@
653 ax_libcstring_spec_requires = @ax_libcstring_spec_requires@
654 ax_libcsystem_pc_libs_private = @ax_libcsystem_pc_libs_private@
655 ax_libcsystem_spec_build_requires = @ax_libcsystem_spec_build_requires@
656 ax_libcsystem_spec_requires = @ax_libcsystem_spec_requires@
657764 ax_libcthreads_pc_libs_private = @ax_libcthreads_pc_libs_private@
658765 ax_libcthreads_spec_build_requires = @ax_libcthreads_spec_build_requires@
659766 ax_libcthreads_spec_requires = @ax_libcthreads_spec_requires@
722829 libcpath_LIBS = @libcpath_LIBS@
723830 libcsplit_CFLAGS = @libcsplit_CFLAGS@
724831 libcsplit_LIBS = @libcsplit_LIBS@
725 libcstring_CFLAGS = @libcstring_CFLAGS@
726 libcstring_LIBS = @libcstring_LIBS@
727 libcsystem_CFLAGS = @libcsystem_CFLAGS@
728 libcsystem_LIBS = @libcsystem_LIBS@
729832 libcthreads_CFLAGS = @libcthreads_CFLAGS@
730833 libcthreads_LIBS = @libcthreads_LIBS@
731834 libdir = @libdir@
777880 AM_CPPFLAGS = \
778881 -I$(top_srcdir)/include \
779882 -I$(top_srcdir)/common \
780 @LIBCSTRING_CPPFLAGS@ \
781883 @LIBCERROR_CPPFLAGS@ \
782884 @LIBCDATA_CPPFLAGS@ \
783885 @LIBCLOCALE_CPPFLAGS@ \
787889 @LIBCFILE_CPPFLAGS@ \
788890 @LIBCPATH_CPPFLAGS@ \
789891 @LIBBFIO_CPPFLAGS@ \
790 @LIBCSYSTEM_CPPFLAGS@ \
892 @LIBFCACHE_CPPFLAGS@ \
893 @LIBFDATA_CPPFLAGS@ \
894 @LIBFDATETIME_CPPFLAGS@ \
895 @LIBFGUID_CPPFLAGS@ \
896 @LIBFVALUE_CPPFLAGS@ \
897 @LIBFWNT_CPPFLAGS@ \
898 @PTHREAD_CPPFLAGS@ \
791899 @LIBESEDB_DLL_IMPORT@
792900
793901 @HAVE_PYTHON_TESTS_TRUE@TESTS_PYESEDB = \
794 @HAVE_PYTHON_TESTS_TRUE@ test_python_functions.sh
902 @HAVE_PYTHON_TESTS_TRUE@ test_python_module.sh
795903
796904 TESTS = \
797 test_api_functions.sh \
905 test_library.sh \
798906 test_esedbinfo.sh \
799907 test_esedbexport.sh \
800908 $(TESTS_PYESEDB)
801909
802910 check_SCRIPTS = \
803 pyesedb_test_get_version.py \
804 pyesedb_test_open_close.py \
805 test_api_functions.sh \
911 pyesedb_test_support.py \
806912 test_esedbexport.sh \
807913 test_esedbinfo.sh \
808 test_python_functions.sh \
914 test_library.sh \
915 test_python_module.sh \
809916 test_runner.sh
810917
811918 EXTRA_DIST = \
812919 $(check_SCRIPTS)
813920
814 esedb_test_get_version_SOURCES = \
815 esedb_test_get_version.c \
816 esedb_test_libcstring.h \
817 esedb_test_libesedb.h \
818 esedb_test_unused.h
819
820 esedb_test_get_version_LDADD = \
821 ../libesedb/libesedb.la \
822 @LIBCSTRING_LIBADD@
823
824 esedb_test_open_close_SOURCES = \
825 esedb_test_libcerror.h \
826 esedb_test_libcstring.h \
827 esedb_test_libcsystem.h \
828 esedb_test_libesedb.h \
829 esedb_test_open_close.c
830
831 esedb_test_open_close_LDADD = \
832 @LIBCSYSTEM_LIBADD@ \
833 ../libesedb/libesedb.la \
921 esedb_test_catalog_SOURCES = \
922 esedb_test_catalog.c \
923 esedb_test_libcerror.h \
924 esedb_test_libesedb.h \
925 esedb_test_macros.h \
926 esedb_test_memory.c esedb_test_memory.h \
927 esedb_test_unused.h
928
929 esedb_test_catalog_LDADD = \
930 ../libesedb/libesedb.la \
931 @LIBCERROR_LIBADD@
932
933 esedb_test_catalog_definition_SOURCES = \
934 esedb_test_catalog_definition.c \
935 esedb_test_libcerror.h \
936 esedb_test_libesedb.h \
937 esedb_test_macros.h \
938 esedb_test_memory.c esedb_test_memory.h \
939 esedb_test_unused.h
940
941 esedb_test_catalog_definition_LDADD = \
942 ../libesedb/libesedb.la \
943 @LIBCERROR_LIBADD@
944
945 esedb_test_column_SOURCES = \
946 esedb_test_column.c \
947 esedb_test_libcerror.h \
948 esedb_test_libesedb.h \
949 esedb_test_macros.h \
950 esedb_test_memory.c esedb_test_memory.h \
951 esedb_test_unused.h
952
953 esedb_test_column_LDADD = \
954 ../libesedb/libesedb.la \
955 @LIBCERROR_LIBADD@
956
957 esedb_test_column_type_SOURCES = \
958 esedb_test_column_type.c \
959 esedb_test_libcerror.h \
960 esedb_test_libesedb.h \
961 esedb_test_macros.h \
962 esedb_test_memory.c esedb_test_memory.h \
963 esedb_test_unused.h
964
965 esedb_test_column_type_LDADD = \
966 ../libesedb/libesedb.la \
967 @LIBCERROR_LIBADD@
968
969 esedb_test_data_definition_SOURCES = \
970 esedb_test_data_definition.c \
971 esedb_test_libcerror.h \
972 esedb_test_libesedb.h \
973 esedb_test_macros.h \
974 esedb_test_memory.c esedb_test_memory.h \
975 esedb_test_unused.h
976
977 esedb_test_data_definition_LDADD = \
978 ../libesedb/libesedb.la \
979 @LIBCERROR_LIBADD@
980
981 esedb_test_data_segment_SOURCES = \
982 esedb_test_data_segment.c \
983 esedb_test_libcerror.h \
984 esedb_test_libesedb.h \
985 esedb_test_macros.h \
986 esedb_test_memory.c esedb_test_memory.h \
987 esedb_test_unused.h
988
989 esedb_test_data_segment_LDADD = \
990 ../libesedb/libesedb.la \
991 @LIBCERROR_LIBADD@
992
993 esedb_test_database_SOURCES = \
994 esedb_test_database.c \
995 esedb_test_libcerror.h \
996 esedb_test_libesedb.h \
997 esedb_test_macros.h \
998 esedb_test_memory.c esedb_test_memory.h \
999 esedb_test_unused.h
1000
1001 esedb_test_database_LDADD = \
1002 ../libesedb/libesedb.la \
1003 @LIBCERROR_LIBADD@
1004
1005 esedb_test_error_SOURCES = \
1006 esedb_test_error.c \
1007 esedb_test_libesedb.h \
1008 esedb_test_macros.h \
1009 esedb_test_unused.h
1010
1011 esedb_test_error_LDADD = \
1012 ../libesedb/libesedb.la
1013
1014 esedb_test_file_SOURCES = \
1015 esedb_test_file.c \
1016 esedb_test_getopt.c esedb_test_getopt.h \
1017 esedb_test_libcerror.h \
1018 esedb_test_libclocale.h \
1019 esedb_test_libcnotify.h \
1020 esedb_test_libesedb.h \
1021 esedb_test_libuna.h \
1022 esedb_test_macros.h \
1023 esedb_test_memory.c esedb_test_memory.h
1024
1025 esedb_test_file_LDADD = \
1026 @LIBUNA_LIBADD@ \
1027 @LIBCNOTIFY_LIBADD@ \
1028 @LIBCLOCALE_LIBADD@ \
1029 @LIBCDATA_LIBADD@ \
1030 ../libesedb/libesedb.la \
1031 @LIBCTHREADS_LIBADD@ \
8341032 @LIBCERROR_LIBADD@ \
835 @LIBCSTRING_LIBADD@
1033 @PTHREAD_LIBADD@
1034
1035 esedb_test_index_SOURCES = \
1036 esedb_test_index.c \
1037 esedb_test_libcerror.h \
1038 esedb_test_libesedb.h \
1039 esedb_test_macros.h \
1040 esedb_test_memory.c esedb_test_memory.h \
1041 esedb_test_unused.h
1042
1043 esedb_test_index_LDADD = \
1044 ../libesedb/libesedb.la \
1045 @LIBCERROR_LIBADD@
1046
1047 esedb_test_io_handle_SOURCES = \
1048 esedb_test_io_handle.c \
1049 esedb_test_libcerror.h \
1050 esedb_test_libesedb.h \
1051 esedb_test_macros.h \
1052 esedb_test_memory.c esedb_test_memory.h \
1053 esedb_test_unused.h
1054
1055 esedb_test_io_handle_LDADD = \
1056 ../libesedb/libesedb.la \
1057 @LIBCERROR_LIBADD@
1058
1059 esedb_test_key_SOURCES = \
1060 esedb_test_key.c \
1061 esedb_test_libcerror.h \
1062 esedb_test_libesedb.h \
1063 esedb_test_libfdata.h \
1064 esedb_test_macros.h \
1065 esedb_test_memory.c esedb_test_memory.h \
1066 esedb_test_unused.h
1067
1068 esedb_test_key_LDADD = \
1069 ../libesedb/libesedb.la \
1070 @LIBCERROR_LIBADD@
1071
1072 esedb_test_long_value_SOURCES = \
1073 esedb_test_libcerror.h \
1074 esedb_test_libesedb.h \
1075 esedb_test_long_value.c \
1076 esedb_test_macros.h \
1077 esedb_test_memory.c esedb_test_memory.h \
1078 esedb_test_unused.h
1079
1080 esedb_test_long_value_LDADD = \
1081 ../libesedb/libesedb.la \
1082 @LIBCERROR_LIBADD@
1083
1084 esedb_test_multi_value_SOURCES = \
1085 esedb_test_libcerror.h \
1086 esedb_test_libesedb.h \
1087 esedb_test_macros.h \
1088 esedb_test_memory.c esedb_test_memory.h \
1089 esedb_test_multi_value.c \
1090 esedb_test_unused.h
1091
1092 esedb_test_multi_value_LDADD = \
1093 ../libesedb/libesedb.la \
1094 @LIBCERROR_LIBADD@
1095
1096 esedb_test_notify_SOURCES = \
1097 esedb_test_libesedb.h \
1098 esedb_test_macros.h \
1099 esedb_test_notify.c \
1100 esedb_test_unused.h
1101
1102 esedb_test_notify_LDADD = \
1103 ../libesedb/libesedb.la
1104
1105 esedb_test_page_SOURCES = \
1106 esedb_test_libcerror.h \
1107 esedb_test_libesedb.h \
1108 esedb_test_macros.h \
1109 esedb_test_memory.c esedb_test_memory.h \
1110 esedb_test_page.c \
1111 esedb_test_unused.h
1112
1113 esedb_test_page_LDADD = \
1114 ../libesedb/libesedb.la \
1115 @LIBCERROR_LIBADD@
1116
1117 esedb_test_page_tree_SOURCES = \
1118 esedb_test_libcerror.h \
1119 esedb_test_libesedb.h \
1120 esedb_test_macros.h \
1121 esedb_test_memory.c esedb_test_memory.h \
1122 esedb_test_page_tree.c \
1123 esedb_test_unused.h
1124
1125 esedb_test_page_tree_LDADD = \
1126 ../libesedb/libesedb.la \
1127 @LIBCERROR_LIBADD@
1128
1129 esedb_test_page_value_SOURCES = \
1130 esedb_test_libcerror.h \
1131 esedb_test_libesedb.h \
1132 esedb_test_macros.h \
1133 esedb_test_memory.c esedb_test_memory.h \
1134 esedb_test_page_value.c \
1135 esedb_test_unused.h
1136
1137 esedb_test_page_value_LDADD = \
1138 ../libesedb/libesedb.la \
1139 @LIBCERROR_LIBADD@
1140
1141 esedb_test_record_SOURCES = \
1142 esedb_test_libcerror.h \
1143 esedb_test_libesedb.h \
1144 esedb_test_macros.h \
1145 esedb_test_memory.c esedb_test_memory.h \
1146 esedb_test_record.c \
1147 esedb_test_unused.h
1148
1149 esedb_test_record_LDADD = \
1150 ../libesedb/libesedb.la \
1151 @LIBCERROR_LIBADD@
1152
1153 esedb_test_support_SOURCES = \
1154 esedb_test_getopt.c esedb_test_getopt.h \
1155 esedb_test_libbfio.h \
1156 esedb_test_libcerror.h \
1157 esedb_test_libclocale.h \
1158 esedb_test_libcnotify.h \
1159 esedb_test_libesedb.h \
1160 esedb_test_libuna.h \
1161 esedb_test_macros.h \
1162 esedb_test_support.c
1163
1164 esedb_test_support_LDADD = \
1165 @LIBBFIO_LIBADD@ \
1166 @LIBCPATH_LIBADD@ \
1167 @LIBCFILE_LIBADD@ \
1168 @LIBUNA_LIBADD@ \
1169 @LIBCNOTIFY_LIBADD@ \
1170 @LIBCLOCALE_LIBADD@ \
1171 @LIBCDATA_LIBADD@ \
1172 ../libesedb/libesedb.la \
1173 @LIBCERROR_LIBADD@
1174
1175 esedb_test_table_SOURCES = \
1176 esedb_test_libcerror.h \
1177 esedb_test_libesedb.h \
1178 esedb_test_macros.h \
1179 esedb_test_memory.c esedb_test_memory.h \
1180 esedb_test_table.c \
1181 esedb_test_unused.h
1182
1183 esedb_test_table_LDADD = \
1184 ../libesedb/libesedb.la \
1185 @LIBCERROR_LIBADD@
1186
1187 esedb_test_table_definition_SOURCES = \
1188 esedb_test_libcerror.h \
1189 esedb_test_libesedb.h \
1190 esedb_test_macros.h \
1191 esedb_test_memory.c esedb_test_memory.h \
1192 esedb_test_table_definition.c \
1193 esedb_test_unused.h
1194
1195 esedb_test_table_definition_LDADD = \
1196 ../libesedb/libesedb.la \
1197 @LIBCERROR_LIBADD@
8361198
8371199 MAINTAINERCLEANFILES = \
8381200 Makefile.in
8801242 echo " rm -f" $$list; \
8811243 rm -f $$list
8821244
883 esedb_test_get_version$(EXEEXT): $(esedb_test_get_version_OBJECTS) $(esedb_test_get_version_DEPENDENCIES) $(EXTRA_esedb_test_get_version_DEPENDENCIES)
884 @rm -f esedb_test_get_version$(EXEEXT)
885 $(AM_V_CCLD)$(LINK) $(esedb_test_get_version_OBJECTS) $(esedb_test_get_version_LDADD) $(LIBS)
886
887 esedb_test_open_close$(EXEEXT): $(esedb_test_open_close_OBJECTS) $(esedb_test_open_close_DEPENDENCIES) $(EXTRA_esedb_test_open_close_DEPENDENCIES)
888 @rm -f esedb_test_open_close$(EXEEXT)
889 $(AM_V_CCLD)$(LINK) $(esedb_test_open_close_OBJECTS) $(esedb_test_open_close_LDADD) $(LIBS)
1245 esedb_test_catalog$(EXEEXT): $(esedb_test_catalog_OBJECTS) $(esedb_test_catalog_DEPENDENCIES) $(EXTRA_esedb_test_catalog_DEPENDENCIES)
1246 @rm -f esedb_test_catalog$(EXEEXT)
1247 $(AM_V_CCLD)$(LINK) $(esedb_test_catalog_OBJECTS) $(esedb_test_catalog_LDADD) $(LIBS)
1248
1249 esedb_test_catalog_definition$(EXEEXT): $(esedb_test_catalog_definition_OBJECTS) $(esedb_test_catalog_definition_DEPENDENCIES) $(EXTRA_esedb_test_catalog_definition_DEPENDENCIES)
1250 @rm -f esedb_test_catalog_definition$(EXEEXT)
1251 $(AM_V_CCLD)$(LINK) $(esedb_test_catalog_definition_OBJECTS) $(esedb_test_catalog_definition_LDADD) $(LIBS)
1252
1253 esedb_test_column$(EXEEXT): $(esedb_test_column_OBJECTS) $(esedb_test_column_DEPENDENCIES) $(EXTRA_esedb_test_column_DEPENDENCIES)
1254 @rm -f esedb_test_column$(EXEEXT)
1255 $(AM_V_CCLD)$(LINK) $(esedb_test_column_OBJECTS) $(esedb_test_column_LDADD) $(LIBS)
1256
1257 esedb_test_column_type$(EXEEXT): $(esedb_test_column_type_OBJECTS) $(esedb_test_column_type_DEPENDENCIES) $(EXTRA_esedb_test_column_type_DEPENDENCIES)
1258 @rm -f esedb_test_column_type$(EXEEXT)
1259 $(AM_V_CCLD)$(LINK) $(esedb_test_column_type_OBJECTS) $(esedb_test_column_type_LDADD) $(LIBS)
1260
1261 esedb_test_data_definition$(EXEEXT): $(esedb_test_data_definition_OBJECTS) $(esedb_test_data_definition_DEPENDENCIES) $(EXTRA_esedb_test_data_definition_DEPENDENCIES)
1262 @rm -f esedb_test_data_definition$(EXEEXT)
1263 $(AM_V_CCLD)$(LINK) $(esedb_test_data_definition_OBJECTS) $(esedb_test_data_definition_LDADD) $(LIBS)
1264
1265 esedb_test_data_segment$(EXEEXT): $(esedb_test_data_segment_OBJECTS) $(esedb_test_data_segment_DEPENDENCIES) $(EXTRA_esedb_test_data_segment_DEPENDENCIES)
1266 @rm -f esedb_test_data_segment$(EXEEXT)
1267 $(AM_V_CCLD)$(LINK) $(esedb_test_data_segment_OBJECTS) $(esedb_test_data_segment_LDADD) $(LIBS)
1268
1269 esedb_test_database$(EXEEXT): $(esedb_test_database_OBJECTS) $(esedb_test_database_DEPENDENCIES) $(EXTRA_esedb_test_database_DEPENDENCIES)
1270 @rm -f esedb_test_database$(EXEEXT)
1271 $(AM_V_CCLD)$(LINK) $(esedb_test_database_OBJECTS) $(esedb_test_database_LDADD) $(LIBS)
1272
1273 esedb_test_error$(EXEEXT): $(esedb_test_error_OBJECTS) $(esedb_test_error_DEPENDENCIES) $(EXTRA_esedb_test_error_DEPENDENCIES)
1274 @rm -f esedb_test_error$(EXEEXT)
1275 $(AM_V_CCLD)$(LINK) $(esedb_test_error_OBJECTS) $(esedb_test_error_LDADD) $(LIBS)
1276
1277 esedb_test_file$(EXEEXT): $(esedb_test_file_OBJECTS) $(esedb_test_file_DEPENDENCIES) $(EXTRA_esedb_test_file_DEPENDENCIES)
1278 @rm -f esedb_test_file$(EXEEXT)
1279 $(AM_V_CCLD)$(LINK) $(esedb_test_file_OBJECTS) $(esedb_test_file_LDADD) $(LIBS)
1280
1281 esedb_test_index$(EXEEXT): $(esedb_test_index_OBJECTS) $(esedb_test_index_DEPENDENCIES) $(EXTRA_esedb_test_index_DEPENDENCIES)
1282 @rm -f esedb_test_index$(EXEEXT)
1283 $(AM_V_CCLD)$(LINK) $(esedb_test_index_OBJECTS) $(esedb_test_index_LDADD) $(LIBS)
1284
1285 esedb_test_io_handle$(EXEEXT): $(esedb_test_io_handle_OBJECTS) $(esedb_test_io_handle_DEPENDENCIES) $(EXTRA_esedb_test_io_handle_DEPENDENCIES)
1286 @rm -f esedb_test_io_handle$(EXEEXT)
1287 $(AM_V_CCLD)$(LINK) $(esedb_test_io_handle_OBJECTS) $(esedb_test_io_handle_LDADD) $(LIBS)
1288
1289 esedb_test_key$(EXEEXT): $(esedb_test_key_OBJECTS) $(esedb_test_key_DEPENDENCIES) $(EXTRA_esedb_test_key_DEPENDENCIES)
1290 @rm -f esedb_test_key$(EXEEXT)
1291 $(AM_V_CCLD)$(LINK) $(esedb_test_key_OBJECTS) $(esedb_test_key_LDADD) $(LIBS)
1292
1293 esedb_test_long_value$(EXEEXT): $(esedb_test_long_value_OBJECTS) $(esedb_test_long_value_DEPENDENCIES) $(EXTRA_esedb_test_long_value_DEPENDENCIES)
1294 @rm -f esedb_test_long_value$(EXEEXT)
1295 $(AM_V_CCLD)$(LINK) $(esedb_test_long_value_OBJECTS) $(esedb_test_long_value_LDADD) $(LIBS)
1296
1297 esedb_test_multi_value$(EXEEXT): $(esedb_test_multi_value_OBJECTS) $(esedb_test_multi_value_DEPENDENCIES) $(EXTRA_esedb_test_multi_value_DEPENDENCIES)
1298 @rm -f esedb_test_multi_value$(EXEEXT)
1299 $(AM_V_CCLD)$(LINK) $(esedb_test_multi_value_OBJECTS) $(esedb_test_multi_value_LDADD) $(LIBS)
1300
1301 esedb_test_notify$(EXEEXT): $(esedb_test_notify_OBJECTS) $(esedb_test_notify_DEPENDENCIES) $(EXTRA_esedb_test_notify_DEPENDENCIES)
1302 @rm -f esedb_test_notify$(EXEEXT)
1303 $(AM_V_CCLD)$(LINK) $(esedb_test_notify_OBJECTS) $(esedb_test_notify_LDADD) $(LIBS)
1304
1305 esedb_test_page$(EXEEXT): $(esedb_test_page_OBJECTS) $(esedb_test_page_DEPENDENCIES) $(EXTRA_esedb_test_page_DEPENDENCIES)
1306 @rm -f esedb_test_page$(EXEEXT)
1307 $(AM_V_CCLD)$(LINK) $(esedb_test_page_OBJECTS) $(esedb_test_page_LDADD) $(LIBS)
1308
1309 esedb_test_page_tree$(EXEEXT): $(esedb_test_page_tree_OBJECTS) $(esedb_test_page_tree_DEPENDENCIES) $(EXTRA_esedb_test_page_tree_DEPENDENCIES)
1310 @rm -f esedb_test_page_tree$(EXEEXT)
1311 $(AM_V_CCLD)$(LINK) $(esedb_test_page_tree_OBJECTS) $(esedb_test_page_tree_LDADD) $(LIBS)
1312
1313 esedb_test_page_value$(EXEEXT): $(esedb_test_page_value_OBJECTS) $(esedb_test_page_value_DEPENDENCIES) $(EXTRA_esedb_test_page_value_DEPENDENCIES)
1314 @rm -f esedb_test_page_value$(EXEEXT)
1315 $(AM_V_CCLD)$(LINK) $(esedb_test_page_value_OBJECTS) $(esedb_test_page_value_LDADD) $(LIBS)
1316
1317 esedb_test_record$(EXEEXT): $(esedb_test_record_OBJECTS) $(esedb_test_record_DEPENDENCIES) $(EXTRA_esedb_test_record_DEPENDENCIES)
1318 @rm -f esedb_test_record$(EXEEXT)
1319 $(AM_V_CCLD)$(LINK) $(esedb_test_record_OBJECTS) $(esedb_test_record_LDADD) $(LIBS)
1320
1321 esedb_test_support$(EXEEXT): $(esedb_test_support_OBJECTS) $(esedb_test_support_DEPENDENCIES) $(EXTRA_esedb_test_support_DEPENDENCIES)
1322 @rm -f esedb_test_support$(EXEEXT)
1323 $(AM_V_CCLD)$(LINK) $(esedb_test_support_OBJECTS) $(esedb_test_support_LDADD) $(LIBS)
1324
1325 esedb_test_table$(EXEEXT): $(esedb_test_table_OBJECTS) $(esedb_test_table_DEPENDENCIES) $(EXTRA_esedb_test_table_DEPENDENCIES)
1326 @rm -f esedb_test_table$(EXEEXT)
1327 $(AM_V_CCLD)$(LINK) $(esedb_test_table_OBJECTS) $(esedb_test_table_LDADD) $(LIBS)
1328
1329 esedb_test_table_definition$(EXEEXT): $(esedb_test_table_definition_OBJECTS) $(esedb_test_table_definition_DEPENDENCIES) $(EXTRA_esedb_test_table_definition_DEPENDENCIES)
1330 @rm -f esedb_test_table_definition$(EXEEXT)
1331 $(AM_V_CCLD)$(LINK) $(esedb_test_table_definition_OBJECTS) $(esedb_test_table_definition_LDADD) $(LIBS)
8901332
8911333 mostlyclean-compile:
8921334 -rm -f *.$(OBJEXT)
8941336 distclean-compile:
8951337 -rm -f *.tab.c
8961338
897 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_get_version.Po@am__quote@
898 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_open_close.Po@am__quote@
1339 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_catalog.Po@am__quote@
1340 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_catalog_definition.Po@am__quote@
1341 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_column.Po@am__quote@
1342 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_column_type.Po@am__quote@
1343 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_data_definition.Po@am__quote@
1344 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_data_segment.Po@am__quote@
1345 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_database.Po@am__quote@
1346 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_error.Po@am__quote@
1347 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_file.Po@am__quote@
1348 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_getopt.Po@am__quote@
1349 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_index.Po@am__quote@
1350 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_io_handle.Po@am__quote@
1351 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_key.Po@am__quote@
1352 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_long_value.Po@am__quote@
1353 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_memory.Po@am__quote@
1354 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_multi_value.Po@am__quote@
1355 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_notify.Po@am__quote@
1356 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_page.Po@am__quote@
1357 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_page_tree.Po@am__quote@
1358 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_page_value.Po@am__quote@
1359 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_record.Po@am__quote@
1360 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_support.Po@am__quote@
1361 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_table.Po@am__quote@
1362 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/esedb_test_table_definition.Po@am__quote@
8991363
9001364 .c.o:
9011365 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
11171581 am__force_recheck=am--force-recheck \
11181582 TEST_LOGS="$$log_list"; \
11191583 exit $$?
1120 test_api_functions.sh.log: test_api_functions.sh
1121 @p='test_api_functions.sh'; \
1122 b='test_api_functions.sh'; \
1584 test_library.sh.log: test_library.sh
1585 @p='test_library.sh'; \
1586 b='test_library.sh'; \
11231587 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
11241588 --log-file $$b.log --trs-file $$b.trs \
11251589 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
11381602 --log-file $$b.log --trs-file $$b.trs \
11391603 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
11401604 "$$tst" $(AM_TESTS_FD_REDIRECT)
1141 test_python_functions.sh.log: test_python_functions.sh
1142 @p='test_python_functions.sh'; \
1143 b='test_python_functions.sh'; \
1605 test_python_module.sh.log: test_python_module.sh
1606 @p='test_python_module.sh'; \
1607 b='test_python_module.sh'; \
11441608 $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
11451609 --log-file $$b.log --trs-file $$b.trs \
11461610 $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
0 /*
1 * Library catalog type test program
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <types.h>
24
25 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
26 #include <stdlib.h>
27 #endif
28
29 #include "esedb_test_libcerror.h"
30 #include "esedb_test_libesedb.h"
31 #include "esedb_test_macros.h"
32 #include "esedb_test_memory.h"
33 #include "esedb_test_unused.h"
34
35 #include "../libesedb/libesedb_catalog.h"
36
37 #if defined( __GNUC__ )
38
39 /* Tests the libesedb_catalog_initialize function
40 * Returns 1 if successful or 0 if not
41 */
42 int esedb_test_catalog_initialize(
43 void )
44 {
45 libcerror_error_t *error = NULL;
46 libesedb_catalog_t *catalog = NULL;
47 int result = 0;
48
49 #if defined( HAVE_ESEDB_TEST_MEMORY )
50 int number_of_malloc_fail_tests = 1;
51 int number_of_memset_fail_tests = 1;
52 int test_number = 0;
53 #endif
54
55 /* Test regular cases
56 */
57 result = libesedb_catalog_initialize(
58 &catalog,
59 &error );
60
61 ESEDB_TEST_ASSERT_EQUAL_INT(
62 "result",
63 result,
64 1 );
65
66 ESEDB_TEST_ASSERT_IS_NOT_NULL(
67 "catalog",
68 catalog );
69
70 ESEDB_TEST_ASSERT_IS_NULL(
71 "error",
72 error );
73
74 result = libesedb_catalog_free(
75 &catalog,
76 &error );
77
78 ESEDB_TEST_ASSERT_EQUAL_INT(
79 "result",
80 result,
81 1 );
82
83 ESEDB_TEST_ASSERT_IS_NULL(
84 "catalog",
85 catalog );
86
87 ESEDB_TEST_ASSERT_IS_NULL(
88 "error",
89 error );
90
91 /* Test error cases
92 */
93 result = libesedb_catalog_initialize(
94 NULL,
95 &error );
96
97 ESEDB_TEST_ASSERT_EQUAL_INT(
98 "result",
99 result,
100 -1 );
101
102 ESEDB_TEST_ASSERT_IS_NOT_NULL(
103 "error",
104 error );
105
106 libcerror_error_free(
107 &error );
108
109 catalog = (libesedb_catalog_t *) 0x12345678UL;
110
111 result = libesedb_catalog_initialize(
112 &catalog,
113 &error );
114
115 ESEDB_TEST_ASSERT_EQUAL_INT(
116 "result",
117 result,
118 -1 );
119
120 ESEDB_TEST_ASSERT_IS_NOT_NULL(
121 "error",
122 error );
123
124 libcerror_error_free(
125 &error );
126
127 catalog = NULL;
128
129 #if defined( HAVE_ESEDB_TEST_MEMORY )
130
131 for( test_number = 0;
132 test_number < number_of_malloc_fail_tests;
133 test_number++ )
134 {
135 /* Test libesedb_catalog_initialize with malloc failing
136 */
137 esedb_test_malloc_attempts_before_fail = test_number;
138
139 result = libesedb_catalog_initialize(
140 &catalog,
141 &error );
142
143 if( esedb_test_malloc_attempts_before_fail != -1 )
144 {
145 esedb_test_malloc_attempts_before_fail = -1;
146
147 if( catalog != NULL )
148 {
149 libesedb_catalog_free(
150 &catalog,
151 NULL );
152 }
153 }
154 else
155 {
156 ESEDB_TEST_ASSERT_EQUAL_INT(
157 "result",
158 result,
159 -1 );
160
161 ESEDB_TEST_ASSERT_IS_NULL(
162 "catalog",
163 catalog );
164
165 ESEDB_TEST_ASSERT_IS_NOT_NULL(
166 "error",
167 error );
168
169 libcerror_error_free(
170 &error );
171 }
172 }
173 for( test_number = 0;
174 test_number < number_of_memset_fail_tests;
175 test_number++ )
176 {
177 /* Test libesedb_catalog_initialize with memset failing
178 */
179 esedb_test_memset_attempts_before_fail = test_number;
180
181 result = libesedb_catalog_initialize(
182 &catalog,
183 &error );
184
185 if( esedb_test_memset_attempts_before_fail != -1 )
186 {
187 esedb_test_memset_attempts_before_fail = -1;
188
189 if( catalog != NULL )
190 {
191 libesedb_catalog_free(
192 &catalog,
193 NULL );
194 }
195 }
196 else
197 {
198 ESEDB_TEST_ASSERT_EQUAL_INT(
199 "result",
200 result,
201 -1 );
202
203 ESEDB_TEST_ASSERT_IS_NULL(
204 "catalog",
205 catalog );
206
207 ESEDB_TEST_ASSERT_IS_NOT_NULL(
208 "error",
209 error );
210
211 libcerror_error_free(
212 &error );
213 }
214 }
215 #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */
216
217 return( 1 );
218
219 on_error:
220 if( error != NULL )
221 {
222 libcerror_error_free(
223 &error );
224 }
225 if( catalog != NULL )
226 {
227 libesedb_catalog_free(
228 &catalog,
229 NULL );
230 }
231 return( 0 );
232 }
233
234 /* Tests the libesedb_catalog_free function
235 * Returns 1 if successful or 0 if not
236 */
237 int esedb_test_catalog_free(
238 void )
239 {
240 libcerror_error_t *error = NULL;
241 int result = 0;
242
243 /* Test error cases
244 */
245 result = libesedb_catalog_free(
246 NULL,
247 &error );
248
249 ESEDB_TEST_ASSERT_EQUAL_INT(
250 "result",
251 result,
252 -1 );
253
254 ESEDB_TEST_ASSERT_IS_NOT_NULL(
255 "error",
256 error );
257
258 libcerror_error_free(
259 &error );
260
261 return( 1 );
262
263 on_error:
264 if( error != NULL )
265 {
266 libcerror_error_free(
267 &error );
268 }
269 return( 0 );
270 }
271
272 /* Tests the libesedb_catalog_get_number_of_table_definitions function
273 * Returns 1 if successful or 0 if not
274 */
275 int esedb_test_catalog_get_number_of_table_definitions(
276 void )
277 {
278 libcerror_error_t *error = NULL;
279 libesedb_catalog_t *catalog = NULL;
280 int number_of_table_definitions = 0;
281 int number_of_table_definitions_is_set = 0;
282 int result = 0;
283
284 /* Initialize test
285 */
286 result = libesedb_catalog_initialize(
287 &catalog,
288 &error );
289
290 ESEDB_TEST_ASSERT_EQUAL_INT(
291 "result",
292 result,
293 1 );
294
295 ESEDB_TEST_ASSERT_IS_NOT_NULL(
296 "catalog",
297 catalog );
298
299 ESEDB_TEST_ASSERT_IS_NULL(
300 "error",
301 error );
302
303 /* Test regular cases
304 */
305 result = libesedb_catalog_get_number_of_table_definitions(
306 catalog,
307 &number_of_table_definitions,
308 &error );
309
310 ESEDB_TEST_ASSERT_NOT_EQUAL_INT(
311 "result",
312 result,
313 -1 );
314
315 ESEDB_TEST_ASSERT_IS_NULL(
316 "error",
317 error );
318
319 number_of_table_definitions_is_set = result;
320
321 /* Test error cases
322 */
323 result = libesedb_catalog_get_number_of_table_definitions(
324 NULL,
325 &number_of_table_definitions,
326 &error );
327
328 ESEDB_TEST_ASSERT_EQUAL_INT(
329 "result",
330 result,
331 -1 );
332
333 ESEDB_TEST_ASSERT_IS_NOT_NULL(
334 "error",
335 error );
336
337 libcerror_error_free(
338 &error );
339
340 if( number_of_table_definitions_is_set != 0 )
341 {
342 result = libesedb_catalog_get_number_of_table_definitions(
343 catalog,
344 NULL,
345 &error );
346
347 ESEDB_TEST_ASSERT_EQUAL_INT(
348 "result",
349 result,
350 -1 );
351
352 ESEDB_TEST_ASSERT_IS_NOT_NULL(
353 "error",
354 error );
355
356 libcerror_error_free(
357 &error );
358 }
359 /* Clean up
360 */
361 result = libesedb_catalog_free(
362 &catalog,
363 &error );
364
365 ESEDB_TEST_ASSERT_EQUAL_INT(
366 "result",
367 result,
368 1 );
369
370 ESEDB_TEST_ASSERT_IS_NULL(
371 "catalog",
372 catalog );
373
374 ESEDB_TEST_ASSERT_IS_NULL(
375 "error",
376 error );
377
378 return( 1 );
379
380 on_error:
381 if( error != NULL )
382 {
383 libcerror_error_free(
384 &error );
385 }
386 if( catalog != NULL )
387 {
388 libesedb_catalog_free(
389 &catalog,
390 NULL );
391 }
392 return( 0 );
393 }
394
395 #endif /* defined( __GNUC__ ) */
396
397 /* The main program
398 */
399 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
400 int wmain(
401 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
402 wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
403 #else
404 int main(
405 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
406 char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
407 #endif
408 {
409 ESEDB_TEST_UNREFERENCED_PARAMETER( argc )
410 ESEDB_TEST_UNREFERENCED_PARAMETER( argv )
411
412 #if defined( __GNUC__ )
413
414 ESEDB_TEST_RUN(
415 "libesedb_catalog_initialize",
416 esedb_test_catalog_initialize );
417
418 ESEDB_TEST_RUN(
419 "libesedb_catalog_free",
420 esedb_test_catalog_free );
421
422 ESEDB_TEST_RUN(
423 "libesedb_catalog_get_number_of_table_definitions",
424 esedb_test_catalog_get_number_of_table_definitions );
425
426 /* TODO: add tests for libesedb_catalog_get_table_definition_by_index */
427
428 /* TODO: add tests for libesedb_catalog_get_table_definition_by_name */
429
430 /* TODO: add tests for libesedb_catalog_get_table_definition_by_utf8_name */
431
432 /* TODO: add tests for libesedb_catalog_get_table_definition_by_utf16_name */
433
434 /* TODO: add tests for libesedb_catalog_read */
435
436 #endif /* defined( __GNUC__ ) */
437
438 return( EXIT_SUCCESS );
439
440 on_error:
441 return( EXIT_FAILURE );
442 }
443
0 /*
1 * Library catalog_definition type test program
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <types.h>
24
25 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
26 #include <stdlib.h>
27 #endif
28
29 #include "esedb_test_libcerror.h"
30 #include "esedb_test_libesedb.h"
31 #include "esedb_test_macros.h"
32 #include "esedb_test_memory.h"
33 #include "esedb_test_unused.h"
34
35 #include "../libesedb/libesedb_catalog_definition.h"
36
37 #if defined( __GNUC__ )
38
39 /* Tests the libesedb_catalog_definition_initialize function
40 * Returns 1 if successful or 0 if not
41 */
42 int esedb_test_catalog_definition_initialize(
43 void )
44 {
45 libcerror_error_t *error = NULL;
46 libesedb_catalog_definition_t *catalog_definition = NULL;
47 int result = 0;
48
49 #if defined( HAVE_ESEDB_TEST_MEMORY )
50 int number_of_malloc_fail_tests = 1;
51 int number_of_memset_fail_tests = 1;
52 int test_number = 0;
53 #endif
54
55 /* Test regular cases
56 */
57 result = libesedb_catalog_definition_initialize(
58 &catalog_definition,
59 &error );
60
61 ESEDB_TEST_ASSERT_EQUAL_INT(
62 "result",
63 result,
64 1 );
65
66 ESEDB_TEST_ASSERT_IS_NOT_NULL(
67 "catalog_definition",
68 catalog_definition );
69
70 ESEDB_TEST_ASSERT_IS_NULL(
71 "error",
72 error );
73
74 result = libesedb_catalog_definition_free(
75 &catalog_definition,
76 &error );
77
78 ESEDB_TEST_ASSERT_EQUAL_INT(
79 "result",
80 result,
81 1 );
82
83 ESEDB_TEST_ASSERT_IS_NULL(
84 "catalog_definition",
85 catalog_definition );
86
87 ESEDB_TEST_ASSERT_IS_NULL(
88 "error",
89 error );
90
91 /* Test error cases
92 */
93 result = libesedb_catalog_definition_initialize(
94 NULL,
95 &error );
96
97 ESEDB_TEST_ASSERT_EQUAL_INT(
98 "result",
99 result,
100 -1 );
101
102 ESEDB_TEST_ASSERT_IS_NOT_NULL(
103 "error",
104 error );
105
106 libcerror_error_free(
107 &error );
108
109 catalog_definition = (libesedb_catalog_definition_t *) 0x12345678UL;
110
111 result = libesedb_catalog_definition_initialize(
112 &catalog_definition,
113 &error );
114
115 ESEDB_TEST_ASSERT_EQUAL_INT(
116 "result",
117 result,
118 -1 );
119
120 ESEDB_TEST_ASSERT_IS_NOT_NULL(
121 "error",
122 error );
123
124 libcerror_error_free(
125 &error );
126
127 catalog_definition = NULL;
128
129 #if defined( HAVE_ESEDB_TEST_MEMORY )
130
131 for( test_number = 0;
132 test_number < number_of_malloc_fail_tests;
133 test_number++ )
134 {
135 /* Test libesedb_catalog_definition_initialize with malloc failing
136 */
137 esedb_test_malloc_attempts_before_fail = test_number;
138
139 result = libesedb_catalog_definition_initialize(
140 &catalog_definition,
141 &error );
142
143 if( esedb_test_malloc_attempts_before_fail != -1 )
144 {
145 esedb_test_malloc_attempts_before_fail = -1;
146
147 if( catalog_definition != NULL )
148 {
149 libesedb_catalog_definition_free(
150 &catalog_definition,
151 NULL );
152 }
153 }
154 else
155 {
156 ESEDB_TEST_ASSERT_EQUAL_INT(
157 "result",
158 result,
159 -1 );
160
161 ESEDB_TEST_ASSERT_IS_NULL(
162 "catalog_definition",
163 catalog_definition );
164
165 ESEDB_TEST_ASSERT_IS_NOT_NULL(
166 "error",
167 error );
168
169 libcerror_error_free(
170 &error );
171 }
172 }
173 for( test_number = 0;
174 test_number < number_of_memset_fail_tests;
175 test_number++ )
176 {
177 /* Test libesedb_catalog_definition_initialize with memset failing
178 */
179 esedb_test_memset_attempts_before_fail = test_number;
180
181 result = libesedb_catalog_definition_initialize(
182 &catalog_definition,
183 &error );
184
185 if( esedb_test_memset_attempts_before_fail != -1 )
186 {
187 esedb_test_memset_attempts_before_fail = -1;
188
189 if( catalog_definition != NULL )
190 {
191 libesedb_catalog_definition_free(
192 &catalog_definition,
193 NULL );
194 }
195 }
196 else
197 {
198 ESEDB_TEST_ASSERT_EQUAL_INT(
199 "result",
200 result,
201 -1 );
202
203 ESEDB_TEST_ASSERT_IS_NULL(
204 "catalog_definition",
205 catalog_definition );
206
207 ESEDB_TEST_ASSERT_IS_NOT_NULL(
208 "error",
209 error );
210
211 libcerror_error_free(
212 &error );
213 }
214 }
215 #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */
216
217 return( 1 );
218
219 on_error:
220 if( error != NULL )
221 {
222 libcerror_error_free(
223 &error );
224 }
225 if( catalog_definition != NULL )
226 {
227 libesedb_catalog_definition_free(
228 &catalog_definition,
229 NULL );
230 }
231 return( 0 );
232 }
233
234 /* Tests the libesedb_catalog_definition_free function
235 * Returns 1 if successful or 0 if not
236 */
237 int esedb_test_catalog_definition_free(
238 void )
239 {
240 libcerror_error_t *error = NULL;
241 int result = 0;
242
243 /* Test error cases
244 */
245 result = libesedb_catalog_definition_free(
246 NULL,
247 &error );
248
249 ESEDB_TEST_ASSERT_EQUAL_INT(
250 "result",
251 result,
252 -1 );
253
254 ESEDB_TEST_ASSERT_IS_NOT_NULL(
255 "error",
256 error );
257
258 libcerror_error_free(
259 &error );
260
261 return( 1 );
262
263 on_error:
264 if( error != NULL )
265 {
266 libcerror_error_free(
267 &error );
268 }
269 return( 0 );
270 }
271
272 /* Tests the libesedb_catalog_definition_get_identifier function
273 * Returns 1 if successful or 0 if not
274 */
275 int esedb_test_catalog_definition_get_identifier(
276 void )
277 {
278 libcerror_error_t *error = NULL;
279 libesedb_catalog_definition_t *catalog_definition = NULL;
280 uint32_t identifier = 0;
281 int identifier_is_set = 0;
282 int result = 0;
283
284 /* Initialize test
285 */
286 result = libesedb_catalog_definition_initialize(
287 &catalog_definition,
288 &error );
289
290 ESEDB_TEST_ASSERT_EQUAL_INT(
291 "result",
292 result,
293 1 );
294
295 ESEDB_TEST_ASSERT_IS_NOT_NULL(
296 "catalog_definition",
297 catalog_definition );
298
299 ESEDB_TEST_ASSERT_IS_NULL(
300 "error",
301 error );
302
303 /* Test regular cases
304 */
305 result = libesedb_catalog_definition_get_identifier(
306 catalog_definition,
307 &identifier,
308 &error );
309
310 ESEDB_TEST_ASSERT_NOT_EQUAL_INT(
311 "result",
312 result,
313 -1 );
314
315 ESEDB_TEST_ASSERT_IS_NULL(
316 "error",
317 error );
318
319 identifier_is_set = result;
320
321 /* Test error cases
322 */
323 result = libesedb_catalog_definition_get_identifier(
324 NULL,
325 &identifier,
326 &error );
327
328 ESEDB_TEST_ASSERT_EQUAL_INT(
329 "result",
330 result,
331 -1 );
332
333 ESEDB_TEST_ASSERT_IS_NOT_NULL(
334 "error",
335 error );
336
337 libcerror_error_free(
338 &error );
339
340 if( identifier_is_set != 0 )
341 {
342 result = libesedb_catalog_definition_get_identifier(
343 catalog_definition,
344 NULL,
345 &error );
346
347 ESEDB_TEST_ASSERT_EQUAL_INT(
348 "result",
349 result,
350 -1 );
351
352 ESEDB_TEST_ASSERT_IS_NOT_NULL(
353 "error",
354 error );
355
356 libcerror_error_free(
357 &error );
358 }
359 /* Clean up
360 */
361 result = libesedb_catalog_definition_free(
362 &catalog_definition,
363 &error );
364
365 ESEDB_TEST_ASSERT_EQUAL_INT(
366 "result",
367 result,
368 1 );
369
370 ESEDB_TEST_ASSERT_IS_NULL(
371 "catalog_definition",
372 catalog_definition );
373
374 ESEDB_TEST_ASSERT_IS_NULL(
375 "error",
376 error );
377
378 return( 1 );
379
380 on_error:
381 if( error != NULL )
382 {
383 libcerror_error_free(
384 &error );
385 }
386 if( catalog_definition != NULL )
387 {
388 libesedb_catalog_definition_free(
389 &catalog_definition,
390 NULL );
391 }
392 return( 0 );
393 }
394
395 /* Tests the libesedb_catalog_definition_get_column_type function
396 * Returns 1 if successful or 0 if not
397 */
398 int esedb_test_catalog_definition_get_column_type(
399 void )
400 {
401 libcerror_error_t *error = NULL;
402 libesedb_catalog_definition_t *catalog_definition = NULL;
403 uint32_t column_type = 0;
404 int column_type_is_set = 0;
405 int result = 0;
406
407 /* Initialize test
408 */
409 result = libesedb_catalog_definition_initialize(
410 &catalog_definition,
411 &error );
412
413 ESEDB_TEST_ASSERT_EQUAL_INT(
414 "result",
415 result,
416 1 );
417
418 ESEDB_TEST_ASSERT_IS_NOT_NULL(
419 "catalog_definition",
420 catalog_definition );
421
422 ESEDB_TEST_ASSERT_IS_NULL(
423 "error",
424 error );
425
426 /* Test regular cases
427 */
428 result = libesedb_catalog_definition_get_column_type(
429 catalog_definition,
430 &column_type,
431 &error );
432
433 ESEDB_TEST_ASSERT_NOT_EQUAL_INT(
434 "result",
435 result,
436 -1 );
437
438 ESEDB_TEST_ASSERT_IS_NULL(
439 "error",
440 error );
441
442 column_type_is_set = result;
443
444 /* Test error cases
445 */
446 result = libesedb_catalog_definition_get_column_type(
447 NULL,
448 &column_type,
449 &error );
450
451 ESEDB_TEST_ASSERT_EQUAL_INT(
452 "result",
453 result,
454 -1 );
455
456 ESEDB_TEST_ASSERT_IS_NOT_NULL(
457 "error",
458 error );
459
460 libcerror_error_free(
461 &error );
462
463 if( column_type_is_set != 0 )
464 {
465 result = libesedb_catalog_definition_get_column_type(
466 catalog_definition,
467 NULL,
468 &error );
469
470 ESEDB_TEST_ASSERT_EQUAL_INT(
471 "result",
472 result,
473 -1 );
474
475 ESEDB_TEST_ASSERT_IS_NOT_NULL(
476 "error",
477 error );
478
479 libcerror_error_free(
480 &error );
481 }
482 /* Clean up
483 */
484 result = libesedb_catalog_definition_free(
485 &catalog_definition,
486 &error );
487
488 ESEDB_TEST_ASSERT_EQUAL_INT(
489 "result",
490 result,
491 1 );
492
493 ESEDB_TEST_ASSERT_IS_NULL(
494 "catalog_definition",
495 catalog_definition );
496
497 ESEDB_TEST_ASSERT_IS_NULL(
498 "error",
499 error );
500
501 return( 1 );
502
503 on_error:
504 if( error != NULL )
505 {
506 libcerror_error_free(
507 &error );
508 }
509 if( catalog_definition != NULL )
510 {
511 libesedb_catalog_definition_free(
512 &catalog_definition,
513 NULL );
514 }
515 return( 0 );
516 }
517
518 #endif /* defined( __GNUC__ ) */
519
520 /* The main program
521 */
522 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
523 int wmain(
524 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
525 wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
526 #else
527 int main(
528 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
529 char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
530 #endif
531 {
532 ESEDB_TEST_UNREFERENCED_PARAMETER( argc )
533 ESEDB_TEST_UNREFERENCED_PARAMETER( argv )
534
535 #if defined( __GNUC__ )
536
537 ESEDB_TEST_RUN(
538 "libesedb_catalog_definition_initialize",
539 esedb_test_catalog_definition_initialize );
540
541 ESEDB_TEST_RUN(
542 "libesedb_catalog_definition_free",
543 esedb_test_catalog_definition_free );
544
545 /* TODO: add tests for libesedb_catalog_definition_read */
546
547 ESEDB_TEST_RUN(
548 "libesedb_catalog_definition_get_identifier",
549 esedb_test_catalog_definition_get_identifier );
550
551 ESEDB_TEST_RUN(
552 "libesedb_catalog_definition_get_column_type",
553 esedb_test_catalog_definition_get_column_type );
554
555 /* TODO: add tests for libesedb_catalog_definition_get_utf8_name_size */
556
557 /* TODO: add tests for libesedb_catalog_definition_get_utf8_name */
558
559 /* TODO: add tests for libesedb_catalog_definition_get_utf16_name_size */
560
561 /* TODO: add tests for libesedb_catalog_definition_get_utf16_name */
562
563 /* TODO: add tests for libesedb_catalog_definition_get_utf8_template_name_size */
564
565 /* TODO: add tests for libesedb_catalog_definition_get_utf8_template_name */
566
567 /* TODO: add tests for libesedb_catalog_definition_get_utf16_template_name_size */
568
569 /* TODO: add tests for libesedb_catalog_definition_get_utf16_template_name */
570
571 #endif /* defined( __GNUC__ ) */
572
573 return( EXIT_SUCCESS );
574
575 on_error:
576 return( EXIT_FAILURE );
577 }
578
0 /*
1 * Library column type test program
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <types.h>
24
25 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
26 #include <stdlib.h>
27 #endif
28
29 #include "esedb_test_libcerror.h"
30 #include "esedb_test_libesedb.h"
31 #include "esedb_test_macros.h"
32 #include "esedb_test_memory.h"
33 #include "esedb_test_unused.h"
34
35 #include "../libesedb/libesedb_column.h"
36
37 /* Tests the libesedb_column_free function
38 * Returns 1 if successful or 0 if not
39 */
40 int esedb_test_column_free(
41 void )
42 {
43 libcerror_error_t *error = NULL;
44 int result = 0;
45
46 /* Test error cases
47 */
48 result = libesedb_column_free(
49 NULL,
50 &error );
51
52 ESEDB_TEST_ASSERT_EQUAL_INT(
53 "result",
54 result,
55 -1 );
56
57 ESEDB_TEST_ASSERT_IS_NOT_NULL(
58 "error",
59 error );
60
61 libcerror_error_free(
62 &error );
63
64 return( 1 );
65
66 on_error:
67 if( error != NULL )
68 {
69 libcerror_error_free(
70 &error );
71 }
72 return( 0 );
73 }
74
75 #if defined( __GNUC__ )
76
77 #endif /* defined( __GNUC__ ) */
78
79 /* The main program
80 */
81 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
82 int wmain(
83 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
84 wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
85 #else
86 int main(
87 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
88 char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
89 #endif
90 {
91 ESEDB_TEST_UNREFERENCED_PARAMETER( argc )
92 ESEDB_TEST_UNREFERENCED_PARAMETER( argv )
93
94 #if defined( __GNUC__ )
95
96 /* TODO: add tests for libesedb_column_initialize */
97
98 #endif /* defined( __GNUC__ ) */
99
100 ESEDB_TEST_RUN(
101 "libesedb_column_free",
102 esedb_test_column_free );
103
104 #if defined( __GNUC__ )
105
106 /* TODO: add tests for libesedb_column_get_identifier */
107
108 /* TODO: add tests for libesedb_column_get_type */
109
110 /* TODO: add tests for libesedb_column_get_utf8_name_size */
111
112 /* TODO: add tests for libesedb_column_get_utf8_name */
113
114 /* TODO: add tests for libesedb_column_get_utf16_name_size */
115
116 /* TODO: add tests for libesedb_column_get_utf16_name */
117
118 #endif /* defined( __GNUC__ ) */
119
120 return( EXIT_SUCCESS );
121
122 on_error:
123 return( EXIT_FAILURE );
124 }
125
0 /*
1 * Library column_type type test program
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <types.h>
24
25 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
26 #include <stdlib.h>
27 #endif
28
29 #include "esedb_test_libcerror.h"
30 #include "esedb_test_libesedb.h"
31 #include "esedb_test_macros.h"
32 #include "esedb_test_memory.h"
33 #include "esedb_test_unused.h"
34
35 /* The main program
36 */
37 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
38 int wmain(
39 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
40 wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
41 #else
42 int main(
43 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
44 char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
45 #endif
46 {
47 ESEDB_TEST_UNREFERENCED_PARAMETER( argc )
48 ESEDB_TEST_UNREFERENCED_PARAMETER( argv )
49
50 #if defined( __GNUC__ )
51
52 /* TODO: add tests for libesedb_column_type_get_identifier */
53
54 /* TODO: add tests for libesedb_column_type_get_description */
55
56 #endif /* defined( __GNUC__ ) */
57
58 return( EXIT_SUCCESS );
59
60 on_error:
61 return( EXIT_FAILURE );
62 }
63
0 /*
1 * Library data_definition type test program
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <types.h>
24
25 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
26 #include <stdlib.h>
27 #endif
28
29 #include "esedb_test_libcerror.h"
30 #include "esedb_test_libesedb.h"
31 #include "esedb_test_macros.h"
32 #include "esedb_test_memory.h"
33 #include "esedb_test_unused.h"
34
35 #include "../libesedb/libesedb_data_definition.h"
36
37 #if defined( __GNUC__ )
38
39 /* Tests the libesedb_data_definition_initialize function
40 * Returns 1 if successful or 0 if not
41 */
42 int esedb_test_data_definition_initialize(
43 void )
44 {
45 libcerror_error_t *error = NULL;
46 libesedb_data_definition_t *data_definition = NULL;
47 int result = 0;
48
49 #if defined( HAVE_ESEDB_TEST_MEMORY )
50 int number_of_malloc_fail_tests = 1;
51 int number_of_memset_fail_tests = 1;
52 int test_number = 0;
53 #endif
54
55 /* Test regular cases
56 */
57 result = libesedb_data_definition_initialize(
58 &data_definition,
59 &error );
60
61 ESEDB_TEST_ASSERT_EQUAL_INT(
62 "result",
63 result,
64 1 );
65
66 ESEDB_TEST_ASSERT_IS_NOT_NULL(
67 "data_definition",
68 data_definition );
69
70 ESEDB_TEST_ASSERT_IS_NULL(
71 "error",
72 error );
73
74 result = libesedb_data_definition_free(
75 &data_definition,
76 &error );
77
78 ESEDB_TEST_ASSERT_EQUAL_INT(
79 "result",
80 result,
81 1 );
82
83 ESEDB_TEST_ASSERT_IS_NULL(
84 "data_definition",
85 data_definition );
86
87 ESEDB_TEST_ASSERT_IS_NULL(
88 "error",
89 error );
90
91 /* Test error cases
92 */
93 result = libesedb_data_definition_initialize(
94 NULL,
95 &error );
96
97 ESEDB_TEST_ASSERT_EQUAL_INT(
98 "result",
99 result,
100 -1 );
101
102 ESEDB_TEST_ASSERT_IS_NOT_NULL(
103 "error",
104 error );
105
106 libcerror_error_free(
107 &error );
108
109 data_definition = (libesedb_data_definition_t *) 0x12345678UL;
110
111 result = libesedb_data_definition_initialize(
112 &data_definition,
113 &error );
114
115 ESEDB_TEST_ASSERT_EQUAL_INT(
116 "result",
117 result,
118 -1 );
119
120 ESEDB_TEST_ASSERT_IS_NOT_NULL(
121 "error",
122 error );
123
124 libcerror_error_free(
125 &error );
126
127 data_definition = NULL;
128
129 #if defined( HAVE_ESEDB_TEST_MEMORY )
130
131 for( test_number = 0;
132 test_number < number_of_malloc_fail_tests;
133 test_number++ )
134 {
135 /* Test libesedb_data_definition_initialize with malloc failing
136 */
137 esedb_test_malloc_attempts_before_fail = test_number;
138
139 result = libesedb_data_definition_initialize(
140 &data_definition,
141 &error );
142
143 if( esedb_test_malloc_attempts_before_fail != -1 )
144 {
145 esedb_test_malloc_attempts_before_fail = -1;
146
147 if( data_definition != NULL )
148 {
149 libesedb_data_definition_free(
150 &data_definition,
151 NULL );
152 }
153 }
154 else
155 {
156 ESEDB_TEST_ASSERT_EQUAL_INT(
157 "result",
158 result,
159 -1 );
160
161 ESEDB_TEST_ASSERT_IS_NULL(
162 "data_definition",
163 data_definition );
164
165 ESEDB_TEST_ASSERT_IS_NOT_NULL(
166 "error",
167 error );
168
169 libcerror_error_free(
170 &error );
171 }
172 }
173 for( test_number = 0;
174 test_number < number_of_memset_fail_tests;
175 test_number++ )
176 {
177 /* Test libesedb_data_definition_initialize with memset failing
178 */
179 esedb_test_memset_attempts_before_fail = test_number;
180
181 result = libesedb_data_definition_initialize(
182 &data_definition,
183 &error );
184
185 if( esedb_test_memset_attempts_before_fail != -1 )
186 {
187 esedb_test_memset_attempts_before_fail = -1;
188
189 if( data_definition != NULL )
190 {
191 libesedb_data_definition_free(
192 &data_definition,
193 NULL );
194 }
195 }
196 else
197 {
198 ESEDB_TEST_ASSERT_EQUAL_INT(
199 "result",
200 result,
201 -1 );
202
203 ESEDB_TEST_ASSERT_IS_NULL(
204 "data_definition",
205 data_definition );
206
207 ESEDB_TEST_ASSERT_IS_NOT_NULL(
208 "error",
209 error );
210
211 libcerror_error_free(
212 &error );
213 }
214 }
215 #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */
216
217 return( 1 );
218
219 on_error:
220 if( error != NULL )
221 {
222 libcerror_error_free(
223 &error );
224 }
225 if( data_definition != NULL )
226 {
227 libesedb_data_definition_free(
228 &data_definition,
229 NULL );
230 }
231 return( 0 );
232 }
233
234 /* Tests the libesedb_data_definition_free function
235 * Returns 1 if successful or 0 if not
236 */
237 int esedb_test_data_definition_free(
238 void )
239 {
240 libcerror_error_t *error = NULL;
241 int result = 0;
242
243 /* Test error cases
244 */
245 result = libesedb_data_definition_free(
246 NULL,
247 &error );
248
249 ESEDB_TEST_ASSERT_EQUAL_INT(
250 "result",
251 result,
252 -1 );
253
254 ESEDB_TEST_ASSERT_IS_NOT_NULL(
255 "error",
256 error );
257
258 libcerror_error_free(
259 &error );
260
261 return( 1 );
262
263 on_error:
264 if( error != NULL )
265 {
266 libcerror_error_free(
267 &error );
268 }
269 return( 0 );
270 }
271
272 #endif /* defined( __GNUC__ ) */
273
274 /* The main program
275 */
276 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
277 int wmain(
278 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
279 wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
280 #else
281 int main(
282 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
283 char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
284 #endif
285 {
286 ESEDB_TEST_UNREFERENCED_PARAMETER( argc )
287 ESEDB_TEST_UNREFERENCED_PARAMETER( argv )
288
289 #if defined( __GNUC__ )
290
291 ESEDB_TEST_RUN(
292 "libesedb_data_definition_initialize",
293 esedb_test_data_definition_initialize );
294
295 ESEDB_TEST_RUN(
296 "libesedb_data_definition_free",
297 esedb_test_data_definition_free );
298
299 /* TODO: add tests for libesedb_data_definition_read_data */
300
301 /* TODO: add tests for libesedb_data_definition_read_record */
302
303 /* TODO: add tests for libesedb_data_definition_read_long_value */
304
305 /* TODO: add tests for libesedb_data_definition_read_long_value_segment */
306
307 #endif /* defined( __GNUC__ ) */
308
309 return( EXIT_SUCCESS );
310
311 on_error:
312 return( EXIT_FAILURE );
313 }
314
0 /*
1 * Library data_segment type test program
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <types.h>
24
25 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
26 #include <stdlib.h>
27 #endif
28
29 #include "esedb_test_libcerror.h"
30 #include "esedb_test_libesedb.h"
31 #include "esedb_test_macros.h"
32 #include "esedb_test_memory.h"
33 #include "esedb_test_unused.h"
34
35 #include "../libesedb/libesedb_data_segment.h"
36
37 #if defined( __GNUC__ )
38
39 /* Tests the libesedb_data_segment_initialize function
40 * Returns 1 if successful or 0 if not
41 */
42 int esedb_test_data_segment_initialize(
43 void )
44 {
45 libcerror_error_t *error = NULL;
46 libesedb_data_segment_t *data_segment = NULL;
47 int result = 0;
48
49 /* Test data_segment initialization
50 */
51 result = libesedb_data_segment_initialize(
52 &data_segment,
53 4096,
54 &error );
55
56 ESEDB_TEST_ASSERT_EQUAL_INT(
57 "result",
58 result,
59 1 );
60
61 ESEDB_TEST_ASSERT_IS_NOT_NULL(
62 "data_segment",
63 data_segment );
64
65 ESEDB_TEST_ASSERT_IS_NULL(
66 "error",
67 error );
68
69 result = libesedb_data_segment_free(
70 &data_segment,
71 &error );
72
73 ESEDB_TEST_ASSERT_EQUAL_INT(
74 "result",
75 result,
76 1 );
77
78 ESEDB_TEST_ASSERT_IS_NULL(
79 "data_segment",
80 data_segment );
81
82 ESEDB_TEST_ASSERT_IS_NULL(
83 "error",
84 error );
85
86 /* Test error cases
87 */
88 result = libesedb_data_segment_initialize(
89 NULL,
90 4096,
91 &error );
92
93 ESEDB_TEST_ASSERT_EQUAL_INT(
94 "result",
95 result,
96 -1 );
97
98 ESEDB_TEST_ASSERT_IS_NOT_NULL(
99 "error",
100 error );
101
102 libcerror_error_free(
103 &error );
104
105 data_segment = (libesedb_data_segment_t *) 0x12345678UL;
106
107 result = libesedb_data_segment_initialize(
108 &data_segment,
109 4096,
110 &error );
111
112 ESEDB_TEST_ASSERT_EQUAL_INT(
113 "result",
114 result,
115 -1 );
116
117 ESEDB_TEST_ASSERT_IS_NOT_NULL(
118 "error",
119 error );
120
121 libcerror_error_free(
122 &error );
123
124 data_segment = NULL;
125
126 result = libesedb_data_segment_initialize(
127 &data_segment,
128 (size_t) SSIZE_MAX + 1,
129 &error );
130
131 ESEDB_TEST_ASSERT_EQUAL_INT(
132 "result",
133 result,
134 -1 );
135
136 ESEDB_TEST_ASSERT_IS_NOT_NULL(
137 "error",
138 error );
139
140 libcerror_error_free(
141 &error );
142
143 #if defined( HAVE_ESEDB_TEST_MEMORY )
144
145 /* Test libesedb_data_segment_initialize with malloc failing
146 */
147 esedb_test_malloc_attempts_before_fail = 0;
148
149 result = libesedb_data_segment_initialize(
150 &data_segment,
151 4096,
152 &error );
153
154 if( esedb_test_malloc_attempts_before_fail != -1 )
155 {
156 esedb_test_malloc_attempts_before_fail = -1;
157
158 if( data_segment != NULL )
159 {
160 libesedb_data_segment_free(
161 &data_segment,
162 NULL );
163 }
164 }
165 else
166 {
167 ESEDB_TEST_ASSERT_EQUAL_INT(
168 "result",
169 result,
170 -1 );
171
172 ESEDB_TEST_ASSERT_IS_NULL(
173 "data_segment",
174 data_segment );
175
176 ESEDB_TEST_ASSERT_IS_NOT_NULL(
177 "error",
178 error );
179
180 libcerror_error_free(
181 &error );
182 }
183 /* Test libesedb_data_segment_initialize with memset failing
184 */
185 esedb_test_memset_attempts_before_fail = 0;
186
187 result = libesedb_data_segment_initialize(
188 &data_segment,
189 4096,
190 &error );
191
192 if( esedb_test_memset_attempts_before_fail != -1 )
193 {
194 esedb_test_memset_attempts_before_fail = -1;
195
196 if( data_segment != NULL )
197 {
198 libesedb_data_segment_free(
199 &data_segment,
200 NULL );
201 }
202 }
203 else
204 {
205 ESEDB_TEST_ASSERT_EQUAL_INT(
206 "result",
207 result,
208 -1 );
209
210 ESEDB_TEST_ASSERT_IS_NULL(
211 "data_segment",
212 data_segment );
213
214 ESEDB_TEST_ASSERT_IS_NOT_NULL(
215 "error",
216 error );
217
218 libcerror_error_free(
219 &error );
220 }
221 #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */
222
223 return( 1 );
224
225 on_error:
226 if( error != NULL )
227 {
228 libcerror_error_free(
229 &error );
230 }
231 if( data_segment != NULL )
232 {
233 libesedb_data_segment_free(
234 &data_segment,
235 NULL );
236 }
237 return( 0 );
238 }
239
240 /* Tests the libesedb_data_segment_free function
241 * Returns 1 if successful or 0 if not
242 */
243 int esedb_test_data_segment_free(
244 void )
245 {
246 libcerror_error_t *error = NULL;
247 int result = 0;
248
249 /* Test error cases
250 */
251 result = libesedb_data_segment_free(
252 NULL,
253 &error );
254
255 ESEDB_TEST_ASSERT_EQUAL_INT(
256 "result",
257 result,
258 -1 );
259
260 ESEDB_TEST_ASSERT_IS_NOT_NULL(
261 "error",
262 error );
263
264 libcerror_error_free(
265 &error );
266
267 return( 1 );
268
269 on_error:
270 if( error != NULL )
271 {
272 libcerror_error_free(
273 &error );
274 }
275 return( 0 );
276 }
277
278 #endif /* defined( __GNUC__ ) */
279
280 /* The main program
281 */
282 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
283 int wmain(
284 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
285 wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
286 #else
287 int main(
288 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
289 char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
290 #endif
291 {
292 ESEDB_TEST_UNREFERENCED_PARAMETER( argc )
293 ESEDB_TEST_UNREFERENCED_PARAMETER( argv )
294
295 #if defined( __GNUC__ )
296
297 ESEDB_TEST_RUN(
298 "libesedb_data_segment_initialize",
299 esedb_test_data_segment_initialize );
300
301 ESEDB_TEST_RUN(
302 "libesedb_data_segment_free",
303 esedb_test_data_segment_free );
304
305 #endif /* defined( __GNUC__ ) */
306
307 /* TODO: add tests for libesedb_data_segment_get_data_size */
308
309 /* TODO: add tests for libesedb_data_segment_get_data */
310
311 /* TODO: add tests for libesedb_data_segment_read_element_data */
312
313
314 return( EXIT_SUCCESS );
315
316 on_error:
317 return( EXIT_FAILURE );
318 }
319
0 /*
1 * Library database type test program
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <types.h>
24
25 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
26 #include <stdlib.h>
27 #endif
28
29 #include "esedb_test_libcerror.h"
30 #include "esedb_test_libesedb.h"
31 #include "esedb_test_macros.h"
32 #include "esedb_test_memory.h"
33 #include "esedb_test_unused.h"
34
35 #include "../libesedb/libesedb_database.h"
36
37 #if defined( __GNUC__ )
38
39 /* Tests the libesedb_database_initialize function
40 * Returns 1 if successful or 0 if not
41 */
42 int esedb_test_database_initialize(
43 void )
44 {
45 libcerror_error_t *error = NULL;
46 libesedb_database_t *database = NULL;
47 int result = 0;
48
49 #if defined( HAVE_ESEDB_TEST_MEMORY )
50 int number_of_malloc_fail_tests = 1;
51 int number_of_memset_fail_tests = 1;
52 int test_number = 0;
53 #endif
54
55 /* Test regular cases
56 */
57 result = libesedb_database_initialize(
58 &database,
59 &error );
60
61 ESEDB_TEST_ASSERT_EQUAL_INT(
62 "result",
63 result,
64 1 );
65
66 ESEDB_TEST_ASSERT_IS_NOT_NULL(
67 "database",
68 database );
69
70 ESEDB_TEST_ASSERT_IS_NULL(
71 "error",
72 error );
73
74 result = libesedb_database_free(
75 &database,
76 &error );
77
78 ESEDB_TEST_ASSERT_EQUAL_INT(
79 "result",
80 result,
81 1 );
82
83 ESEDB_TEST_ASSERT_IS_NULL(
84 "database",
85 database );
86
87 ESEDB_TEST_ASSERT_IS_NULL(
88 "error",
89 error );
90
91 /* Test error cases
92 */
93 result = libesedb_database_initialize(
94 NULL,
95 &error );
96
97 ESEDB_TEST_ASSERT_EQUAL_INT(
98 "result",
99 result,
100 -1 );
101
102 ESEDB_TEST_ASSERT_IS_NOT_NULL(
103 "error",
104 error );
105
106 libcerror_error_free(
107 &error );
108
109 database = (libesedb_database_t *) 0x12345678UL;
110
111 result = libesedb_database_initialize(
112 &database,
113 &error );
114
115 ESEDB_TEST_ASSERT_EQUAL_INT(
116 "result",
117 result,
118 -1 );
119
120 ESEDB_TEST_ASSERT_IS_NOT_NULL(
121 "error",
122 error );
123
124 libcerror_error_free(
125 &error );
126
127 database = NULL;
128
129 #if defined( HAVE_ESEDB_TEST_MEMORY )
130
131 for( test_number = 0;
132 test_number < number_of_malloc_fail_tests;
133 test_number++ )
134 {
135 /* Test libesedb_database_initialize with malloc failing
136 */
137 esedb_test_malloc_attempts_before_fail = test_number;
138
139 result = libesedb_database_initialize(
140 &database,
141 &error );
142
143 if( esedb_test_malloc_attempts_before_fail != -1 )
144 {
145 esedb_test_malloc_attempts_before_fail = -1;
146
147 if( database != NULL )
148 {
149 libesedb_database_free(
150 &database,
151 NULL );
152 }
153 }
154 else
155 {
156 ESEDB_TEST_ASSERT_EQUAL_INT(
157 "result",
158 result,
159 -1 );
160
161 ESEDB_TEST_ASSERT_IS_NULL(
162 "database",
163 database );
164
165 ESEDB_TEST_ASSERT_IS_NOT_NULL(
166 "error",
167 error );
168
169 libcerror_error_free(
170 &error );
171 }
172 }
173 for( test_number = 0;
174 test_number < number_of_memset_fail_tests;
175 test_number++ )
176 {
177 /* Test libesedb_database_initialize with memset failing
178 */
179 esedb_test_memset_attempts_before_fail = test_number;
180
181 result = libesedb_database_initialize(
182 &database,
183 &error );
184
185 if( esedb_test_memset_attempts_before_fail != -1 )
186 {
187 esedb_test_memset_attempts_before_fail = -1;
188
189 if( database != NULL )
190 {
191 libesedb_database_free(
192 &database,
193 NULL );
194 }
195 }
196 else
197 {
198 ESEDB_TEST_ASSERT_EQUAL_INT(
199 "result",
200 result,
201 -1 );
202
203 ESEDB_TEST_ASSERT_IS_NULL(
204 "database",
205 database );
206
207 ESEDB_TEST_ASSERT_IS_NOT_NULL(
208 "error",
209 error );
210
211 libcerror_error_free(
212 &error );
213 }
214 }
215 #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */
216
217 return( 1 );
218
219 on_error:
220 if( error != NULL )
221 {
222 libcerror_error_free(
223 &error );
224 }
225 if( database != NULL )
226 {
227 libesedb_database_free(
228 &database,
229 NULL );
230 }
231 return( 0 );
232 }
233
234 /* Tests the libesedb_database_free function
235 * Returns 1 if successful or 0 if not
236 */
237 int esedb_test_database_free(
238 void )
239 {
240 libcerror_error_t *error = NULL;
241 int result = 0;
242
243 /* Test error cases
244 */
245 result = libesedb_database_free(
246 NULL,
247 &error );
248
249 ESEDB_TEST_ASSERT_EQUAL_INT(
250 "result",
251 result,
252 -1 );
253
254 ESEDB_TEST_ASSERT_IS_NOT_NULL(
255 "error",
256 error );
257
258 libcerror_error_free(
259 &error );
260
261 return( 1 );
262
263 on_error:
264 if( error != NULL )
265 {
266 libcerror_error_free(
267 &error );
268 }
269 return( 0 );
270 }
271
272 #endif /* defined( __GNUC__ ) */
273
274 /* The main program
275 */
276 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
277 int wmain(
278 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
279 wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
280 #else
281 int main(
282 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
283 char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
284 #endif
285 {
286 ESEDB_TEST_UNREFERENCED_PARAMETER( argc )
287 ESEDB_TEST_UNREFERENCED_PARAMETER( argv )
288
289 #if defined( __GNUC__ )
290
291 ESEDB_TEST_RUN(
292 "libesedb_database_initialize",
293 esedb_test_database_initialize );
294
295 ESEDB_TEST_RUN(
296 "libesedb_database_free",
297 esedb_test_database_free );
298
299 /* TODO: add tests for libesedb_database_read */
300
301 #endif /* defined( __GNUC__ ) */
302
303 return( EXIT_SUCCESS );
304
305 on_error:
306 return( EXIT_FAILURE );
307 }
308
0 /*
1 * Library error functions test program
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <types.h>
24
25 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
26 #include <stdlib.h>
27 #endif
28
29 #include "esedb_test_libcerror.h"
30 #include "esedb_test_libesedb.h"
31 #include "esedb_test_macros.h"
32 #include "esedb_test_unused.h"
33
34 /* Tests the libesedb_error_free function
35 * Returns 1 if successful or 0 if not
36 */
37 int esedb_test_error_free(
38 void )
39 {
40 /* Test invocation of function only
41 */
42 libesedb_error_free(
43 NULL );
44
45 return( 1 );
46 }
47
48 /* Tests the libesedb_error_fprint function
49 * Returns 1 if successful or 0 if not
50 */
51 int esedb_test_error_fprint(
52 void )
53 {
54 /* Test invocation of function only
55 */
56 libesedb_error_fprint(
57 NULL,
58 NULL );
59
60 return( 1 );
61 }
62
63 /* Tests the libesedb_error_sprint function
64 * Returns 1 if successful or 0 if not
65 */
66 int esedb_test_error_sprint(
67 void )
68 {
69 /* Test invocation of function only
70 */
71 libesedb_error_sprint(
72 NULL,
73 NULL,
74 0 );
75
76 return( 1 );
77 }
78
79 /* Tests the libesedb_error_backtrace_fprint function
80 * Returns 1 if successful or 0 if not
81 */
82 int esedb_test_error_backtrace_fprint(
83 void )
84 {
85 /* Test invocation of function only
86 */
87 libesedb_error_backtrace_fprint(
88 NULL,
89 NULL );
90
91 return( 1 );
92 }
93
94 /* Tests the libesedb_error_backtrace_sprint function
95 * Returns 1 if successful or 0 if not
96 */
97 int esedb_test_error_backtrace_sprint(
98 void )
99 {
100 /* Test invocation of function only
101 */
102 libesedb_error_backtrace_sprint(
103 NULL,
104 NULL,
105 0 );
106
107 return( 1 );
108 }
109
110 /* The main program
111 */
112 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
113 int wmain(
114 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
115 wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
116 #else
117 int main(
118 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
119 char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
120 #endif
121 {
122 ESEDB_TEST_UNREFERENCED_PARAMETER( argc )
123 ESEDB_TEST_UNREFERENCED_PARAMETER( argv )
124
125 ESEDB_TEST_RUN(
126 "libesedb_error_free",
127 esedb_test_error_free );
128
129 ESEDB_TEST_RUN(
130 "libesedb_error_fprint",
131 esedb_test_error_fprint );
132
133 ESEDB_TEST_RUN(
134 "libesedb_error_sprint",
135 esedb_test_error_sprint );
136
137 ESEDB_TEST_RUN(
138 "libesedb_error_backtrace_fprint",
139 esedb_test_error_backtrace_fprint );
140
141 ESEDB_TEST_RUN(
142 "libesedb_error_backtrace_sprint",
143 esedb_test_error_backtrace_sprint );
144
145 return( EXIT_SUCCESS );
146
147 on_error:
148 return( EXIT_FAILURE );
149 }
150
0 /*
1 * Library file type test program
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <narrow_string.h>
24 #include <system_string.h>
25 #include <types.h>
26 #include <wide_string.h>
27
28 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
29 #include <stdlib.h>
30 #endif
31
32 #include "esedb_test_getopt.h"
33 #include "esedb_test_libcerror.h"
34 #include "esedb_test_libclocale.h"
35 #include "esedb_test_libesedb.h"
36 #include "esedb_test_libuna.h"
37 #include "esedb_test_macros.h"
38 #include "esedb_test_memory.h"
39
40 #if defined( HAVE_WIDE_SYSTEM_CHARACTER ) && SIZEOF_WCHAR_T != 2 && SIZEOF_WCHAR_T != 4
41 #error Unsupported size of wchar_t
42 #endif
43
44 /* Define to make esedb_test_file generate verbose output
45 #define ESEDB_TEST_FILE_VERBOSE
46 */
47
48 /* Retrieves source as a narrow string
49 * Returns 1 if successful or -1 on error
50 */
51 int esedb_test_file_get_narrow_source(
52 const system_character_t *source,
53 char *narrow_string,
54 size_t narrow_string_size,
55 libcerror_error_t **error )
56 {
57 static char *function = "esedb_test_file_get_narrow_source";
58 size_t narrow_source_size = 0;
59 size_t source_length = 0;
60
61 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
62 int result = 0;
63 #endif
64
65 if( source == NULL )
66 {
67 libcerror_error_set(
68 error,
69 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
70 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
71 "%s: invalid source.",
72 function );
73
74 return( -1 );
75 }
76 if( narrow_string == NULL )
77 {
78 libcerror_error_set(
79 error,
80 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
81 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
82 "%s: invalid narrow string.",
83 function );
84
85 return( -1 );
86 }
87 if( narrow_string_size > (size_t) SSIZE_MAX )
88 {
89 libcerror_error_set(
90 error,
91 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
92 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
93 "%s: invalid narrow string size value exceeds maximum.",
94 function );
95
96 return( -1 );
97 }
98 source_length = system_string_length(
99 source );
100
101 if( source_length > (size_t) ( SSIZE_MAX - 1 ) )
102 {
103 libcerror_error_set(
104 error,
105 LIBCERROR_ERROR_DOMAIN_RUNTIME,
106 LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,
107 "%s: invalid source length value out of bounds.",
108 function );
109
110 return( -1 );
111 }
112 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
113 if( libclocale_codepage == 0 )
114 {
115 #if SIZEOF_WCHAR_T == 4
116 result = libuna_utf8_string_size_from_utf32(
117 (libuna_utf32_character_t *) source,
118 source_length + 1,
119 &narrow_source_size,
120 error );
121 #elif SIZEOF_WCHAR_T == 2
122 result = libuna_utf8_string_size_from_utf16(
123 (libuna_utf16_character_t *) source,
124 source_length + 1,
125 &narrow_source_size,
126 error );
127 #endif
128 }
129 else
130 {
131 #if SIZEOF_WCHAR_T == 4
132 result = libuna_byte_stream_size_from_utf32(
133 (libuna_utf32_character_t *) source,
134 source_length + 1,
135 libclocale_codepage,
136 &narrow_source_size,
137 error );
138 #elif SIZEOF_WCHAR_T == 2
139 result = libuna_byte_stream_size_from_utf16(
140 (libuna_utf16_character_t *) source,
141 source_length + 1,
142 libclocale_codepage,
143 &narrow_source_size,
144 error );
145 #endif
146 }
147 if( result != 1 )
148 {
149 libcerror_error_set(
150 error,
151 LIBCERROR_ERROR_DOMAIN_CONVERSION,
152 LIBCERROR_CONVERSION_ERROR_GENERIC,
153 "%s: unable to determine narrow string size.",
154 function );
155
156 return( -1 );
157 }
158 #else
159 narrow_source_size = source_length + 1;
160
161 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
162
163 if( narrow_string_size < narrow_source_size )
164 {
165 libcerror_error_set(
166 error,
167 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
168 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
169 "%s: narrow string too small.",
170 function );
171
172 return( -1 );
173 }
174 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
175 if( libclocale_codepage == 0 )
176 {
177 #if SIZEOF_WCHAR_T == 4
178 result = libuna_utf8_string_copy_from_utf32(
179 (libuna_utf8_character_t *) narrow_string,
180 narrow_string_size,
181 (libuna_utf32_character_t *) source,
182 source_length + 1,
183 error );
184 #elif SIZEOF_WCHAR_T == 2
185 result = libuna_utf8_string_copy_from_utf16(
186 (libuna_utf8_character_t *) narrow_string,
187 narrow_string_size,
188 (libuna_utf16_character_t *) source,
189 source_length + 1,
190 error );
191 #endif
192 }
193 else
194 {
195 #if SIZEOF_WCHAR_T == 4
196 result = libuna_byte_stream_copy_from_utf32(
197 (uint8_t *) narrow_string,
198 narrow_string_size,
199 libclocale_codepage,
200 (libuna_utf32_character_t *) source,
201 source_length + 1,
202 error );
203 #elif SIZEOF_WCHAR_T == 2
204 result = libuna_byte_stream_copy_from_utf16(
205 (uint8_t *) narrow_string,
206 narrow_string_size,
207 libclocale_codepage,
208 (libuna_utf16_character_t *) source,
209 source_length + 1,
210 error );
211 #endif
212 }
213 if( result != 1 )
214 {
215 libcerror_error_set(
216 error,
217 LIBCERROR_ERROR_DOMAIN_CONVERSION,
218 LIBCERROR_CONVERSION_ERROR_GENERIC,
219 "%s: unable to set narrow string.",
220 function );
221
222 return( -1 );
223 }
224 #else
225 if( system_string_copy(
226 narrow_string,
227 source,
228 source_length ) == NULL )
229 {
230 libcerror_error_set(
231 error,
232 LIBCERROR_ERROR_DOMAIN_MEMORY,
233 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
234 "%s: unable to set narrow string.",
235 function );
236
237 return( -1 );
238 }
239 narrow_string[ source_length ] = 0;
240
241 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
242
243 return( 1 );
244 }
245
246 #if defined( HAVE_WIDE_CHARACTER_TYPE )
247
248 /* Retrieves source as a wide string
249 * Returns 1 if successful or -1 on error
250 */
251 int esedb_test_file_get_wide_source(
252 const system_character_t *source,
253 wchar_t *wide_string,
254 size_t wide_string_size,
255 libcerror_error_t **error )
256 {
257 static char *function = "esedb_test_file_get_wide_source";
258 size_t source_length = 0;
259 size_t wide_source_size = 0;
260
261 #if !defined( HAVE_WIDE_SYSTEM_CHARACTER )
262 int result = 0;
263 #endif
264
265 if( source == NULL )
266 {
267 libcerror_error_set(
268 error,
269 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
270 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
271 "%s: invalid source.",
272 function );
273
274 return( -1 );
275 }
276 if( wide_string == NULL )
277 {
278 libcerror_error_set(
279 error,
280 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
281 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
282 "%s: invalid wide string.",
283 function );
284
285 return( -1 );
286 }
287 if( wide_string_size > (size_t) SSIZE_MAX )
288 {
289 libcerror_error_set(
290 error,
291 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
292 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
293 "%s: invalid wide string size value exceeds maximum.",
294 function );
295
296 return( -1 );
297 }
298 source_length = system_string_length(
299 source );
300
301 if( source_length > (size_t) ( SSIZE_MAX - 1 ) )
302 {
303 libcerror_error_set(
304 error,
305 LIBCERROR_ERROR_DOMAIN_RUNTIME,
306 LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,
307 "%s: invalid source length value out of bounds.",
308 function );
309
310 return( -1 );
311 }
312 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
313 wide_source_size = source_length + 1;
314 #else
315 if( libclocale_codepage == 0 )
316 {
317 #if SIZEOF_WCHAR_T == 4
318 result = libuna_utf32_string_size_from_utf8(
319 (libuna_utf8_character_t *) source,
320 source_length + 1,
321 &wide_source_size,
322 error );
323 #elif SIZEOF_WCHAR_T == 2
324 result = libuna_utf16_string_size_from_utf8(
325 (libuna_utf8_character_t *) source,
326 source_length + 1,
327 &wide_source_size,
328 error );
329 #endif
330 }
331 else
332 {
333 #if SIZEOF_WCHAR_T == 4
334 result = libuna_utf32_string_size_from_byte_stream(
335 (uint8_t *) source,
336 source_length + 1,
337 libclocale_codepage,
338 &wide_source_size,
339 error );
340 #elif SIZEOF_WCHAR_T == 2
341 result = libuna_utf16_string_size_from_byte_stream(
342 (uint8_t *) source,
343 source_length + 1,
344 libclocale_codepage,
345 &wide_source_size,
346 error );
347 #endif
348 }
349 if( result != 1 )
350 {
351 libcerror_error_set(
352 error,
353 LIBCERROR_ERROR_DOMAIN_CONVERSION,
354 LIBCERROR_CONVERSION_ERROR_GENERIC,
355 "%s: unable to determine wide string size.",
356 function );
357
358 return( -1 );
359 }
360
361 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
362
363 if( wide_string_size < wide_source_size )
364 {
365 libcerror_error_set(
366 error,
367 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
368 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
369 "%s: wide string too small.",
370 function );
371
372 return( -1 );
373 }
374 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
375 if( system_string_copy(
376 wide_string,
377 source,
378 source_length ) == NULL )
379 {
380 libcerror_error_set(
381 error,
382 LIBCERROR_ERROR_DOMAIN_MEMORY,
383 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
384 "%s: unable to set wide string.",
385 function );
386
387 return( -1 );
388 }
389 wide_string[ source_length ] = 0;
390 #else
391 if( libclocale_codepage == 0 )
392 {
393 #if SIZEOF_WCHAR_T == 4
394 result = libuna_utf32_string_copy_from_utf8(
395 (libuna_utf32_character_t *) wide_string,
396 wide_string_size,
397 (libuna_utf8_character_t *) source,
398 source_length + 1,
399 error );
400 #elif SIZEOF_WCHAR_T == 2
401 result = libuna_utf16_string_copy_from_utf8(
402 (libuna_utf16_character_t *) wide_string,
403 wide_string_size,
404 (libuna_utf8_character_t *) source,
405 source_length + 1,
406 error );
407 #endif
408 }
409 else
410 {
411 #if SIZEOF_WCHAR_T == 4
412 result = libuna_utf32_string_copy_from_byte_stream(
413 (libuna_utf32_character_t *) wide_string,
414 wide_string_size,
415 (uint8_t *) source,
416 source_length + 1,
417 libclocale_codepage,
418 error );
419 #elif SIZEOF_WCHAR_T == 2
420 result = libuna_utf16_string_copy_from_byte_stream(
421 (libuna_utf16_character_t *) wide_string,
422 wide_string_size,
423 (uint8_t *) source,
424 source_length + 1,
425 libclocale_codepage,
426 error );
427 #endif
428 }
429 if( result != 1 )
430 {
431 libcerror_error_set(
432 error,
433 LIBCERROR_ERROR_DOMAIN_CONVERSION,
434 LIBCERROR_CONVERSION_ERROR_GENERIC,
435 "%s: unable to set wide string.",
436 function );
437
438 return( -1 );
439 }
440
441 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
442
443 return( 1 );
444 }
445
446 #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */
447
448 /* Creates and opens a source file
449 * Returns 1 if successful or -1 on error
450 */
451 int esedb_test_file_open_source(
452 libesedb_file_t **file,
453 const system_character_t *source,
454 libcerror_error_t **error )
455 {
456 static char *function = "esedb_test_file_open_source";
457 int result = 0;
458
459 if( file == NULL )
460 {
461 libcerror_error_set(
462 error,
463 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
464 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
465 "%s: invalid file.",
466 function );
467
468 return( -1 );
469 }
470 if( source == NULL )
471 {
472 libcerror_error_set(
473 error,
474 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
475 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
476 "%s: invalid source.",
477 function );
478
479 return( -1 );
480 }
481 if( libesedb_file_initialize(
482 file,
483 error ) != 1 )
484 {
485 libcerror_error_set(
486 error,
487 LIBCERROR_ERROR_DOMAIN_RUNTIME,
488 LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,
489 "%s: unable to initialize file.",
490 function );
491
492 goto on_error;
493 }
494 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
495 result = libesedb_file_open_wide(
496 *file,
497 source,
498 LIBESEDB_OPEN_READ,
499 error );
500 #else
501 result = libesedb_file_open(
502 *file,
503 source,
504 LIBESEDB_OPEN_READ,
505 error );
506 #endif
507 if( result != 1 )
508 {
509 libcerror_error_set(
510 error,
511 LIBCERROR_ERROR_DOMAIN_IO,
512 LIBCERROR_IO_ERROR_OPEN_FAILED,
513 "%s: unable to open file.",
514 function );
515
516 goto on_error;
517 }
518 return( 1 );
519
520 on_error:
521 if( *file != NULL )
522 {
523 libesedb_file_free(
524 file,
525 NULL );
526 }
527 return( -1 );
528 }
529
530 /* Closes and frees a source file
531 * Returns 1 if successful or -1 on error
532 */
533 int esedb_test_file_close_source(
534 libesedb_file_t **file,
535 libcerror_error_t **error )
536 {
537 static char *function = "esedb_test_file_close_source";
538 int result = 0;
539
540 if( file == NULL )
541 {
542 libcerror_error_set(
543 error,
544 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
545 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
546 "%s: invalid file.",
547 function );
548
549 return( -1 );
550 }
551 if( libesedb_file_close(
552 *file,
553 error ) != 0 )
554 {
555 libcerror_error_set(
556 error,
557 LIBCERROR_ERROR_DOMAIN_IO,
558 LIBCERROR_IO_ERROR_CLOSE_FAILED,
559 "%s: unable to close file.",
560 function );
561
562 result = -1;
563 }
564 if( libesedb_file_free(
565 file,
566 error ) != 1 )
567 {
568 libcerror_error_set(
569 error,
570 LIBCERROR_ERROR_DOMAIN_RUNTIME,
571 LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,
572 "%s: unable to free file.",
573 function );
574
575 result = -1;
576 }
577 return( result );
578 }
579
580 /* Tests the libesedb_file_initialize function
581 * Returns 1 if successful or 0 if not
582 */
583 int esedb_test_file_initialize(
584 void )
585 {
586 libcerror_error_t *error = NULL;
587 libesedb_file_t *file = NULL;
588 int result = 0;
589
590 #if defined( HAVE_ESEDB_TEST_MEMORY )
591 int number_of_malloc_fail_tests = 1;
592 int number_of_memset_fail_tests = 1;
593 int test_number = 0;
594 #endif
595
596 /* Test regular cases
597 */
598 result = libesedb_file_initialize(
599 &file,
600 &error );
601
602 ESEDB_TEST_ASSERT_EQUAL_INT(
603 "result",
604 result,
605 1 );
606
607 ESEDB_TEST_ASSERT_IS_NOT_NULL(
608 "file",
609 file );
610
611 ESEDB_TEST_ASSERT_IS_NULL(
612 "error",
613 error );
614
615 result = libesedb_file_free(
616 &file,
617 &error );
618
619 ESEDB_TEST_ASSERT_EQUAL_INT(
620 "result",
621 result,
622 1 );
623
624 ESEDB_TEST_ASSERT_IS_NULL(
625 "file",
626 file );
627
628 ESEDB_TEST_ASSERT_IS_NULL(
629 "error",
630 error );
631
632 /* Test error cases
633 */
634 result = libesedb_file_initialize(
635 NULL,
636 &error );
637
638 ESEDB_TEST_ASSERT_EQUAL_INT(
639 "result",
640 result,
641 -1 );
642
643 ESEDB_TEST_ASSERT_IS_NOT_NULL(
644 "error",
645 error );
646
647 libcerror_error_free(
648 &error );
649
650 file = (libesedb_file_t *) 0x12345678UL;
651
652 result = libesedb_file_initialize(
653 &file,
654 &error );
655
656 ESEDB_TEST_ASSERT_EQUAL_INT(
657 "result",
658 result,
659 -1 );
660
661 ESEDB_TEST_ASSERT_IS_NOT_NULL(
662 "error",
663 error );
664
665 libcerror_error_free(
666 &error );
667
668 file = NULL;
669
670 #if defined( HAVE_ESEDB_TEST_MEMORY )
671
672 for( test_number = 0;
673 test_number < number_of_malloc_fail_tests;
674 test_number++ )
675 {
676 /* Test libesedb_file_initialize with malloc failing
677 */
678 esedb_test_malloc_attempts_before_fail = test_number;
679
680 result = libesedb_file_initialize(
681 &file,
682 &error );
683
684 if( esedb_test_malloc_attempts_before_fail != -1 )
685 {
686 esedb_test_malloc_attempts_before_fail = -1;
687
688 if( file != NULL )
689 {
690 libesedb_file_free(
691 &file,
692 NULL );
693 }
694 }
695 else
696 {
697 ESEDB_TEST_ASSERT_EQUAL_INT(
698 "result",
699 result,
700 -1 );
701
702 ESEDB_TEST_ASSERT_IS_NULL(
703 "file",
704 file );
705
706 ESEDB_TEST_ASSERT_IS_NOT_NULL(
707 "error",
708 error );
709
710 libcerror_error_free(
711 &error );
712 }
713 }
714 for( test_number = 0;
715 test_number < number_of_memset_fail_tests;
716 test_number++ )
717 {
718 /* Test libesedb_file_initialize with memset failing
719 */
720 esedb_test_memset_attempts_before_fail = test_number;
721
722 result = libesedb_file_initialize(
723 &file,
724 &error );
725
726 if( esedb_test_memset_attempts_before_fail != -1 )
727 {
728 esedb_test_memset_attempts_before_fail = -1;
729
730 if( file != NULL )
731 {
732 libesedb_file_free(
733 &file,
734 NULL );
735 }
736 }
737 else
738 {
739 ESEDB_TEST_ASSERT_EQUAL_INT(
740 "result",
741 result,
742 -1 );
743
744 ESEDB_TEST_ASSERT_IS_NULL(
745 "file",
746 file );
747
748 ESEDB_TEST_ASSERT_IS_NOT_NULL(
749 "error",
750 error );
751
752 libcerror_error_free(
753 &error );
754 }
755 }
756 #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */
757
758 return( 1 );
759
760 on_error:
761 if( error != NULL )
762 {
763 libcerror_error_free(
764 &error );
765 }
766 if( file != NULL )
767 {
768 libesedb_file_free(
769 &file,
770 NULL );
771 }
772 return( 0 );
773 }
774
775 /* Tests the libesedb_file_free function
776 * Returns 1 if successful or 0 if not
777 */
778 int esedb_test_file_free(
779 void )
780 {
781 libcerror_error_t *error = NULL;
782 int result = 0;
783
784 /* Test error cases
785 */
786 result = libesedb_file_free(
787 NULL,
788 &error );
789
790 ESEDB_TEST_ASSERT_EQUAL_INT(
791 "result",
792 result,
793 -1 );
794
795 ESEDB_TEST_ASSERT_IS_NOT_NULL(
796 "error",
797 error );
798
799 libcerror_error_free(
800 &error );
801
802 return( 1 );
803
804 on_error:
805 if( error != NULL )
806 {
807 libcerror_error_free(
808 &error );
809 }
810 return( 0 );
811 }
812
813 /* Tests the libesedb_file_open function
814 * Returns 1 if successful or 0 if not
815 */
816 int esedb_test_file_open(
817 const system_character_t *source )
818 {
819 char narrow_source[ 256 ];
820
821 libcerror_error_t *error = NULL;
822 libesedb_file_t *file = NULL;
823 int result = 0;
824
825 /* Initialize test
826 */
827 result = esedb_test_file_get_narrow_source(
828 source,
829 narrow_source,
830 256,
831 &error );
832
833 ESEDB_TEST_ASSERT_EQUAL_INT(
834 "result",
835 result,
836 1 );
837
838 ESEDB_TEST_ASSERT_IS_NULL(
839 "error",
840 error );
841
842 result = libesedb_file_initialize(
843 &file,
844 &error );
845
846 ESEDB_TEST_ASSERT_EQUAL_INT(
847 "result",
848 result,
849 1 );
850
851 ESEDB_TEST_ASSERT_IS_NOT_NULL(
852 "file",
853 file );
854
855 ESEDB_TEST_ASSERT_IS_NULL(
856 "error",
857 error );
858
859 /* Test open
860 */
861 result = libesedb_file_open(
862 file,
863 narrow_source,
864 LIBESEDB_OPEN_READ,
865 &error );
866
867 ESEDB_TEST_ASSERT_EQUAL_INT(
868 "result",
869 result,
870 1 );
871
872 ESEDB_TEST_ASSERT_IS_NULL(
873 "error",
874 error );
875
876 /* Test error cases
877 */
878 result = libesedb_file_open(
879 file,
880 narrow_source,
881 LIBESEDB_OPEN_READ,
882 &error );
883
884 ESEDB_TEST_ASSERT_EQUAL_INT(
885 "result",
886 result,
887 -1 );
888
889 ESEDB_TEST_ASSERT_IS_NOT_NULL(
890 "error",
891 error );
892
893 libcerror_error_free(
894 &error );
895
896 /* Clean up
897 */
898 result = libesedb_file_free(
899 &file,
900 &error );
901
902 ESEDB_TEST_ASSERT_EQUAL_INT(
903 "result",
904 result,
905 1 );
906
907 ESEDB_TEST_ASSERT_IS_NULL(
908 "file",
909 file );
910
911 ESEDB_TEST_ASSERT_IS_NULL(
912 "error",
913 error );
914
915 return( 1 );
916
917 on_error:
918 if( error != NULL )
919 {
920 libcerror_error_free(
921 &error );
922 }
923 if( file != NULL )
924 {
925 libesedb_file_free(
926 &file,
927 NULL );
928 }
929 return( 0 );
930 }
931
932 #if defined( HAVE_WIDE_CHARACTER_TYPE )
933
934 /* Tests the libesedb_file_open_wide function
935 * Returns 1 if successful or 0 if not
936 */
937 int esedb_test_file_open_wide(
938 const system_character_t *source )
939 {
940 wchar_t wide_source[ 256 ];
941
942 libcerror_error_t *error = NULL;
943 libesedb_file_t *file = NULL;
944 int result = 0;
945
946 /* Initialize test
947 */
948 result = esedb_test_file_get_wide_source(
949 source,
950 wide_source,
951 256,
952 &error );
953
954 ESEDB_TEST_ASSERT_EQUAL_INT(
955 "result",
956 result,
957 1 );
958
959 ESEDB_TEST_ASSERT_IS_NULL(
960 "error",
961 error );
962
963 result = libesedb_file_initialize(
964 &file,
965 &error );
966
967 ESEDB_TEST_ASSERT_EQUAL_INT(
968 "result",
969 result,
970 1 );
971
972 ESEDB_TEST_ASSERT_IS_NOT_NULL(
973 "file",
974 file );
975
976 ESEDB_TEST_ASSERT_IS_NULL(
977 "error",
978 error );
979
980 /* Test open
981 */
982 result = libesedb_file_open_wide(
983 file,
984 wide_source,
985 LIBESEDB_OPEN_READ,
986 &error );
987
988 ESEDB_TEST_ASSERT_EQUAL_INT(
989 "result",
990 result,
991 1 );
992
993 ESEDB_TEST_ASSERT_IS_NULL(
994 "error",
995 error );
996
997 /* Test error cases
998 */
999 result = libesedb_file_open_wide(
1000 file,
1001 wide_source,
1002 LIBESEDB_OPEN_READ,
1003 &error );
1004
1005 ESEDB_TEST_ASSERT_EQUAL_INT(
1006 "result",
1007 result,
1008 -1 );
1009
1010 ESEDB_TEST_ASSERT_IS_NOT_NULL(
1011 "error",
1012 error );
1013
1014 libcerror_error_free(
1015 &error );
1016
1017 /* Clean up
1018 */
1019 result = libesedb_file_free(
1020 &file,
1021 &error );
1022
1023 ESEDB_TEST_ASSERT_EQUAL_INT(
1024 "result",
1025 result,
1026 1 );
1027
1028 ESEDB_TEST_ASSERT_IS_NULL(
1029 "file",
1030 file );
1031
1032 ESEDB_TEST_ASSERT_IS_NULL(
1033 "error",
1034 error );
1035
1036 return( 1 );
1037
1038 on_error:
1039 if( error != NULL )
1040 {
1041 libcerror_error_free(
1042 &error );
1043 }
1044 if( file != NULL )
1045 {
1046 libesedb_file_free(
1047 &file,
1048 NULL );
1049 }
1050 return( 0 );
1051 }
1052
1053 #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */
1054
1055 /* Tests the libesedb_file_close function
1056 * Returns 1 if successful or 0 if not
1057 */
1058 int esedb_test_file_close(
1059 void )
1060 {
1061 libcerror_error_t *error = NULL;
1062 int result = 0;
1063
1064 /* Test error cases
1065 */
1066 result = libesedb_file_close(
1067 NULL,
1068 &error );
1069
1070 ESEDB_TEST_ASSERT_EQUAL_INT(
1071 "result",
1072 result,
1073 -1 );
1074
1075 ESEDB_TEST_ASSERT_IS_NOT_NULL(
1076 "error",
1077 error );
1078
1079 libcerror_error_free(
1080 &error );
1081
1082 return( 1 );
1083
1084 on_error:
1085 if( error != NULL )
1086 {
1087 libcerror_error_free(
1088 &error );
1089 }
1090 return( 0 );
1091 }
1092
1093 /* Tests the libesedb_file_open and libesedb_file_close functions
1094 * Returns 1 if successful or 0 if not
1095 */
1096 int esedb_test_file_open_close(
1097 const system_character_t *source )
1098 {
1099 libcerror_error_t *error = NULL;
1100 libesedb_file_t *file = NULL;
1101 int result = 0;
1102
1103 /* Initialize test
1104 */
1105 result = libesedb_file_initialize(
1106 &file,
1107 &error );
1108
1109 ESEDB_TEST_ASSERT_EQUAL_INT(
1110 "result",
1111 result,
1112 1 );
1113
1114 ESEDB_TEST_ASSERT_IS_NOT_NULL(
1115 "file",
1116 file );
1117
1118 ESEDB_TEST_ASSERT_IS_NULL(
1119 "error",
1120 error );
1121
1122 /* Test open and close
1123 */
1124 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
1125 result = libesedb_file_open_wide(
1126 file,
1127 source,
1128 LIBESEDB_OPEN_READ,
1129 &error );
1130 #else
1131 result = libesedb_file_open(
1132 file,
1133 source,
1134 LIBESEDB_OPEN_READ,
1135 &error );
1136 #endif
1137
1138 ESEDB_TEST_ASSERT_EQUAL_INT(
1139 "result",
1140 result,
1141 1 );
1142
1143 ESEDB_TEST_ASSERT_IS_NULL(
1144 "error",
1145 error );
1146
1147 result = libesedb_file_close(
1148 file,
1149 &error );
1150
1151 ESEDB_TEST_ASSERT_EQUAL_INT(
1152 "result",
1153 result,
1154 0 );
1155
1156 ESEDB_TEST_ASSERT_IS_NULL(
1157 "error",
1158 error );
1159
1160 /* Test open and close a second time to validate clean up on close
1161 */
1162 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
1163 result = libesedb_file_open_wide(
1164 file,
1165 source,
1166 LIBESEDB_OPEN_READ,
1167 &error );
1168 #else
1169 result = libesedb_file_open(
1170 file,
1171 source,
1172 LIBESEDB_OPEN_READ,
1173 &error );
1174 #endif
1175
1176 ESEDB_TEST_ASSERT_EQUAL_INT(
1177 "result",
1178 result,
1179 1 );
1180
1181 ESEDB_TEST_ASSERT_IS_NULL(
1182 "error",
1183 error );
1184
1185 result = libesedb_file_close(
1186 file,
1187 &error );
1188
1189 ESEDB_TEST_ASSERT_EQUAL_INT(
1190 "result",
1191 result,
1192 0 );
1193
1194 ESEDB_TEST_ASSERT_IS_NULL(
1195 "error",
1196 error );
1197
1198 /* Clean up
1199 */
1200 result = libesedb_file_free(
1201 &file,
1202 &error );
1203
1204 ESEDB_TEST_ASSERT_EQUAL_INT(
1205 "result",
1206 result,
1207 1 );
1208
1209 ESEDB_TEST_ASSERT_IS_NULL(
1210 "file",
1211 file );
1212
1213 ESEDB_TEST_ASSERT_IS_NULL(
1214 "error",
1215 error );
1216
1217 return( 1 );
1218
1219 on_error:
1220 if( error != NULL )
1221 {
1222 libcerror_error_free(
1223 &error );
1224 }
1225 if( file != NULL )
1226 {
1227 libesedb_file_free(
1228 &file,
1229 NULL );
1230 }
1231 return( 0 );
1232 }
1233
1234 /* Tests the libesedb_file_signal_abort function
1235 * Returns 1 if successful or 0 if not
1236 */
1237 int esedb_test_file_signal_abort(
1238 libesedb_file_t *file )
1239 {
1240 libcerror_error_t *error = NULL;
1241 int result = 0;
1242
1243 /* Test regular cases
1244 */
1245 result = libesedb_file_signal_abort(
1246 file,
1247 &error );
1248
1249 ESEDB_TEST_ASSERT_EQUAL_INT(
1250 "result",
1251 result,
1252 1 );
1253
1254 ESEDB_TEST_ASSERT_IS_NULL(
1255 "error",
1256 error );
1257
1258 /* Test error cases
1259 */
1260 result = libesedb_file_signal_abort(
1261 NULL,
1262 &error );
1263
1264 ESEDB_TEST_ASSERT_EQUAL_INT(
1265 "result",
1266 result,
1267 -1 );
1268
1269 ESEDB_TEST_ASSERT_IS_NOT_NULL(
1270 "error",
1271 error );
1272
1273 libcerror_error_free(
1274 &error );
1275
1276 return( 1 );
1277
1278 on_error:
1279 if( error != NULL )
1280 {
1281 libcerror_error_free(
1282 &error );
1283 }
1284 return( 0 );
1285 }
1286
1287 /* Tests the libesedb_file_get_type function
1288 * Returns 1 if successful or 0 if not
1289 */
1290 int esedb_test_file_get_type(
1291 libesedb_file_t *file )
1292 {
1293 libcerror_error_t *error = NULL;
1294 uint32_t type = 0;
1295 int result = 0;
1296 int type_is_set = 0;
1297
1298 /* Test regular cases
1299 */
1300 result = libesedb_file_get_type(
1301 file,
1302 &type,
1303 &error );
1304
1305 ESEDB_TEST_ASSERT_NOT_EQUAL_INT(
1306 "result",
1307 result,
1308 -1 );
1309
1310 ESEDB_TEST_ASSERT_IS_NULL(
1311 "error",
1312 error );
1313
1314 type_is_set = result;
1315
1316 /* Test error cases
1317 */
1318 result = libesedb_file_get_type(
1319 NULL,
1320 &type,
1321 &error );
1322
1323 ESEDB_TEST_ASSERT_EQUAL_INT(
1324 "result",
1325 result,
1326 -1 );
1327
1328 ESEDB_TEST_ASSERT_IS_NOT_NULL(
1329 "error",
1330 error );
1331
1332 libcerror_error_free(
1333 &error );
1334
1335 if( type_is_set != 0 )
1336 {
1337 result = libesedb_file_get_type(
1338 file,
1339 NULL,
1340 &error );
1341
1342 ESEDB_TEST_ASSERT_EQUAL_INT(
1343 "result",
1344 result,
1345 -1 );
1346
1347 ESEDB_TEST_ASSERT_IS_NOT_NULL(
1348 "error",
1349 error );
1350
1351 libcerror_error_free(
1352 &error );
1353 }
1354 return( 1 );
1355
1356 on_error:
1357 if( error != NULL )
1358 {
1359 libcerror_error_free(
1360 &error );
1361 }
1362 return( 0 );
1363 }
1364
1365 /* Tests the libesedb_file_get_page_size function
1366 * Returns 1 if successful or 0 if not
1367 */
1368 int esedb_test_file_get_page_size(
1369 libesedb_file_t *file )
1370 {
1371 libcerror_error_t *error = NULL;
1372 uint32_t page_size = 0;
1373 int page_size_is_set = 0;
1374 int result = 0;
1375
1376 /* Test regular cases
1377 */
1378 result = libesedb_file_get_page_size(
1379 file,
1380 &page_size,
1381 &error );
1382
1383 ESEDB_TEST_ASSERT_NOT_EQUAL_INT(
1384 "result",
1385 result,
1386 -1 );
1387
1388 ESEDB_TEST_ASSERT_IS_NULL(
1389 "error",
1390 error );
1391
1392 page_size_is_set = result;
1393
1394 /* Test error cases
1395 */
1396 result = libesedb_file_get_page_size(
1397 NULL,
1398 &page_size,
1399 &error );
1400
1401 ESEDB_TEST_ASSERT_EQUAL_INT(
1402 "result",
1403 result,
1404 -1 );
1405
1406 ESEDB_TEST_ASSERT_IS_NOT_NULL(
1407 "error",
1408 error );
1409
1410 libcerror_error_free(
1411 &error );
1412
1413 if( page_size_is_set != 0 )
1414 {
1415 result = libesedb_file_get_page_size(
1416 file,
1417 NULL,
1418 &error );
1419
1420 ESEDB_TEST_ASSERT_EQUAL_INT(
1421 "result",
1422 result,
1423 -1 );
1424
1425 ESEDB_TEST_ASSERT_IS_NOT_NULL(
1426 "error",
1427 error );
1428
1429 libcerror_error_free(
1430 &error );
1431 }
1432 return( 1 );
1433
1434 on_error:
1435 if( error != NULL )
1436 {
1437 libcerror_error_free(
1438 &error );
1439 }
1440 return( 0 );
1441 }
1442
1443 /* Tests the libesedb_file_get_number_of_tables function
1444 * Returns 1 if successful or 0 if not
1445 */
1446 int esedb_test_file_get_number_of_tables(
1447 libesedb_file_t *file )
1448 {
1449 libcerror_error_t *error = NULL;
1450 int number_of_tables = 0;
1451 int number_of_tables_is_set = 0;
1452 int result = 0;
1453
1454 /* Test regular cases
1455 */
1456 result = libesedb_file_get_number_of_tables(
1457 file,
1458 &number_of_tables,
1459 &error );
1460
1461 ESEDB_TEST_ASSERT_NOT_EQUAL_INT(
1462 "result",
1463 result,
1464 -1 );
1465
1466 ESEDB_TEST_ASSERT_IS_NULL(
1467 "error",
1468 error );
1469
1470 number_of_tables_is_set = result;
1471
1472 /* Test error cases
1473 */
1474 result = libesedb_file_get_number_of_tables(
1475 NULL,
1476 &number_of_tables,
1477 &error );
1478
1479 ESEDB_TEST_ASSERT_EQUAL_INT(
1480 "result",
1481 result,
1482 -1 );
1483
1484 ESEDB_TEST_ASSERT_IS_NOT_NULL(
1485 "error",
1486 error );
1487
1488 libcerror_error_free(
1489 &error );
1490
1491 if( number_of_tables_is_set != 0 )
1492 {
1493 result = libesedb_file_get_number_of_tables(
1494 file,
1495 NULL,
1496 &error );
1497
1498 ESEDB_TEST_ASSERT_EQUAL_INT(
1499 "result",
1500 result,
1501 -1 );
1502
1503 ESEDB_TEST_ASSERT_IS_NOT_NULL(
1504 "error",
1505 error );
1506
1507 libcerror_error_free(
1508 &error );
1509 }
1510 return( 1 );
1511
1512 on_error:
1513 if( error != NULL )
1514 {
1515 libcerror_error_free(
1516 &error );
1517 }
1518 return( 0 );
1519 }
1520
1521 /* The main program
1522 */
1523 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
1524 int wmain(
1525 int argc,
1526 wchar_t * const argv[] )
1527 #else
1528 int main(
1529 int argc,
1530 char * const argv[] )
1531 #endif
1532 {
1533 libcerror_error_t *error = NULL;
1534 libesedb_file_t *file = NULL;
1535 system_character_t *source = NULL;
1536 system_integer_t option = 0;
1537 int result = 0;
1538
1539 while( ( option = esedb_test_getopt(
1540 argc,
1541 argv,
1542 _SYSTEM_STRING( "" ) ) ) != (system_integer_t) -1 )
1543 {
1544 switch( option )
1545 {
1546 case (system_integer_t) '?':
1547 default:
1548 fprintf(
1549 stderr,
1550 "Invalid argument: %" PRIs_SYSTEM ".\n",
1551 argv[ optind - 1 ] );
1552
1553 return( EXIT_FAILURE );
1554 }
1555 }
1556 if( optind < argc )
1557 {
1558 source = argv[ optind ];
1559 }
1560 #if defined( HAVE_DEBUG_OUTPUT ) && defined( ESEDB_TEST_FILE_VERBOSE )
1561 libesedb_notify_set_verbose(
1562 1 );
1563 libesedb_notify_set_stream(
1564 stderr,
1565 NULL );
1566 #endif
1567
1568 ESEDB_TEST_RUN(
1569 "libesedb_file_initialize",
1570 esedb_test_file_initialize );
1571
1572 ESEDB_TEST_RUN(
1573 "libesedb_file_free",
1574 esedb_test_file_free );
1575
1576 #if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )
1577 if( source != NULL )
1578 {
1579 ESEDB_TEST_RUN_WITH_ARGS(
1580 "libesedb_file_open",
1581 esedb_test_file_open,
1582 source );
1583
1584 #if defined( HAVE_WIDE_CHARACTER_TYPE )
1585
1586 ESEDB_TEST_RUN_WITH_ARGS(
1587 "libesedb_file_open_wide",
1588 esedb_test_file_open_wide,
1589 source );
1590
1591 #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */
1592
1593 #if defined( LIBESEDB_HAVE_BFIO )
1594
1595 /* TODO add test for libesedb_file_open_file_io_handle */
1596
1597 #endif /* defined( LIBESEDB_HAVE_BFIO ) */
1598
1599 ESEDB_TEST_RUN(
1600 "libesedb_file_close",
1601 esedb_test_file_close );
1602
1603 ESEDB_TEST_RUN_WITH_ARGS(
1604 "libesedb_file_open_close",
1605 esedb_test_file_open_close,
1606 source );
1607
1608 /* Initialize test
1609 */
1610 result = esedb_test_file_open_source(
1611 &file,
1612 source,
1613 &error );
1614
1615 ESEDB_TEST_ASSERT_EQUAL_INT(
1616 "result",
1617 result,
1618 1 );
1619
1620 ESEDB_TEST_ASSERT_IS_NOT_NULL(
1621 "file",
1622 file );
1623
1624 ESEDB_TEST_ASSERT_IS_NULL(
1625 "error",
1626 error );
1627
1628 ESEDB_TEST_RUN_WITH_ARGS(
1629 "libesedb_file_signal_abort",
1630 esedb_test_file_signal_abort,
1631 file );
1632
1633 #if defined( __GNUC__ )
1634
1635 /* TODO: add tests for libesedb_file_open_read */
1636
1637 #endif /* defined( __GNUC__ ) */
1638
1639 ESEDB_TEST_RUN_WITH_ARGS(
1640 "libesedb_file_get_type",
1641 esedb_test_file_get_type,
1642 file );
1643
1644 /* TODO: add tests for libesedb_file_get_format_version */
1645
1646 /* TODO: add tests for libesedb_file_get_creation_format_version */
1647
1648 ESEDB_TEST_RUN_WITH_ARGS(
1649 "libesedb_file_get_page_size",
1650 esedb_test_file_get_page_size,
1651 file );
1652
1653 ESEDB_TEST_RUN_WITH_ARGS(
1654 "libesedb_file_get_number_of_tables",
1655 esedb_test_file_get_number_of_tables,
1656 file );
1657
1658 /* TODO: add tests for libesedb_file_get_table */
1659
1660 /* TODO: add tests for libesedb_file_get_table_by_utf8_name */
1661
1662 /* TODO: add tests for libesedb_file_get_table_by_utf16_name */
1663
1664 /* Clean up
1665 */
1666 result = esedb_test_file_close_source(
1667 &file,
1668 &error );
1669
1670 ESEDB_TEST_ASSERT_EQUAL_INT(
1671 "result",
1672 result,
1673 0 );
1674
1675 ESEDB_TEST_ASSERT_IS_NULL(
1676 "file",
1677 file );
1678
1679 ESEDB_TEST_ASSERT_IS_NULL(
1680 "error",
1681 error );
1682 }
1683 #endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */
1684
1685 return( EXIT_SUCCESS );
1686
1687 on_error:
1688 if( error != NULL )
1689 {
1690 libcerror_error_free(
1691 &error );
1692 }
1693 if( file != NULL )
1694 {
1695 esedb_test_file_close_source(
1696 &file,
1697 NULL );
1698 }
1699 return( EXIT_FAILURE );
1700 }
1701
+0
-77
tests/esedb_test_get_version.c less more
0 /*
1 * Library get version test program
2 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23
24 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
25 #include <stdlib.h>
26 #endif
27
28 #include "esedb_test_libcstring.h"
29 #include "esedb_test_libesedb.h"
30 #include "esedb_test_unused.h"
31
32 /* Tests retrieving the library version
33 * Returns 1 if successful or 0 if not
34 */
35 int esedb_test_get_version(
36 void )
37 {
38 const char *version_string = NULL;
39 int result = 0;
40
41 version_string = libesedb_get_version();
42
43 result = libcstring_narrow_string_compare(
44 version_string,
45 LIBESEDB_VERSION_STRING,
46 9 );
47
48 if( result != 0 )
49 {
50 return( 0 );
51 }
52 return( 1 );
53 }
54
55 /* The main program
56 */
57 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
58 int wmain(
59 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
60 wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
61 #else
62 int main(
63 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
64 char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
65 #endif
66 {
67 ESEDB_TEST_UNREFERENCED_PARAMETER( argc )
68 ESEDB_TEST_UNREFERENCED_PARAMETER( argv )
69
70 if( esedb_test_get_version() != 1 )
71 {
72 return( EXIT_FAILURE );
73 }
74 return( EXIT_SUCCESS );
75 }
76
0 /*
1 * GetOpt functions
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <narrow_string.h>
23 #include <system_string.h>
24 #include <types.h>
25 #include <wide_string.h>
26
27 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
28 #include <stdlib.h>
29 #endif
30
31 #include "esedb_test_getopt.h"
32 #include "esedb_test_libcnotify.h"
33
34 #if !defined( HAVE_GETOPT )
35
36 /* The option index
37 * Start with argument 1 (argument 0 is the program name)
38 */
39 int optind = 1;
40
41 /* The current option argument
42 */
43 system_character_t *optarg = NULL;
44
45 /* Value to indicate the current option
46 */
47 system_integer_t optopt = 0;
48
49 /* Get the program options
50 * Function for platforms that do not have the getopt function
51 * Returns the option character processed, or -1 on error,
52 * ? if the option was not in the options string, : if the option argument was missing
53 */
54 system_integer_t esedb_test_getopt(
55 int argument_count,
56 system_character_t * const argument_values[],
57 const system_character_t *options_string )
58 {
59 system_character_t *argument_value = NULL;
60 system_character_t *option_value = NULL;
61 static char *function = "esedb_test_getopt";
62 size_t options_string_length = 0;
63
64 if( optind >= argument_count )
65 {
66 return( (system_integer_t) -1 );
67 }
68 argument_value = argument_values[ optind ];
69
70 /* Check if the argument value is not an empty string
71 */
72 if( *argument_value == 0 )
73 {
74 return( (system_integer_t) -1 );
75 }
76 /* Check if the first character is a option marker '-'
77 */
78 if( *argument_value != (system_character_t) '-' )
79 {
80 return( (system_integer_t) -1 );
81 }
82 argument_value++;
83
84 /* Check if long options are provided '--'
85 */
86 if( *argument_value == (system_character_t) '-' )
87 {
88 optind++;
89
90 return( (system_integer_t) -1 );
91 }
92 options_string_length = system_string_length(
93 options_string );
94
95 optopt = *argument_value;
96 option_value = system_string_search_character(
97 options_string,
98 optopt,
99 options_string_length );
100
101 argument_value++;
102
103 /* Check if an argument was specified or that the option was not found
104 * in the option string
105 */
106 if( ( optopt == (system_integer_t) ':' )
107 || ( option_value == NULL ) )
108 {
109 if( *argument_value == (system_character_t) '\0' )
110 {
111 optind++;
112 }
113 if( ( *options_string != (system_character_t) ':' )
114 && ( optopt != (system_integer_t) '?' ) )
115 {
116 libcnotify_printf(
117 "%s: no such option: %" PRIc_SYSTEM ".\n",
118 function,
119 optopt );
120 }
121 return( (system_integer_t) '?' );
122 }
123 option_value++;
124
125 /* Check if no option argument is required
126 */
127 if( *option_value != (system_character_t) ':' )
128 {
129 optarg = NULL;
130
131 if( *argument_value == (system_character_t) '\0' )
132 {
133 optind++;
134 }
135 }
136 /* Check if the argument is right after the option flag with no space in between
137 */
138 else if( *argument_value != (system_character_t) '\0' )
139 {
140 optarg = argument_value;
141
142 optind++;
143 }
144 else
145 {
146 optind++;
147
148 /* Check if the argument was provided as the next argument value
149 */
150 if( argument_count <= optind )
151 {
152 if( *option_value == ':' )
153 {
154 return( (system_integer_t) ':' );
155 }
156 libcnotify_printf(
157 "%s: option: %" PRIc_SYSTEM " requires an argument.\n",
158 function,
159 optopt );
160
161 return( (system_integer_t) '?' );
162 }
163 optarg = argument_values[ optind ];
164
165 optind++;
166 }
167 return( optopt );
168 }
169
170 #endif /* !defined( HAVE_GETOPT ) */
171
0 /*
1 * GetOpt functions
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _ESEDB_TEST_GETOPT_H )
22 #define _ESEDB_TEST_GETOPT_H
23
24 #include <common.h>
25 #include <types.h>
26
27 /* unistd.h is included here to export getopt, optarg, optind and optopt
28 */
29 #if defined( HAVE_UNISTD_H )
30 #include <unistd.h>
31 #endif
32
33 #if defined( __cplusplus )
34 extern "C" {
35 #endif
36
37 #if defined( HAVE_GETOPT )
38 #define esedb_test_getopt( argument_count, argument_values, options_string ) \
39 getopt( argument_count, argument_values, options_string )
40
41 #else
42
43 #if !defined( __CYGWIN__ )
44 extern int optind;
45 extern system_character_t *optarg;
46 extern system_integer_t optopt;
47
48 #else
49 int optind;
50 system_character_t *optarg;
51 system_integer_t optopt;
52
53 #endif /* !defined( __CYGWIN__ ) */
54
55 system_integer_t esedb_test_getopt(
56 int argument_count,
57 system_character_t * const argument_values[],
58 const system_character_t *options_string );
59
60 #endif /* defined( HAVE_GETOPT ) */
61
62 #if defined( __cplusplus )
63 }
64 #endif
65
66 #endif /* !defined( _ESEDB_TEST_GETOPT_H ) */
67
0 /*
1 * Library index type test program
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <types.h>
24
25 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
26 #include <stdlib.h>
27 #endif
28
29 #include "esedb_test_libcerror.h"
30 #include "esedb_test_libesedb.h"
31 #include "esedb_test_macros.h"
32 #include "esedb_test_memory.h"
33 #include "esedb_test_unused.h"
34
35 #include "../libesedb/libesedb_index.h"
36
37 /* Tests the libesedb_index_free function
38 * Returns 1 if successful or 0 if not
39 */
40 int esedb_test_index_free(
41 void )
42 {
43 libcerror_error_t *error = NULL;
44 int result = 0;
45
46 /* Test error cases
47 */
48 result = libesedb_index_free(
49 NULL,
50 &error );
51
52 ESEDB_TEST_ASSERT_EQUAL_INT(
53 "result",
54 result,
55 -1 );
56
57 ESEDB_TEST_ASSERT_IS_NOT_NULL(
58 "error",
59 error );
60
61 libcerror_error_free(
62 &error );
63
64 return( 1 );
65
66 on_error:
67 if( error != NULL )
68 {
69 libcerror_error_free(
70 &error );
71 }
72 return( 0 );
73 }
74
75 #if defined( __GNUC__ )
76
77 #endif /* defined( __GNUC__ ) */
78
79 /* The main program
80 */
81 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
82 int wmain(
83 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
84 wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
85 #else
86 int main(
87 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
88 char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
89 #endif
90 {
91 ESEDB_TEST_UNREFERENCED_PARAMETER( argc )
92 ESEDB_TEST_UNREFERENCED_PARAMETER( argv )
93
94 #if defined( __GNUC__ )
95
96 /* TODO: add tests for libesedb_index_initialize */
97
98 #endif /* defined( __GNUC__ ) */
99
100 ESEDB_TEST_RUN(
101 "libesedb_index_free",
102 esedb_test_index_free );
103
104 #if defined( __GNUC__ )
105
106 /* TODO: add tests for libesedb_index_get_identifier */
107
108 /* TODO: add tests for libesedb_index_get_utf8_name_size */
109
110 /* TODO: add tests for libesedb_index_get_utf8_name */
111
112 /* TODO: add tests for libesedb_index_get_utf16_name_size */
113
114 /* TODO: add tests for libesedb_index_get_utf16_name */
115
116 /* TODO: add tests for libesedb_index_get_number_of_records */
117
118 /* TODO: add tests for libesedb_index_get_record */
119
120 #endif /* defined( __GNUC__ ) */
121
122 return( EXIT_SUCCESS );
123
124 on_error:
125 return( EXIT_FAILURE );
126 }
127
0 /*
1 * Library io_handle type test program
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <types.h>
24
25 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
26 #include <stdlib.h>
27 #endif
28
29 #include "esedb_test_libcerror.h"
30 #include "esedb_test_libesedb.h"
31 #include "esedb_test_macros.h"
32 #include "esedb_test_memory.h"
33 #include "esedb_test_unused.h"
34
35 #include "../libesedb/libesedb_io_handle.h"
36
37 #if defined( __GNUC__ )
38
39 /* Tests the libesedb_io_handle_initialize function
40 * Returns 1 if successful or 0 if not
41 */
42 int esedb_test_io_handle_initialize(
43 void )
44 {
45 libcerror_error_t *error = NULL;
46 libesedb_io_handle_t *io_handle = NULL;
47 int result = 0;
48
49 #if defined( HAVE_ESEDB_TEST_MEMORY )
50 int number_of_malloc_fail_tests = 1;
51 int number_of_memset_fail_tests = 1;
52 int test_number = 0;
53 #endif
54
55 /* Test regular cases
56 */
57 result = libesedb_io_handle_initialize(
58 &io_handle,
59 &error );
60
61 ESEDB_TEST_ASSERT_EQUAL_INT(
62 "result",
63 result,
64 1 );
65
66 ESEDB_TEST_ASSERT_IS_NOT_NULL(
67 "io_handle",
68 io_handle );
69
70 ESEDB_TEST_ASSERT_IS_NULL(
71 "error",
72 error );
73
74 result = libesedb_io_handle_free(
75 &io_handle,
76 &error );
77
78 ESEDB_TEST_ASSERT_EQUAL_INT(
79 "result",
80 result,
81 1 );
82
83 ESEDB_TEST_ASSERT_IS_NULL(
84 "io_handle",
85 io_handle );
86
87 ESEDB_TEST_ASSERT_IS_NULL(
88 "error",
89 error );
90
91 /* Test error cases
92 */
93 result = libesedb_io_handle_initialize(
94 NULL,
95 &error );
96
97 ESEDB_TEST_ASSERT_EQUAL_INT(
98 "result",
99 result,
100 -1 );
101
102 ESEDB_TEST_ASSERT_IS_NOT_NULL(
103 "error",
104 error );
105
106 libcerror_error_free(
107 &error );
108
109 io_handle = (libesedb_io_handle_t *) 0x12345678UL;
110
111 result = libesedb_io_handle_initialize(
112 &io_handle,
113 &error );
114
115 ESEDB_TEST_ASSERT_EQUAL_INT(
116 "result",
117 result,
118 -1 );
119
120 ESEDB_TEST_ASSERT_IS_NOT_NULL(
121 "error",
122 error );
123
124 libcerror_error_free(
125 &error );
126
127 io_handle = NULL;
128
129 #if defined( HAVE_ESEDB_TEST_MEMORY )
130
131 for( test_number = 0;
132 test_number < number_of_malloc_fail_tests;
133 test_number++ )
134 {
135 /* Test libesedb_io_handle_initialize with malloc failing
136 */
137 esedb_test_malloc_attempts_before_fail = test_number;
138
139 result = libesedb_io_handle_initialize(
140 &io_handle,
141 &error );
142
143 if( esedb_test_malloc_attempts_before_fail != -1 )
144 {
145 esedb_test_malloc_attempts_before_fail = -1;
146
147 if( io_handle != NULL )
148 {
149 libesedb_io_handle_free(
150 &io_handle,
151 NULL );
152 }
153 }
154 else
155 {
156 ESEDB_TEST_ASSERT_EQUAL_INT(
157 "result",
158 result,
159 -1 );
160
161 ESEDB_TEST_ASSERT_IS_NULL(
162 "io_handle",
163 io_handle );
164
165 ESEDB_TEST_ASSERT_IS_NOT_NULL(
166 "error",
167 error );
168
169 libcerror_error_free(
170 &error );
171 }
172 }
173 for( test_number = 0;
174 test_number < number_of_memset_fail_tests;
175 test_number++ )
176 {
177 /* Test libesedb_io_handle_initialize with memset failing
178 */
179 esedb_test_memset_attempts_before_fail = test_number;
180
181 result = libesedb_io_handle_initialize(
182 &io_handle,
183 &error );
184
185 if( esedb_test_memset_attempts_before_fail != -1 )
186 {
187 esedb_test_memset_attempts_before_fail = -1;
188
189 if( io_handle != NULL )
190 {
191 libesedb_io_handle_free(
192 &io_handle,
193 NULL );
194 }
195 }
196 else
197 {
198 ESEDB_TEST_ASSERT_EQUAL_INT(
199 "result",
200 result,
201 -1 );
202
203 ESEDB_TEST_ASSERT_IS_NULL(
204 "io_handle",
205 io_handle );
206
207 ESEDB_TEST_ASSERT_IS_NOT_NULL(
208 "error",
209 error );
210
211 libcerror_error_free(
212 &error );
213 }
214 }
215 #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */
216
217 return( 1 );
218
219 on_error:
220 if( error != NULL )
221 {
222 libcerror_error_free(
223 &error );
224 }
225 if( io_handle != NULL )
226 {
227 libesedb_io_handle_free(
228 &io_handle,
229 NULL );
230 }
231 return( 0 );
232 }
233
234 /* Tests the libesedb_io_handle_free function
235 * Returns 1 if successful or 0 if not
236 */
237 int esedb_test_io_handle_free(
238 void )
239 {
240 libcerror_error_t *error = NULL;
241 int result = 0;
242
243 /* Test error cases
244 */
245 result = libesedb_io_handle_free(
246 NULL,
247 &error );
248
249 ESEDB_TEST_ASSERT_EQUAL_INT(
250 "result",
251 result,
252 -1 );
253
254 ESEDB_TEST_ASSERT_IS_NOT_NULL(
255 "error",
256 error );
257
258 libcerror_error_free(
259 &error );
260
261 return( 1 );
262
263 on_error:
264 if( error != NULL )
265 {
266 libcerror_error_free(
267 &error );
268 }
269 return( 0 );
270 }
271
272 #endif /* defined( __GNUC__ ) */
273
274 /* The main program
275 */
276 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
277 int wmain(
278 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
279 wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
280 #else
281 int main(
282 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
283 char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
284 #endif
285 {
286 ESEDB_TEST_UNREFERENCED_PARAMETER( argc )
287 ESEDB_TEST_UNREFERENCED_PARAMETER( argv )
288
289 #if defined( __GNUC__ )
290
291 ESEDB_TEST_RUN(
292 "libesedb_io_handle_initialize",
293 esedb_test_io_handle_initialize );
294
295 ESEDB_TEST_RUN(
296 "libesedb_io_handle_free",
297 esedb_test_io_handle_free );
298
299 /* TODO: add tests for libesedb_io_handle_clear */
300
301 /* TODO: add tests for libesedb_io_handle_set_pages_data_range */
302
303 /* TODO: add tests for libesedb_io_handle_read_file_header */
304
305 /* TODO: add tests for libesedb_io_handle_read_page */
306
307 #endif /* defined( __GNUC__ ) */
308
309 return( EXIT_SUCCESS );
310
311 on_error:
312 return( EXIT_FAILURE );
313 }
314
0 /*
1 * Library key type test program
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <types.h>
24
25 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
26 #include <stdlib.h>
27 #endif
28
29 #include "esedb_test_libcerror.h"
30 #include "esedb_test_libesedb.h"
31 #include "esedb_test_libfdata.h"
32 #include "esedb_test_macros.h"
33 #include "esedb_test_memory.h"
34 #include "esedb_test_unused.h"
35
36 #include "../libesedb/libesedb_key.h"
37
38 #if defined( __GNUC__ )
39
40 /* Tests the libesedb_key_initialize function
41 * Returns 1 if successful or 0 if not
42 */
43 int esedb_test_key_initialize(
44 void )
45 {
46 libcerror_error_t *error = NULL;
47 libesedb_key_t *key = NULL;
48 int result = 0;
49
50 #if defined( HAVE_ESEDB_TEST_MEMORY )
51 int number_of_malloc_fail_tests = 1;
52 int number_of_memset_fail_tests = 1;
53 int test_number = 0;
54 #endif
55
56 /* Test regular cases
57 */
58 result = libesedb_key_initialize(
59 &key,
60 &error );
61
62 ESEDB_TEST_ASSERT_EQUAL_INT(
63 "result",
64 result,
65 1 );
66
67 ESEDB_TEST_ASSERT_IS_NOT_NULL(
68 "key",
69 key );
70
71 ESEDB_TEST_ASSERT_IS_NULL(
72 "error",
73 error );
74
75 result = libesedb_key_free(
76 &key,
77 &error );
78
79 ESEDB_TEST_ASSERT_EQUAL_INT(
80 "result",
81 result,
82 1 );
83
84 ESEDB_TEST_ASSERT_IS_NULL(
85 "key",
86 key );
87
88 ESEDB_TEST_ASSERT_IS_NULL(
89 "error",
90 error );
91
92 /* Test error cases
93 */
94 result = libesedb_key_initialize(
95 NULL,
96 &error );
97
98 ESEDB_TEST_ASSERT_EQUAL_INT(
99 "result",
100 result,
101 -1 );
102
103 ESEDB_TEST_ASSERT_IS_NOT_NULL(
104 "error",
105 error );
106
107 libcerror_error_free(
108 &error );
109
110 key = (libesedb_key_t *) 0x12345678UL;
111
112 result = libesedb_key_initialize(
113 &key,
114 &error );
115
116 ESEDB_TEST_ASSERT_EQUAL_INT(
117 "result",
118 result,
119 -1 );
120
121 ESEDB_TEST_ASSERT_IS_NOT_NULL(
122 "error",
123 error );
124
125 libcerror_error_free(
126 &error );
127
128 key = NULL;
129
130 #if defined( HAVE_ESEDB_TEST_MEMORY )
131
132 for( test_number = 0;
133 test_number < number_of_malloc_fail_tests;
134 test_number++ )
135 {
136 /* Test libesedb_key_initialize with malloc failing
137 */
138 esedb_test_malloc_attempts_before_fail = test_number;
139
140 result = libesedb_key_initialize(
141 &key,
142 &error );
143
144 if( esedb_test_malloc_attempts_before_fail != -1 )
145 {
146 esedb_test_malloc_attempts_before_fail = -1;
147
148 if( key != NULL )
149 {
150 libesedb_key_free(
151 &key,
152 NULL );
153 }
154 }
155 else
156 {
157 ESEDB_TEST_ASSERT_EQUAL_INT(
158 "result",
159 result,
160 -1 );
161
162 ESEDB_TEST_ASSERT_IS_NULL(
163 "key",
164 key );
165
166 ESEDB_TEST_ASSERT_IS_NOT_NULL(
167 "error",
168 error );
169
170 libcerror_error_free(
171 &error );
172 }
173 }
174 for( test_number = 0;
175 test_number < number_of_memset_fail_tests;
176 test_number++ )
177 {
178 /* Test libesedb_key_initialize with memset failing
179 */
180 esedb_test_memset_attempts_before_fail = test_number;
181
182 result = libesedb_key_initialize(
183 &key,
184 &error );
185
186 if( esedb_test_memset_attempts_before_fail != -1 )
187 {
188 esedb_test_memset_attempts_before_fail = -1;
189
190 if( key != NULL )
191 {
192 libesedb_key_free(
193 &key,
194 NULL );
195 }
196 }
197 else
198 {
199 ESEDB_TEST_ASSERT_EQUAL_INT(
200 "result",
201 result,
202 -1 );
203
204 ESEDB_TEST_ASSERT_IS_NULL(
205 "key",
206 key );
207
208 ESEDB_TEST_ASSERT_IS_NOT_NULL(
209 "error",
210 error );
211
212 libcerror_error_free(
213 &error );
214 }
215 }
216 #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */
217
218 return( 1 );
219
220 on_error:
221 if( error != NULL )
222 {
223 libcerror_error_free(
224 &error );
225 }
226 if( key != NULL )
227 {
228 libesedb_key_free(
229 &key,
230 NULL );
231 }
232 return( 0 );
233 }
234
235 /* Tests the libesedb_key_free function
236 * Returns 1 if successful or 0 if not
237 */
238 int esedb_test_key_free(
239 void )
240 {
241 libcerror_error_t *error = NULL;
242 int result = 0;
243
244 /* Test error cases
245 */
246 result = libesedb_key_free(
247 NULL,
248 &error );
249
250 ESEDB_TEST_ASSERT_EQUAL_INT(
251 "result",
252 result,
253 -1 );
254
255 ESEDB_TEST_ASSERT_IS_NOT_NULL(
256 "error",
257 error );
258
259 libcerror_error_free(
260 &error );
261
262 return( 1 );
263
264 on_error:
265 if( error != NULL )
266 {
267 libcerror_error_free(
268 &error );
269 }
270 return( 0 );
271 }
272
273 /* Tests the libesedb_key_compare function
274 * Returns 1 if successful or 0 if not
275 */
276 int esedb_test_key_compare(
277 void )
278 {
279 libcerror_error_t *error = NULL;
280 libesedb_key_t *first_key = NULL;
281 libesedb_key_t *second_key = NULL;
282 int result = 0;
283
284 /* Initialize test
285 */
286 result = libesedb_key_initialize(
287 &first_key,
288 &error );
289
290 ESEDB_TEST_ASSERT_EQUAL_INT(
291 "result",
292 result,
293 1 );
294
295 ESEDB_TEST_ASSERT_IS_NOT_NULL(
296 "first_key",
297 first_key );
298
299 ESEDB_TEST_ASSERT_IS_NULL(
300 "error",
301 error );
302
303 result = libesedb_key_initialize(
304 &second_key,
305 &error );
306
307 ESEDB_TEST_ASSERT_EQUAL_INT(
308 "result",
309 result,
310 1 );
311
312 ESEDB_TEST_ASSERT_IS_NOT_NULL(
313 "second_key",
314 second_key );
315
316 ESEDB_TEST_ASSERT_IS_NULL(
317 "error",
318 error );
319
320 /* Test regular cases
321 */
322 result = libesedb_key_compare(
323 first_key,
324 second_key,
325 &error );
326
327 ESEDB_TEST_ASSERT_EQUAL_INT(
328 "result",
329 result,
330 LIBFDATA_COMPARE_EQUAL );
331
332 ESEDB_TEST_ASSERT_IS_NULL(
333 "error",
334 error );
335
336 /* Test error cases
337 */
338 result = libesedb_key_compare(
339 NULL,
340 second_key,
341 &error );
342
343 ESEDB_TEST_ASSERT_EQUAL_INT(
344 "result",
345 result,
346 -1 );
347
348 ESEDB_TEST_ASSERT_IS_NOT_NULL(
349 "error",
350 error );
351
352 libcerror_error_free(
353 &error );
354
355 result = libesedb_key_compare(
356 first_key,
357 NULL,
358 &error );
359
360 ESEDB_TEST_ASSERT_EQUAL_INT(
361 "result",
362 result,
363 -1 );
364
365 ESEDB_TEST_ASSERT_IS_NOT_NULL(
366 "error",
367 error );
368
369 libcerror_error_free(
370 &error );
371
372 /* Clean up
373 */
374 result = libesedb_key_free(
375 &second_key,
376 &error );
377
378 ESEDB_TEST_ASSERT_EQUAL_INT(
379 "result",
380 result,
381 1 );
382
383 ESEDB_TEST_ASSERT_IS_NULL(
384 "second_key",
385 second_key );
386
387 ESEDB_TEST_ASSERT_IS_NULL(
388 "error",
389 error );
390
391 result = libesedb_key_free(
392 &first_key,
393 &error );
394
395 ESEDB_TEST_ASSERT_EQUAL_INT(
396 "result",
397 result,
398 1 );
399
400 ESEDB_TEST_ASSERT_IS_NULL(
401 "first_key",
402 first_key );
403
404 ESEDB_TEST_ASSERT_IS_NULL(
405 "error",
406 error );
407
408 return( 1 );
409
410 on_error:
411 if( error != NULL )
412 {
413 libcerror_error_free(
414 &error );
415 }
416 if( second_key != NULL )
417 {
418 libesedb_key_free(
419 &second_key,
420 NULL );
421 }
422 if( first_key != NULL )
423 {
424 libesedb_key_free(
425 &first_key,
426 NULL );
427 }
428 return( 0 );
429 }
430
431 #endif /* defined( __GNUC__ ) */
432
433 /* The main program
434 */
435 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
436 int wmain(
437 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
438 wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
439 #else
440 int main(
441 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
442 char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
443 #endif
444 {
445 ESEDB_TEST_UNREFERENCED_PARAMETER( argc )
446 ESEDB_TEST_UNREFERENCED_PARAMETER( argv )
447
448 #if defined( __GNUC__ )
449
450 ESEDB_TEST_RUN(
451 "libesedb_key_initialize",
452 esedb_test_key_initialize );
453
454 ESEDB_TEST_RUN(
455 "libesedb_key_free",
456 esedb_test_key_free );
457
458 /* TODO: add tests for libesedb_key_set_data */
459
460 /* TODO: add tests for libesedb_key_append_data */
461
462 #if defined( TODO )
463
464 ESEDB_TEST_RUN(
465 "libesedb_key_compare",
466 esedb_test_key_compare );
467
468 #endif
469
470 #endif /* defined( __GNUC__ ) */
471
472 return( EXIT_SUCCESS );
473
474 on_error:
475 return( EXIT_FAILURE );
476 }
477
0 /*
1 * The libbfio header wrapper
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _ESEDB_TEST_LIBBFIO_H )
22 #define _ESEDB_TEST_LIBBFIO_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBBFIO for local use of libbfio
27 */
28 #if defined( HAVE_LOCAL_LIBBFIO )
29
30 #include <libbfio_definitions.h>
31 #include <libbfio_file.h>
32 #include <libbfio_file_pool.h>
33 #include <libbfio_file_range.h>
34 #include <libbfio_handle.h>
35 #include <libbfio_memory_range.h>
36 #include <libbfio_pool.h>
37 #include <libbfio_types.h>
38
39 #else
40
41 /* If libtool DLL support is enabled set LIBBFIO_DLL_IMPORT
42 * before including libbfio.h
43 */
44 #if defined( _WIN32 ) && defined( DLL_IMPORT )
45 #define LIBBFIO_DLL_IMPORT
46 #endif
47
48 #include <libbfio.h>
49
50 #if defined( HAVE_MULTI_THREAD_SUPPORT ) && !defined( LIBBFIO_HAVE_MULTI_THREAD_SUPPORT )
51 #error Multi-threading support requires libbfio with multi-threading support
52 #endif
53
54 #endif /* defined( HAVE_LOCAL_LIBBFIO ) */
55
56 #endif /* !defined( _ESEDB_TEST_LIBBFIO_H ) */
57
00 /*
11 * The internal libcerror header
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
0 /*
1 * The internal libclocale header
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _ESEDB_TEST_LIBCLOCALE_H )
22 #define _ESEDB_TEST_LIBCLOCALE_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCLOCALE for local use of libclocale
27 */
28 #if defined( HAVE_LOCAL_LIBCLOCALE )
29
30 #include <libclocale_codepage.h>
31 #include <libclocale_definitions.h>
32 #include <libclocale_locale.h>
33 #include <libclocale_support.h>
34
35 #else
36
37 /* If libtool DLL support is enabled set LIBCLOCALE_DLL_IMPORT
38 * before including libclocale.h
39 */
40 #if defined( _WIN32 ) && defined( DLL_IMPORT )
41 #define LIBCLOCALE_DLL_IMPORT
42 #endif
43
44 #include <libclocale.h>
45
46 #endif /* defined( HAVE_LOCAL_LIBCLOCALE ) */
47
48 #endif /* !defined( _ESEDB_TEST_LIBCLOCALE_H ) */
49
0 /*
1 * The internal libcnotify header
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _ESEDB_TEST_LIBCNOTIFY_H )
22 #define _ESEDB_TEST_LIBCNOTIFY_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCNOTIFY for local use of libcnotify
27 */
28 #if defined( HAVE_LOCAL_LIBCNOTIFY )
29
30 #include <libcnotify_definitions.h>
31 #include <libcnotify_print.h>
32 #include <libcnotify_stream.h>
33 #include <libcnotify_verbose.h>
34
35 #else
36
37 /* If libtool DLL support is enabled set LIBCNOTIFY_DLL_IMPORT
38 * before including libcnotify.h
39 */
40 #if defined( _WIN32 ) && defined( DLL_IMPORT )
41 #define LIBCNOTIFY_DLL_IMPORT
42 #endif
43
44 #include <libcnotify.h>
45
46 #endif /* defined( HAVE_LOCAL_LIBCNOTIFY ) */
47
48 #endif /* !defined( _ESEDB_TEST_LIBCNOTIFY_H ) */
49
+0
-51
tests/esedb_test_libcstring.h less more
0 /*
1 * The internal libcstring header
2 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _ESEDB_TEST_LIBCSTRING_H )
22 #define _ESEDB_TEST_LIBCSTRING_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBCSTRING for local use of libcstring
27 */
28 #if defined( HAVE_LOCAL_LIBCSTRING )
29
30 #include <libcstring_definitions.h>
31 #include <libcstring_narrow_string.h>
32 #include <libcstring_system_string.h>
33 #include <libcstring_types.h>
34 #include <libcstring_wide_string.h>
35
36 #else
37
38 /* If libtool DLL support is enabled set LIBCSTRING_DLL_IMPORT
39 * before including libcstring.h
40 */
41 #if defined( _WIN32 ) && defined( DLL_IMPORT )
42 #define LIBCSTRING_DLL_IMPORT
43 #endif
44
45 #include <libcstring.h>
46
47 #endif /* defined( HAVE_LOCAL_LIBCSTRING ) */
48
49 #endif /* !defined( _ESEDB_TEST_LIBCSTRING_H ) */
50
+0
-54
tests/esedb_test_libcsystem.h less more
0 /*
1 * Library for system independent implementation of functionality
2 * for programs
3 *
4 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
5 *
6 * Refer to AUTHORS for acknowledgements.
7 *
8 * This software is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This software is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this software. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22 #if !defined( _ESEDB_TEST_LIBCSYSTEM_H )
23 #define _ESEDB_TEST_LIBCSYSTEM_H
24
25 /* Define HAVE_LOCAL_LIBCSYSTEM for local use of libcsystem
26 */
27 #if defined( HAVE_LOCAL_LIBCSYSTEM )
28
29 #include <libcsystem_definitions.h>
30 #include <libcsystem_file_io.h>
31 #include <libcsystem_getopt.h>
32 #include <libcsystem_glob.h>
33 #include <libcsystem_i18n.h>
34 #include <libcsystem_signal.h>
35 #include <libcsystem_string.h>
36 #include <libcsystem_support.h>
37 #include <libcsystem_unused.h>
38
39 #else
40
41 /* If libtool DLL support is enabled set LIBCSYSTEM_DLL_IMPORT
42 * before including libcsystem.h
43 */
44 #if defined( _WIN32 ) && defined( DLL_IMPORT )
45 #define LIBCSYSTEM_DLL_IMPORT
46 #endif
47
48 #include <libcsystem.h>
49
50 #endif /* defined( HAVE_LOCAL_LIBCSYSTEM ) */
51
52 #endif /* !defined( _ESEDB_TEST_LIBCSYSTEM_H ) */
53
00 /*
11 * The internal libesedb header
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
0 /*
1 * The libfdata header wrapper
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _ESEDB_TEST_LIBFDATA_H )
22 #define _ESEDB_TEST_LIBFDATA_H
23
24 #include <common.h>
25
26 /* Define HAVE_LOCAL_LIBFDATA for local use of libfdata
27 */
28 #if defined( HAVE_LOCAL_LIBFDATA )
29
30 #include <libfdata_area.h>
31 #include <libfdata_btree.h>
32 #include <libfdata_definitions.h>
33 #include <libfdata_list.h>
34 #include <libfdata_list_element.h>
35 #include <libfdata_range_list.h>
36 #include <libfdata_stream.h>
37 #include <libfdata_tree.h>
38 #include <libfdata_tree_node.h>
39 #include <libfdata_types.h>
40 #include <libfdata_vector.h>
41
42 #else
43
44 /* If libtool DLL support is enabled set LIBFDATA_DLL_IMPORT
45 * before including libfdata.h
46 */
47 #if defined( _WIN32 ) && defined( DLL_IMPORT )
48 #define LIBFDATA_DLL_IMPORT
49 #endif
50
51 #include <libfdata.h>
52
53 #endif /* defined( HAVE_LOCAL_LIBFDATA ) */
54
55 #endif /* !defined( _ESEDB_TEST_LIBFDATA_H ) */
56
0 /*
1 * The libuna header wrapper
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * This software is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This software is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this software. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #if !defined( _ESEDB_TEST_LIBUNA_H )
20 #define _ESEDB_TEST_LIBUNA_H
21
22 #include <common.h>
23
24 /* Define HAVE_LOCAL_LIBUNA for local use of libuna
25 */
26 #if defined( HAVE_LOCAL_LIBUNA )
27
28 #include <libuna_base16_stream.h>
29 #include <libuna_base32_stream.h>
30 #include <libuna_base64_stream.h>
31 #include <libuna_byte_stream.h>
32 #include <libuna_unicode_character.h>
33 #include <libuna_url_stream.h>
34 #include <libuna_utf16_stream.h>
35 #include <libuna_utf16_string.h>
36 #include <libuna_utf32_stream.h>
37 #include <libuna_utf32_string.h>
38 #include <libuna_utf7_stream.h>
39 #include <libuna_utf8_stream.h>
40 #include <libuna_utf8_string.h>
41 #include <libuna_types.h>
42
43 #else
44
45 /* If libtool DLL support is enabled set LIBUNA_DLL_IMPORT
46 * before including libuna.h
47 */
48 #if defined( _WIN32 ) && defined( DLL_IMPORT )
49 #define LIBUNA_DLL_IMPORT
50 #endif
51
52 #include <libuna.h>
53
54 #endif /* defined( HAVE_LOCAL_LIBUNA ) */
55
56 #endif /* !defined( _ESEDB_TEST_LIBUNA_H ) */
57
0 /*
1 * Library long_value type test program
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <types.h>
24
25 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
26 #include <stdlib.h>
27 #endif
28
29 #include "esedb_test_libcerror.h"
30 #include "esedb_test_libesedb.h"
31 #include "esedb_test_macros.h"
32 #include "esedb_test_memory.h"
33 #include "esedb_test_unused.h"
34
35 #include "../libesedb/libesedb_long_value.h"
36
37 /* Tests the libesedb_long_value_free function
38 * Returns 1 if successful or 0 if not
39 */
40 int esedb_test_long_value_free(
41 void )
42 {
43 libcerror_error_t *error = NULL;
44 int result = 0;
45
46 /* Test error cases
47 */
48 result = libesedb_long_value_free(
49 NULL,
50 &error );
51
52 ESEDB_TEST_ASSERT_EQUAL_INT(
53 "result",
54 result,
55 -1 );
56
57 ESEDB_TEST_ASSERT_IS_NOT_NULL(
58 "error",
59 error );
60
61 libcerror_error_free(
62 &error );
63
64 return( 1 );
65
66 on_error:
67 if( error != NULL )
68 {
69 libcerror_error_free(
70 &error );
71 }
72 return( 0 );
73 }
74
75 #if defined( __GNUC__ )
76
77 #endif /* defined( __GNUC__ ) */
78
79 /* The main program
80 */
81 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
82 int wmain(
83 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
84 wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
85 #else
86 int main(
87 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
88 char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
89 #endif
90 {
91 ESEDB_TEST_UNREFERENCED_PARAMETER( argc )
92 ESEDB_TEST_UNREFERENCED_PARAMETER( argv )
93
94 #if defined( __GNUC__ )
95
96 /* TODO: add tests for libesedb_long_value_initialize */
97
98 #endif /* defined( __GNUC__ ) */
99
100 ESEDB_TEST_RUN(
101 "libesedb_long_value_free",
102 esedb_test_long_value_free );
103
104 #if defined( __GNUC__ )
105
106 /* TODO: add tests for libesedb_long_value_get_data_size */
107
108 /* TODO: add tests for libesedb_long_value_get_data */
109
110 /* TODO: add tests for libesedb_long_value_get_record_value */
111
112 /* TODO: add tests for libesedb_long_value_get_number_of_data_segments */
113
114 /* TODO: add tests for libesedb_long_value_get_data_segment_size */
115
116 /* TODO: add tests for libesedb_long_value_get_data_segment */
117
118 /* TODO: add tests for libesedb_long_value_get_utf8_string_size */
119
120 /* TODO: add tests for libesedb_long_value_get_utf8_string */
121
122 /* TODO: add tests for libesedb_long_value_get_utf16_string_size */
123
124 /* TODO: add tests for libesedb_long_value_get_utf16_string */
125
126 /* TODO: add tests for libesedb_long_value_get_number_of_segments */
127
128 /* TODO: add tests for libesedb_long_value_get_segment_data */
129
130 #endif /* defined( __GNUC__ ) */
131
132 return( EXIT_SUCCESS );
133
134 on_error:
135 return( EXIT_FAILURE );
136 }
137
0 /*
1 * Macros for testing
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _ESEDB_TEST_MACROS_H )
22 #define _ESEDB_TEST_MACROS_H
23
24 #include <common.h>
25 #include <file_stream.h>
26
27 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
28 #include <stdlib.h>
29 #endif
30
31 #define ESEDB_TEST_ASSERT_EQUAL_INT( name, value, expected_value ) \
32 if( value != expected_value ) \
33 { \
34 fprintf( stdout, "%s:%d %s (%d) != %d\n", __FILE__, __LINE__, name, value, expected_value ); \
35 goto on_error; \
36 }
37
38 #define ESEDB_TEST_ASSERT_NOT_EQUAL_INT( name, value, expected_value ) \
39 if( value == expected_value ) \
40 { \
41 fprintf( stdout, "%s:%d %s (%d) == %d\n", __FILE__, __LINE__, name, value, expected_value ); \
42 goto on_error; \
43 }
44
45 #define ESEDB_TEST_ASSERT_GREATER_THAN_INT( name, value, expected_value ) \
46 if( value <= expected_value ) \
47 { \
48 fprintf( stdout, "%s:%d %s (%d) <= %d\n", __FILE__, __LINE__, name, value, expected_value ); \
49 goto on_error; \
50 }
51
52 #define ESEDB_TEST_ASSERT_LESS_THAN_INT( name, value, expected_value ) \
53 if( value >= expected_value ) \
54 { \
55 fprintf( stdout, "%s:%d %s (%d) >= %d\n", __FILE__, __LINE__, name, value, expected_value ); \
56 goto on_error; \
57 }
58
59 #define ESEDB_TEST_ASSERT_EQUAL_SIZE( name, value, expected_value ) \
60 if( value != expected_value ) \
61 { \
62 fprintf( stdout, "%s:%d %s (%" PRIzd ") != %" PRIzd "\n", __FILE__, __LINE__, name, value, expected_value ); \
63 goto on_error; \
64 }
65
66 #define ESEDB_TEST_ASSERT_EQUAL_SSIZE( name, value, expected_value ) \
67 if( value != expected_value ) \
68 { \
69 fprintf( stdout, "%s:%d %s (%" PRIzd ") != %" PRIzd "\n", __FILE__, __LINE__, name, value, expected_value ); \
70 goto on_error; \
71 }
72
73 #define ESEDB_TEST_ASSERT_EQUAL_INT32( name, value, expected_value ) \
74 if( value != expected_value ) \
75 { \
76 fprintf( stdout, "%s:%d %s (%" PRIi32 ") != %" PRIi32 "\n", __FILE__, __LINE__, name, value, expected_value ); \
77 goto on_error; \
78 }
79
80 #define ESEDB_TEST_ASSERT_EQUAL_UINT32( name, value, expected_value ) \
81 if( value != expected_value ) \
82 { \
83 fprintf( stdout, "%s:%d %s (%" PRIi32 ") != %" PRIu32 "\n", __FILE__, __LINE__, name, value, expected_value ); \
84 goto on_error; \
85 }
86
87 #define ESEDB_TEST_ASSERT_LESS_THAN_UINT32( name, value, expected_value ) \
88 if( value >= expected_value ) \
89 { \
90 fprintf( stdout, "%s:%d %s (%" PRIi32 ") >= %" PRIu32 "\n", __FILE__, __LINE__, name, value, expected_value ); \
91 goto on_error; \
92 }
93
94 #define ESEDB_TEST_ASSERT_EQUAL_INT64( name, value, expected_value ) \
95 if( value != expected_value ) \
96 { \
97 fprintf( stdout, "%s:%d %s (%" PRIi64 ") != %" PRIi64 "\n", __FILE__, __LINE__, name, value, expected_value ); \
98 goto on_error; \
99 }
100
101 #define ESEDB_TEST_ASSERT_NOT_EQUAL_INT64( name, value, expected_value ) \
102 if( value == expected_value ) \
103 { \
104 fprintf( stdout, "%s:%d %s (%" PRIi64 ") == %" PRIi64 "\n", __FILE__, __LINE__, name, value, expected_value ); \
105 goto on_error; \
106 }
107
108 #define ESEDB_TEST_ASSERT_EQUAL_UINT64( name, value, expected_value ) \
109 if( value != expected_value ) \
110 { \
111 fprintf( stdout, "%s:%d %s (%" PRIu64 ") != %" PRIu64 "\n", __FILE__, __LINE__, name, value, expected_value ); \
112 goto on_error; \
113 }
114
115 #define ESEDB_TEST_ASSERT_LESS_THAN_UINT64( name, value, expected_value ) \
116 if( value >= expected_value ) \
117 { \
118 fprintf( stdout, "%s:%d %s (%" PRIu64 ") >= %" PRIu64 "\n", __FILE__, __LINE__, name, value, expected_value ); \
119 goto on_error; \
120 }
121
122 #define ESEDB_TEST_ASSERT_IS_NOT_NULL( name, value ) \
123 if( value == NULL ) \
124 { \
125 fprintf( stdout, "%s:%d %s == NULL\n", __FILE__, __LINE__, name ); \
126 goto on_error; \
127 }
128
129 #define ESEDB_TEST_ASSERT_IS_NULL( name, value ) \
130 if( value != NULL ) \
131 { \
132 fprintf( stdout, "%s:%d %s != NULL\n", __FILE__, __LINE__, name ); \
133 goto on_error; \
134 }
135
136 #define ESEDB_TEST_RUN( name, function ) \
137 if( function() != 1 ) \
138 { \
139 fprintf( stdout, "Unable to run test: %s\n", name ); \
140 goto on_error; \
141 }
142
143 #if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )
144
145 #define ESEDB_TEST_RUN_WITH_ARGS( name, function, ... ) \
146 if( function( __VA_ARGS__ ) != 1 ) \
147 { \
148 fprintf( stdout, "Unable to run test: %s\n", name ); \
149 goto on_error; \
150 }
151
152 #endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */
153
154 #define ESEDB_TEST_FPRINT_ERROR( error ) \
155 libcerror_error_backtrace_fprint( error, stdout );
156
157 #endif /* !defined( _ESEDB_TEST_MACROS_H ) */
158
0 /*
1 * Memory allocation functions for testing
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22
23 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
24 #include <stdlib.h>
25 #endif
26
27 #if defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) && !defined( __clang__ )
28 #define __USE_GNU
29 #include <dlfcn.h>
30 #undef __USE_GNU
31 #endif
32
33 #if defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) && !defined( __clang__ )
34
35 static void *(*esedb_test_real_malloc)(size_t) = NULL;
36 static void *(*esedb_test_real_memcpy)(void *, void *, size_t) = NULL;
37 static void *(*esedb_test_real_memset)(void *, int, size_t) = NULL;
38 static void *(*esedb_test_real_realloc)(void *, size_t) = NULL;
39
40 int esedb_test_malloc_attempts_before_fail = -1;
41 int esedb_test_memcpy_attempts_before_fail = -1;
42 int esedb_test_memset_attempts_before_fail = -1;
43 int esedb_test_realloc_attempts_before_fail = -1;
44
45 /* Custom malloc for testing memory error cases
46 * Note this function might fail if compiled with optimation
47 * Returns a pointer to newly allocated data or NULL
48 */
49 void *malloc(
50 size_t size )
51 {
52 void *ptr = NULL;
53
54 if( esedb_test_real_malloc == NULL )
55 {
56 esedb_test_real_malloc = dlsym(
57 RTLD_NEXT,
58 "malloc" );
59 }
60 if( esedb_test_malloc_attempts_before_fail == 0 )
61 {
62 esedb_test_malloc_attempts_before_fail = -1;
63
64 return( NULL );
65 }
66 else if( esedb_test_malloc_attempts_before_fail > 0 )
67 {
68 esedb_test_malloc_attempts_before_fail--;
69 }
70 ptr = esedb_test_real_malloc(
71 size );
72
73 return( ptr );
74 }
75
76 /* Custom memcpy for testing memory error cases
77 * Note this function might fail if compiled with optimation and as a shared libary
78 * Returns a pointer to newly allocated data or NULL
79 */
80 void *memcpy(
81 void *destination,
82 void *source,
83 size_t size )
84 {
85 if( esedb_test_real_memcpy == NULL )
86 {
87 esedb_test_real_memcpy = dlsym(
88 RTLD_NEXT,
89 "memcpy" );
90 }
91 if( esedb_test_memcpy_attempts_before_fail == 0 )
92 {
93 esedb_test_memcpy_attempts_before_fail = -1;
94
95 return( NULL );
96 }
97 else if( esedb_test_memcpy_attempts_before_fail > 0 )
98 {
99 esedb_test_memcpy_attempts_before_fail--;
100 }
101 destination = esedb_test_real_memcpy(
102 destination,
103 source,
104 size );
105
106 return( destination );
107 }
108
109 /* Custom memset for testing memory error cases
110 * Note this function might fail if compiled with optimation and as a shared libary
111 * Returns a pointer to newly allocated data or NULL
112 */
113 void *memset(
114 void *ptr,
115 int constant,
116 size_t size )
117 {
118 if( esedb_test_real_memset == NULL )
119 {
120 esedb_test_real_memset = dlsym(
121 RTLD_NEXT,
122 "memset" );
123 }
124 if( esedb_test_memset_attempts_before_fail == 0 )
125 {
126 esedb_test_memset_attempts_before_fail = -1;
127
128 return( NULL );
129 }
130 else if( esedb_test_memset_attempts_before_fail > 0 )
131 {
132 esedb_test_memset_attempts_before_fail--;
133 }
134 ptr = esedb_test_real_memset(
135 ptr,
136 constant,
137 size );
138
139 return( ptr );
140 }
141
142 /* Custom realloc for testing memory error cases
143 * Note this function might fail if compiled with optimation
144 * Returns a pointer to reallocated data or NULL
145 */
146 void *realloc(
147 void *ptr,
148 size_t size )
149 {
150 if( esedb_test_real_realloc == NULL )
151 {
152 esedb_test_real_realloc = dlsym(
153 RTLD_NEXT,
154 "realloc" );
155 }
156 if( esedb_test_realloc_attempts_before_fail == 0 )
157 {
158 esedb_test_realloc_attempts_before_fail = -1;
159
160 return( NULL );
161 }
162 else if( esedb_test_realloc_attempts_before_fail > 0 )
163 {
164 esedb_test_realloc_attempts_before_fail--;
165 }
166 ptr = esedb_test_real_realloc(
167 ptr,
168 size );
169
170 return( ptr );
171 }
172
173 #endif /* defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) && !defined( __clang__ ) */
174
0 /*
1 * Memory allocation functions for testing
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #if !defined( _ESEDB_TEST_MEMORY_H )
22 #define _ESEDB_TEST_MEMORY_H
23
24 #include <common.h>
25
26 #if defined( __cplusplus )
27 extern "C" {
28 #endif
29
30 #if defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) && !defined( __clang__ )
31
32 #define HAVE_ESEDB_TEST_MEMORY 1
33
34 extern int esedb_test_malloc_attempts_before_fail;
35
36 extern int esedb_test_memcpy_attempts_before_fail;
37
38 extern int esedb_test_memset_attempts_before_fail;
39
40 extern int esedb_test_realloc_attempts_before_fail;
41
42 #endif /* defined( HAVE_GNU_DL_DLSYM ) && defined( __GNUC__ ) && !defined( __clang__ ) */
43
44 #if defined( __cplusplus )
45 }
46 #endif
47
48 #endif /* !defined( _ESEDB_TEST_MEMORY_H ) */
49
0 /*
1 * Library multi_value type test program
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <types.h>
24
25 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
26 #include <stdlib.h>
27 #endif
28
29 #include "esedb_test_libcerror.h"
30 #include "esedb_test_libesedb.h"
31 #include "esedb_test_macros.h"
32 #include "esedb_test_memory.h"
33 #include "esedb_test_unused.h"
34
35 #include "../libesedb/libesedb_multi_value.h"
36
37 /* Tests the libesedb_multi_value_free function
38 * Returns 1 if successful or 0 if not
39 */
40 int esedb_test_multi_value_free(
41 void )
42 {
43 libcerror_error_t *error = NULL;
44 int result = 0;
45
46 /* Test error cases
47 */
48 result = libesedb_multi_value_free(
49 NULL,
50 &error );
51
52 ESEDB_TEST_ASSERT_EQUAL_INT(
53 "result",
54 result,
55 -1 );
56
57 ESEDB_TEST_ASSERT_IS_NOT_NULL(
58 "error",
59 error );
60
61 libcerror_error_free(
62 &error );
63
64 return( 1 );
65
66 on_error:
67 if( error != NULL )
68 {
69 libcerror_error_free(
70 &error );
71 }
72 return( 0 );
73 }
74
75 #if defined( __GNUC__ )
76
77 #endif /* defined( __GNUC__ ) */
78
79 /* The main program
80 */
81 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
82 int wmain(
83 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
84 wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
85 #else
86 int main(
87 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
88 char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
89 #endif
90 {
91 ESEDB_TEST_UNREFERENCED_PARAMETER( argc )
92 ESEDB_TEST_UNREFERENCED_PARAMETER( argv )
93
94 #if defined( __GNUC__ )
95
96 /* TODO: add tests for libesedb_multi_value_initialize */
97
98 #endif /* defined( __GNUC__ ) */
99
100 ESEDB_TEST_RUN(
101 "libesedb_multi_value_free",
102 esedb_test_multi_value_free );
103
104 #if defined( __GNUC__ )
105
106 /* TODO: add tests for libesedb_multi_value_get_column_type */
107
108 /* TODO: add tests for libesedb_multi_value_get_number_of_values */
109
110 /* TODO: add tests for libesedb_multi_value_get_value_data_size */
111
112 /* TODO: add tests for libesedb_multi_value_get_value_data */
113
114 /* TODO: add tests for libesedb_multi_value_get_value */
115
116 /* TODO: add tests for libesedb_multi_value_get_value_8bit */
117
118 /* TODO: add tests for libesedb_multi_value_get_value_16bit */
119
120 /* TODO: add tests for libesedb_multi_value_get_value_32bit */
121
122 /* TODO: add tests for libesedb_multi_value_get_value_64bit */
123
124 /* TODO: add tests for libesedb_multi_value_get_value_floating_point_32bit */
125
126 /* TODO: add tests for libesedb_multi_value_get_value_floating_point_64bit */
127
128 /* TODO: add tests for libesedb_multi_value_get_value_filetime */
129
130 /* TODO: add tests for libesedb_multi_value_get_value_utf8_string_size */
131
132 /* TODO: add tests for libesedb_multi_value_get_value_utf8_string */
133
134 /* TODO: add tests for libesedb_multi_value_get_value_utf16_string_size */
135
136 /* TODO: add tests for libesedb_multi_value_get_value_utf16_string */
137
138 /* TODO: add tests for libesedb_multi_value_get_value_binary_data_size */
139
140 /* TODO: add tests for libesedb_multi_value_get_value_binary_data */
141
142 #endif /* defined( __GNUC__ ) */
143
144 return( EXIT_SUCCESS );
145
146 on_error:
147 return( EXIT_FAILURE );
148 }
149
0 /*
1 * Library notification functions test program
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <types.h>
24
25 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
26 #include <stdlib.h>
27 #endif
28
29 #include "esedb_test_libesedb.h"
30 #include "esedb_test_macros.h"
31 #include "esedb_test_unused.h"
32
33 /* Tests the libesedb_notify_set_verbose function
34 * Returns 1 if successful or 0 if not
35 */
36 int esedb_test_notify_set_verbose(
37 void )
38 {
39 /* Test invocation of function only
40 */
41 libesedb_notify_set_verbose(
42 0 );
43
44 return( 1 );
45 }
46
47 /* Tests the libesedb_notify_set_stream function
48 * Returns 1 if successful or 0 if not
49 */
50 int esedb_test_notify_set_stream(
51 void )
52 {
53 /* Test invocation of function only
54 */
55 libesedb_notify_set_stream(
56 NULL,
57 NULL );
58
59 return( 1 );
60 }
61
62 /* Tests the libesedb_notify_stream_open function
63 * Returns 1 if successful or 0 if not
64 */
65 int esedb_test_notify_stream_open(
66 void )
67 {
68 /* Test invocation of function only
69 */
70 libesedb_notify_stream_open(
71 NULL,
72 NULL );
73
74 return( 1 );
75 }
76
77 /* Tests the libesedb_notify_stream_close function
78 * Returns 1 if successful or 0 if not
79 */
80 int esedb_test_notify_stream_close(
81 void )
82 {
83 /* Test invocation of function only
84 */
85 libesedb_notify_stream_close(
86 NULL );
87
88 return( 1 );
89 }
90
91 /* The main program
92 */
93 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
94 int wmain(
95 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
96 wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
97 #else
98 int main(
99 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
100 char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
101 #endif
102 {
103 ESEDB_TEST_UNREFERENCED_PARAMETER( argc )
104 ESEDB_TEST_UNREFERENCED_PARAMETER( argv )
105
106 ESEDB_TEST_RUN(
107 "libesedb_notify_set_verbose",
108 esedb_test_notify_set_verbose )
109
110 ESEDB_TEST_RUN(
111 "libesedb_notify_set_stream",
112 esedb_test_notify_set_stream )
113
114 ESEDB_TEST_RUN(
115 "libesedb_notify_stream_open",
116 esedb_test_notify_stream_open )
117
118 ESEDB_TEST_RUN(
119 "libesedb_notify_stream_close",
120 esedb_test_notify_stream_close )
121
122 return( EXIT_SUCCESS );
123
124 on_error:
125 return( EXIT_FAILURE );
126 }
127
+0
-457
tests/esedb_test_open_close.c less more
0 /*
1 * Library open close testing program
2 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23
24 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
25 #include <stdlib.h>
26 #endif
27
28 #include "esedb_test_libcerror.h"
29 #include "esedb_test_libcstring.h"
30 #include "esedb_test_libcsystem.h"
31 #include "esedb_test_libesedb.h"
32
33 /* Tests single open and close of a file
34 * Returns 1 if successful, 0 if not or -1 on error
35 */
36 int esedb_test_single_open_close_file(
37 libcstring_system_character_t *filename,
38 int access_flags,
39 int expected_result )
40 {
41 libcerror_error_t *error = NULL;
42 libesedb_file_t *file = NULL;
43 static char *function = "esedb_test_single_open_close_file";
44 char *access_string = NULL;
45 int result = 0;
46
47 if( access_flags == LIBESEDB_OPEN_READ )
48 {
49 access_string = "read";
50 }
51 else if( access_flags == LIBESEDB_OPEN_WRITE )
52 {
53 access_string = "write";
54 }
55 else
56 {
57 access_string = "UNKNOWN";
58 }
59 fprintf(
60 stdout,
61 "Testing single open close of: " );
62
63 if( filename != NULL )
64 {
65 fprintf(
66 stdout,
67 "%" PRIs_LIBCSTRING_SYSTEM "",
68 filename );
69 }
70 else
71 {
72 fprintf(
73 stdout,
74 "NULL" );
75 }
76 fprintf(
77 stdout,
78 " with access: %s\t",
79 access_string );
80
81 if( libesedb_file_initialize(
82 &file,
83 &error ) != 1 )
84 {
85 libcerror_error_set(
86 &error,
87 LIBCERROR_ERROR_DOMAIN_RUNTIME,
88 LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,
89 "%s: unable to create file.",
90 function );
91
92 goto on_error;
93 }
94 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
95 result = libesedb_file_open_wide(
96 file,
97 filename,
98 access_flags,
99 &error );
100 #else
101 result = libesedb_file_open(
102 file,
103 filename,
104 access_flags,
105 &error );
106 #endif
107 if( result == 1 )
108 {
109 if( libesedb_file_close(
110 file,
111 &error ) != 0 )
112 {
113 libcerror_error_set(
114 &error,
115 LIBCERROR_ERROR_DOMAIN_IO,
116 LIBCERROR_IO_ERROR_CLOSE_FAILED,
117 "%s: unable to close file.",
118 function );
119
120 goto on_error;
121 }
122 }
123 if( libesedb_file_free(
124 &file,
125 &error ) != 1 )
126 {
127 libcerror_error_set(
128 &error,
129 LIBCERROR_ERROR_DOMAIN_RUNTIME,
130 LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,
131 "%s: unable to free file.",
132 function );
133
134 goto on_error;
135 }
136 result = ( expected_result == result );
137
138 if( result == 1 )
139 {
140 fprintf(
141 stdout,
142 "(PASS)" );
143 }
144 else
145 {
146 fprintf(
147 stdout,
148 "(FAIL)" );
149 }
150 fprintf(
151 stdout,
152 "\n" );
153
154 if( error != NULL )
155 {
156 libcerror_error_backtrace_fprint(
157 error,
158 stderr );
159 libcerror_error_free(
160 &error );
161 }
162 return( result );
163
164 on_error:
165 if( error != NULL )
166 {
167 libcerror_error_backtrace_fprint(
168 error,
169 stderr );
170 libcerror_error_free(
171 &error );
172 }
173 if( file != NULL )
174 {
175 libesedb_file_free(
176 &file,
177 NULL);
178 }
179 return( -1 );
180 }
181
182 /* Tests multiple open and close of a file
183 * Returns 1 if successful, 0 if not or -1 on error
184 */
185 int esedb_test_multi_open_close_file(
186 libcstring_system_character_t *filename,
187 int access_flags,
188 int expected_result )
189 {
190 libcerror_error_t *error = NULL;
191 libesedb_file_t *file = NULL;
192 static char *function = "esedb_test_multi_open_close_file";
193 char *access_string = NULL;
194 int result = 0;
195
196 if( access_flags == LIBESEDB_OPEN_READ )
197 {
198 access_string = "read";
199 }
200 else if( access_flags == LIBESEDB_OPEN_WRITE )
201 {
202 access_string = "write";
203 }
204 else
205 {
206 access_string = "UNKNOWN";
207 }
208 fprintf(
209 stdout,
210 "Testing multi open close of: " );
211
212 if( filename != NULL )
213 {
214 fprintf(
215 stdout,
216 "%" PRIs_LIBCSTRING_SYSTEM "",
217 filename );
218 }
219 else
220 {
221 fprintf(
222 stdout,
223 "NULL" );
224 }
225 fprintf(
226 stdout,
227 " with access: %s\t",
228 access_string );
229
230 if( libesedb_file_initialize(
231 &file,
232 &error ) != 1 )
233 {
234 libcerror_error_set(
235 &error,
236 LIBCERROR_ERROR_DOMAIN_RUNTIME,
237 LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED,
238 "%s: unable to create file.",
239 function );
240
241 goto on_error;
242 }
243 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
244 result = libesedb_file_open_wide(
245 file,
246 filename,
247 access_flags,
248 &error );
249 #else
250 result = libesedb_file_open(
251 file,
252 filename,
253 access_flags,
254 &error );
255 #endif
256 if( result == 1 )
257 {
258 if( libesedb_file_close(
259 file,
260 &error ) != 0 )
261 {
262 libcerror_error_set(
263 &error,
264 LIBCERROR_ERROR_DOMAIN_IO,
265 LIBCERROR_IO_ERROR_CLOSE_FAILED,
266 "%s: unable to close file.",
267 function );
268
269 goto on_error;
270 }
271 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
272 result = libesedb_file_open_wide(
273 file,
274 filename,
275 access_flags,
276 &error );
277 #else
278 result = libesedb_file_open(
279 file,
280 filename,
281 access_flags,
282 &error );
283 #endif
284 if( result == 1 )
285 {
286 if( libesedb_file_close(
287 file,
288 &error ) != 0 )
289 {
290 libcerror_error_set(
291 &error,
292 LIBCERROR_ERROR_DOMAIN_IO,
293 LIBCERROR_IO_ERROR_CLOSE_FAILED,
294 "%s: unable to close file.",
295 function );
296
297 goto on_error;
298 }
299 }
300 }
301 if( libesedb_file_free(
302 &file,
303 &error ) != 1 )
304 {
305 libcerror_error_set(
306 &error,
307 LIBCERROR_ERROR_DOMAIN_RUNTIME,
308 LIBCERROR_RUNTIME_ERROR_FINALIZE_FAILED,
309 "%s: unable to free file.",
310 function );
311
312 goto on_error;
313 }
314 result = ( expected_result == result );
315
316 if( result == 1 )
317 {
318 fprintf(
319 stdout,
320 "(PASS)" );
321 }
322 else
323 {
324 fprintf(
325 stdout,
326 "(FAIL)" );
327 }
328 fprintf(
329 stdout,
330 "\n" );
331
332 if( error != NULL )
333 {
334 libcerror_error_backtrace_fprint(
335 error,
336 stderr );
337 libcerror_error_free(
338 &error );
339 }
340 return( result );
341
342 on_error:
343 if( error != NULL )
344 {
345 libcerror_error_backtrace_fprint(
346 error,
347 stderr );
348 libcerror_error_free(
349 &error );
350 }
351 if( file != NULL )
352 {
353 libesedb_file_free(
354 &file,
355 NULL);
356 }
357 return( -1 );
358 }
359
360 /* The main program
361 */
362 #if defined( LIBCSTRING_HAVE_WIDE_SYSTEM_CHARACTER )
363 int wmain( int argc, wchar_t * const argv[] )
364 #else
365 int main( int argc, char * const argv[] )
366 #endif
367 {
368 libcstring_system_character_t *source = NULL;
369 libcstring_system_integer_t option = 0;
370
371 while( ( option = libcsystem_getopt(
372 argc,
373 argv,
374 _LIBCSTRING_SYSTEM_STRING( "" ) ) ) != (libcstring_system_integer_t) -1 )
375 {
376 switch( option )
377 {
378 case (libcstring_system_integer_t) '?':
379 default:
380 fprintf(
381 stderr,
382 "Invalid argument: %" PRIs_LIBCSTRING_SYSTEM ".\n",
383 argv[ optind - 1 ] );
384
385 return( EXIT_FAILURE );
386 }
387 }
388 if( optind == argc )
389 {
390 fprintf(
391 stderr,
392 "Missing source file or device.\n" );
393
394 return( EXIT_FAILURE );
395 }
396 source = argv[ optind ];
397
398 #if defined( HAVE_DEBUG_OUTPUT ) && defined( ESEDB_TEST_OPEN_CLOSE_VERBOSE )
399 libesedb_notify_set_verbose(
400 1 );
401 libesedb_notify_set_stream(
402 stderr,
403 NULL );
404 #endif
405
406 /* Case 0: single open and close of a file using filename
407 */
408 if( esedb_test_single_open_close_file(
409 source,
410 LIBESEDB_OPEN_READ,
411 1 ) != 1 )
412 {
413 fprintf(
414 stderr,
415 "Unable to test single open close.\n" );
416
417 return( EXIT_FAILURE );
418 }
419 if( esedb_test_single_open_close_file(
420 NULL,
421 LIBESEDB_OPEN_READ,
422 -1 ) != 1 )
423 {
424 fprintf(
425 stderr,
426 "Unable to test single open close.\n" );
427
428 return( EXIT_FAILURE );
429 }
430 if( esedb_test_single_open_close_file(
431 source,
432 LIBESEDB_OPEN_WRITE,
433 -1 ) != 1 )
434 {
435 fprintf(
436 stderr,
437 "Unable to test single open close.\n" );
438
439 return( EXIT_FAILURE );
440 }
441 /* Case 1: multiple open and close of a file using filename
442 */
443 if( esedb_test_multi_open_close_file(
444 source,
445 LIBESEDB_OPEN_READ,
446 1 ) != 1 )
447 {
448 fprintf(
449 stderr,
450 "Unable to test multi open close.\n" );
451
452 return( EXIT_FAILURE );
453 }
454 return( EXIT_SUCCESS );
455 }
456
0 /*
1 * Library page type testing program
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <types.h>
24
25 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
26 #include <stdlib.h>
27 #endif
28
29 #include "esedb_test_libcerror.h"
30 #include "esedb_test_libesedb.h"
31 #include "esedb_test_macros.h"
32 #include "esedb_test_memory.h"
33 #include "esedb_test_unused.h"
34
35 #include "../libesedb/libesedb_page.h"
36
37 #if defined( __GNUC__ )
38
39 /* Tests the libesedb_page_initialize function
40 * Returns 1 if successful or 0 if not
41 */
42 int esedb_test_page_initialize(
43 void )
44 {
45 libcerror_error_t *error = NULL;
46 libesedb_page_t *page = NULL;
47 int result = 0;
48
49 /* Test page initialization
50 */
51 result = libesedb_page_initialize(
52 &page,
53 &error );
54
55 ESEDB_TEST_ASSERT_EQUAL_INT(
56 "result",
57 result,
58 1 );
59
60 ESEDB_TEST_ASSERT_IS_NOT_NULL(
61 "page",
62 page );
63
64 ESEDB_TEST_ASSERT_IS_NULL(
65 "error",
66 error );
67
68 result = libesedb_page_free(
69 &page,
70 &error );
71
72 ESEDB_TEST_ASSERT_EQUAL_INT(
73 "result",
74 result,
75 1 );
76
77 ESEDB_TEST_ASSERT_IS_NULL(
78 "page",
79 page );
80
81 ESEDB_TEST_ASSERT_IS_NULL(
82 "error",
83 error );
84
85 /* Test error cases
86 */
87 result = libesedb_page_initialize(
88 NULL,
89 &error );
90
91 ESEDB_TEST_ASSERT_EQUAL_INT(
92 "result",
93 result,
94 -1 );
95
96 ESEDB_TEST_ASSERT_IS_NOT_NULL(
97 "error",
98 error );
99
100 libcerror_error_free(
101 &error );
102
103 page = (libesedb_page_t *) 0x12345678UL;
104
105 result = libesedb_page_initialize(
106 &page,
107 &error );
108
109 ESEDB_TEST_ASSERT_EQUAL_INT(
110 "result",
111 result,
112 -1 );
113
114 ESEDB_TEST_ASSERT_IS_NOT_NULL(
115 "error",
116 error );
117
118 libcerror_error_free(
119 &error );
120
121 page = NULL;
122
123 #if defined( HAVE_ESEDB_TEST_MEMORY )
124
125 /* Test libesedb_page_initialize with malloc failing
126 */
127 esedb_test_malloc_attempts_before_fail = 0;
128
129 result = libesedb_page_initialize(
130 &page,
131 &error );
132
133 if( esedb_test_malloc_attempts_before_fail != -1 )
134 {
135 esedb_test_malloc_attempts_before_fail = -1;
136
137 if( page != NULL )
138 {
139 libesedb_page_free(
140 &page,
141 NULL );
142 }
143 }
144 else
145 {
146 ESEDB_TEST_ASSERT_EQUAL_INT(
147 "result",
148 result,
149 -1 );
150
151 ESEDB_TEST_ASSERT_IS_NULL(
152 "page",
153 page );
154
155 ESEDB_TEST_ASSERT_IS_NOT_NULL(
156 "error",
157 error );
158
159 libcerror_error_free(
160 &error );
161 }
162 /* Test libesedb_page_initialize with memset failing
163 */
164 esedb_test_memset_attempts_before_fail = 0;
165
166 result = libesedb_page_initialize(
167 &page,
168 &error );
169
170 if( esedb_test_memset_attempts_before_fail != -1 )
171 {
172 esedb_test_memset_attempts_before_fail = -1;
173
174 if( page != NULL )
175 {
176 libesedb_page_free(
177 &page,
178 NULL );
179 }
180 }
181 else
182 {
183 ESEDB_TEST_ASSERT_EQUAL_INT(
184 "result",
185 result,
186 -1 );
187
188 ESEDB_TEST_ASSERT_IS_NULL(
189 "page",
190 page );
191
192 ESEDB_TEST_ASSERT_IS_NOT_NULL(
193 "error",
194 error );
195
196 libcerror_error_free(
197 &error );
198 }
199 #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */
200
201 return( 1 );
202
203 on_error:
204 if( error != NULL )
205 {
206 libcerror_error_free(
207 &error );
208 }
209 if( page != NULL )
210 {
211 libesedb_page_free(
212 &page,
213 NULL );
214 }
215 return( 0 );
216 }
217
218 /* Tests the libesedb_page_free function
219 * Returns 1 if successful or 0 if not
220 */
221 int esedb_test_page_free(
222 void )
223 {
224 libcerror_error_t *error = NULL;
225 int result = 0;
226
227 /* Test error cases
228 */
229 result = libesedb_page_free(
230 NULL,
231 &error );
232
233 ESEDB_TEST_ASSERT_EQUAL_INT(
234 "result",
235 result,
236 -1 );
237
238 ESEDB_TEST_ASSERT_IS_NOT_NULL(
239 "error",
240 error );
241
242 libcerror_error_free(
243 &error );
244
245 return( 1 );
246
247 on_error:
248 if( error != NULL )
249 {
250 libcerror_error_free(
251 &error );
252 }
253 return( 0 );
254 }
255
256 #endif /* defined( __GNUC__ ) */
257
258 /* The main program
259 */
260 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
261 int wmain(
262 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
263 wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
264 #else
265 int main(
266 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
267 char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
268 #endif
269 {
270 ESEDB_TEST_UNREFERENCED_PARAMETER( argc )
271 ESEDB_TEST_UNREFERENCED_PARAMETER( argv )
272
273 #if defined( __GNUC__ )
274
275 ESEDB_TEST_RUN(
276 "libesedb_page_initialize",
277 esedb_test_page_initialize );
278
279 ESEDB_TEST_RUN(
280 "libesedb_page_free",
281 esedb_test_page_free );
282
283 #endif /* defined( __GNUC__ ) */
284
285 return( EXIT_SUCCESS );
286
287 on_error:
288 return( EXIT_FAILURE );
289 }
290
0 /*
1 * Library page_tree type testing program
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <types.h>
24
25 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
26 #include <stdlib.h>
27 #endif
28
29 #include "esedb_test_libcerror.h"
30 #include "esedb_test_libesedb.h"
31 #include "esedb_test_macros.h"
32 #include "esedb_test_memory.h"
33 #include "esedb_test_unused.h"
34
35 #include "../libesedb/libesedb_page_tree.h"
36
37 #if defined( __GNUC__ )
38
39 /* Tests the libesedb_page_tree_free function
40 * Returns 1 if successful or 0 if not
41 */
42 int esedb_test_page_tree_free(
43 void )
44 {
45 libcerror_error_t *error = NULL;
46 int result = 0;
47
48 /* Test error cases
49 */
50 result = libesedb_page_tree_free(
51 NULL,
52 &error );
53
54 ESEDB_TEST_ASSERT_EQUAL_INT(
55 "result",
56 result,
57 -1 );
58
59 ESEDB_TEST_ASSERT_IS_NOT_NULL(
60 "error",
61 error );
62
63 libcerror_error_free(
64 &error );
65
66 return( 1 );
67
68 on_error:
69 if( error != NULL )
70 {
71 libcerror_error_free(
72 &error );
73 }
74 return( 0 );
75 }
76
77 #endif /* defined( __GNUC__ ) */
78
79 /* The main program
80 */
81 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
82 int wmain(
83 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
84 wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
85 #else
86 int main(
87 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
88 char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
89 #endif
90 {
91 ESEDB_TEST_UNREFERENCED_PARAMETER( argc )
92 ESEDB_TEST_UNREFERENCED_PARAMETER( argv )
93
94 #if defined( __GNUC__ )
95
96 /* TODO: add tests for libesedb_page_tree_initialize */
97
98 ESEDB_TEST_RUN(
99 "libesedb_page_tree_free",
100 esedb_test_page_tree_free );
101
102 /* TODO: add tests for libesedb_page_tree_read_root_page */
103
104 /* TODO: add tests for libesedb_page_tree_read_space_tree_page */
105
106 /* TODO: add tests for libesedb_page_tree_read_page */
107
108 /* TODO: add tests for libesedb_page_tree_read_node */
109
110 /* TODO: add tests for libesedb_page_tree_read_leaf_value */
111
112 #endif /* defined( __GNUC__ ) */
113
114 return( EXIT_SUCCESS );
115
116 on_error:
117 return( EXIT_FAILURE );
118 }
119
0 /*
1 * Library page_value type test program
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <types.h>
24
25 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
26 #include <stdlib.h>
27 #endif
28
29 #include "esedb_test_libcerror.h"
30 #include "esedb_test_libesedb.h"
31 #include "esedb_test_macros.h"
32 #include "esedb_test_memory.h"
33 #include "esedb_test_unused.h"
34
35 #include "../libesedb/libesedb_page_value.h"
36
37 #if defined( __GNUC__ )
38
39 /* Tests the libesedb_page_value_initialize function
40 * Returns 1 if successful or 0 if not
41 */
42 int esedb_test_page_value_initialize(
43 void )
44 {
45 libcerror_error_t *error = NULL;
46 libesedb_page_value_t *page_value = NULL;
47 int result = 0;
48
49 #if defined( HAVE_ESEDB_TEST_MEMORY )
50 int number_of_malloc_fail_tests = 1;
51 int number_of_memset_fail_tests = 1;
52 int test_number = 0;
53 #endif
54
55 /* Test regular cases
56 */
57 result = libesedb_page_value_initialize(
58 &page_value,
59 &error );
60
61 ESEDB_TEST_ASSERT_EQUAL_INT(
62 "result",
63 result,
64 1 );
65
66 ESEDB_TEST_ASSERT_IS_NOT_NULL(
67 "page_value",
68 page_value );
69
70 ESEDB_TEST_ASSERT_IS_NULL(
71 "error",
72 error );
73
74 result = libesedb_page_value_free(
75 &page_value,
76 &error );
77
78 ESEDB_TEST_ASSERT_EQUAL_INT(
79 "result",
80 result,
81 1 );
82
83 ESEDB_TEST_ASSERT_IS_NULL(
84 "page_value",
85 page_value );
86
87 ESEDB_TEST_ASSERT_IS_NULL(
88 "error",
89 error );
90
91 /* Test error cases
92 */
93 result = libesedb_page_value_initialize(
94 NULL,
95 &error );
96
97 ESEDB_TEST_ASSERT_EQUAL_INT(
98 "result",
99 result,
100 -1 );
101
102 ESEDB_TEST_ASSERT_IS_NOT_NULL(
103 "error",
104 error );
105
106 libcerror_error_free(
107 &error );
108
109 page_value = (libesedb_page_value_t *) 0x12345678UL;
110
111 result = libesedb_page_value_initialize(
112 &page_value,
113 &error );
114
115 ESEDB_TEST_ASSERT_EQUAL_INT(
116 "result",
117 result,
118 -1 );
119
120 ESEDB_TEST_ASSERT_IS_NOT_NULL(
121 "error",
122 error );
123
124 libcerror_error_free(
125 &error );
126
127 page_value = NULL;
128
129 #if defined( HAVE_ESEDB_TEST_MEMORY )
130
131 for( test_number = 0;
132 test_number < number_of_malloc_fail_tests;
133 test_number++ )
134 {
135 /* Test libesedb_page_value_initialize with malloc failing
136 */
137 esedb_test_malloc_attempts_before_fail = test_number;
138
139 result = libesedb_page_value_initialize(
140 &page_value,
141 &error );
142
143 if( esedb_test_malloc_attempts_before_fail != -1 )
144 {
145 esedb_test_malloc_attempts_before_fail = -1;
146
147 if( page_value != NULL )
148 {
149 libesedb_page_value_free(
150 &page_value,
151 NULL );
152 }
153 }
154 else
155 {
156 ESEDB_TEST_ASSERT_EQUAL_INT(
157 "result",
158 result,
159 -1 );
160
161 ESEDB_TEST_ASSERT_IS_NULL(
162 "page_value",
163 page_value );
164
165 ESEDB_TEST_ASSERT_IS_NOT_NULL(
166 "error",
167 error );
168
169 libcerror_error_free(
170 &error );
171 }
172 }
173 for( test_number = 0;
174 test_number < number_of_memset_fail_tests;
175 test_number++ )
176 {
177 /* Test libesedb_page_value_initialize with memset failing
178 */
179 esedb_test_memset_attempts_before_fail = test_number;
180
181 result = libesedb_page_value_initialize(
182 &page_value,
183 &error );
184
185 if( esedb_test_memset_attempts_before_fail != -1 )
186 {
187 esedb_test_memset_attempts_before_fail = -1;
188
189 if( page_value != NULL )
190 {
191 libesedb_page_value_free(
192 &page_value,
193 NULL );
194 }
195 }
196 else
197 {
198 ESEDB_TEST_ASSERT_EQUAL_INT(
199 "result",
200 result,
201 -1 );
202
203 ESEDB_TEST_ASSERT_IS_NULL(
204 "page_value",
205 page_value );
206
207 ESEDB_TEST_ASSERT_IS_NOT_NULL(
208 "error",
209 error );
210
211 libcerror_error_free(
212 &error );
213 }
214 }
215 #endif /* defined( HAVE_ESEDB_TEST_MEMORY ) */
216
217 return( 1 );
218
219 on_error:
220 if( error != NULL )
221 {
222 libcerror_error_free(
223 &error );
224 }
225 if( page_value != NULL )
226 {
227 libesedb_page_value_free(
228 &page_value,
229 NULL );
230 }
231 return( 0 );
232 }
233
234 /* Tests the libesedb_page_value_free function
235 * Returns 1 if successful or 0 if not
236 */
237 int esedb_test_page_value_free(
238 void )
239 {
240 libcerror_error_t *error = NULL;
241 int result = 0;
242
243 /* Test error cases
244 */
245 result = libesedb_page_value_free(
246 NULL,
247 &error );
248
249 ESEDB_TEST_ASSERT_EQUAL_INT(
250 "result",
251 result,
252 -1 );
253
254 ESEDB_TEST_ASSERT_IS_NOT_NULL(
255 "error",
256 error );
257
258 libcerror_error_free(
259 &error );
260
261 return( 1 );
262
263 on_error:
264 if( error != NULL )
265 {
266 libcerror_error_free(
267 &error );
268 }
269 return( 0 );
270 }
271
272 #endif /* defined( __GNUC__ ) */
273
274 /* The main program
275 */
276 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
277 int wmain(
278 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
279 wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
280 #else
281 int main(
282 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
283 char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
284 #endif
285 {
286 ESEDB_TEST_UNREFERENCED_PARAMETER( argc )
287 ESEDB_TEST_UNREFERENCED_PARAMETER( argv )
288
289 #if defined( __GNUC__ )
290
291 ESEDB_TEST_RUN(
292 "libesedb_page_value_initialize",
293 esedb_test_page_value_initialize );
294
295 ESEDB_TEST_RUN(
296 "libesedb_page_value_free",
297 esedb_test_page_value_free );
298
299 #endif /* defined( __GNUC__ ) */
300
301 return( EXIT_SUCCESS );
302
303 on_error:
304 return( EXIT_FAILURE );
305 }
306
0 /*
1 * Library record type test program
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <types.h>
24
25 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
26 #include <stdlib.h>
27 #endif
28
29 #include "esedb_test_libcerror.h"
30 #include "esedb_test_libesedb.h"
31 #include "esedb_test_macros.h"
32 #include "esedb_test_memory.h"
33 #include "esedb_test_unused.h"
34
35 #include "../libesedb/libesedb_record.h"
36
37 /* Tests the libesedb_record_free function
38 * Returns 1 if successful or 0 if not
39 */
40 int esedb_test_record_free(
41 void )
42 {
43 libcerror_error_t *error = NULL;
44 int result = 0;
45
46 /* Test error cases
47 */
48 result = libesedb_record_free(
49 NULL,
50 &error );
51
52 ESEDB_TEST_ASSERT_EQUAL_INT(
53 "result",
54 result,
55 -1 );
56
57 ESEDB_TEST_ASSERT_IS_NOT_NULL(
58 "error",
59 error );
60
61 libcerror_error_free(
62 &error );
63
64 return( 1 );
65
66 on_error:
67 if( error != NULL )
68 {
69 libcerror_error_free(
70 &error );
71 }
72 return( 0 );
73 }
74
75 #if defined( __GNUC__ )
76
77 #endif /* defined( __GNUC__ ) */
78
79 /* The main program
80 */
81 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
82 int wmain(
83 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
84 wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
85 #else
86 int main(
87 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
88 char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
89 #endif
90 {
91 ESEDB_TEST_UNREFERENCED_PARAMETER( argc )
92 ESEDB_TEST_UNREFERENCED_PARAMETER( argv )
93
94 #if defined( __GNUC__ )
95
96 /* TODO: add tests for libesedb_record_initialize */
97
98 #endif /* defined( __GNUC__ ) */
99
100 ESEDB_TEST_RUN(
101 "libesedb_record_free",
102 esedb_test_record_free );
103
104 #if defined( __GNUC__ )
105
106 /* TODO: add tests for libesedb_record_get_number_of_values */
107
108 /* TODO: add tests for libesedb_record_get_column_catalog_definition */
109
110 /* TODO: add tests for libesedb_record_get_column_identifier */
111
112 /* TODO: add tests for libesedb_record_get_column_type */
113
114 /* TODO: add tests for libesedb_record_get_utf8_column_name_size */
115
116 /* TODO: add tests for libesedb_record_get_utf8_column_name */
117
118 /* TODO: add tests for libesedb_record_get_utf16_column_name_size */
119
120 /* TODO: add tests for libesedb_record_get_utf16_column_name */
121
122 /* TODO: add tests for libesedb_record_get_value */
123
124 /* TODO: add tests for libesedb_record_get_value_data_size */
125
126 /* TODO: add tests for libesedb_record_get_value_data */
127
128 /* TODO: add tests for libesedb_record_get_value_data_flags */
129
130 /* TODO: add tests for libesedb_record_get_value_boolean */
131
132 /* TODO: add tests for libesedb_record_get_value_8bit */
133
134 /* TODO: add tests for libesedb_record_get_value_16bit */
135
136 /* TODO: add tests for libesedb_record_get_value_32bit */
137
138 /* TODO: add tests for libesedb_record_get_value_64bit */
139
140 /* TODO: add tests for libesedb_record_get_value_filetime */
141
142 /* TODO: add tests for libesedb_record_get_value_floating_point_32bit */
143
144 /* TODO: add tests for libesedb_record_get_value_floating_point_64bit */
145
146 /* TODO: add tests for libesedb_record_get_value_utf8_string_size */
147
148 /* TODO: add tests for libesedb_record_get_value_utf8_string */
149
150 /* TODO: add tests for libesedb_record_get_value_utf16_string_size */
151
152 /* TODO: add tests for libesedb_record_get_value_utf16_string */
153
154 /* TODO: add tests for libesedb_record_get_value_binary_data_size */
155
156 /* TODO: add tests for libesedb_record_get_value_binary_data */
157
158 /* TODO: add tests for libesedb_record_is_long_value */
159
160 /* TODO: add tests for libesedb_record_is_multi_value */
161
162 /* TODO: add tests for libesedb_record_get_long_value_data_segments_list */
163
164 /* TODO: add tests for libesedb_record_get_long_value */
165
166 /* TODO: add tests for libesedb_record_get_multi_value */
167
168 #endif /* defined( __GNUC__ ) */
169
170 return( EXIT_SUCCESS );
171
172 on_error:
173 return( EXIT_FAILURE );
174 }
175
0 /*
1 * Library support functions test program
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <narrow_string.h>
24 #include <system_string.h>
25 #include <types.h>
26 #include <wide_string.h>
27
28 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
29 #include <stdlib.h>
30 #endif
31
32 #include "esedb_test_getopt.h"
33 #include "esedb_test_libbfio.h"
34 #include "esedb_test_libcerror.h"
35 #include "esedb_test_libclocale.h"
36 #include "esedb_test_libesedb.h"
37 #include "esedb_test_libuna.h"
38 #include "esedb_test_macros.h"
39 #include "esedb_test_unused.h"
40
41 LIBESEDB_EXTERN \
42 int libesedb_check_file_signature_file_io_handle(
43 libbfio_handle_t *file_io_handle,
44 libcerror_error_t **error );
45
46 /* Retrieves source as a narrow string
47 * Returns 1 if successful or -1 on error
48 */
49 int esedb_test_support_get_narrow_source(
50 const system_character_t *source,
51 char *narrow_string,
52 size_t narrow_string_size,
53 libcerror_error_t **error )
54 {
55 static char *function = "esedb_test_support_get_narrow_source";
56 size_t narrow_source_size = 0;
57 size_t source_length = 0;
58
59 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
60 int result = 0;
61 #endif
62
63 if( source == NULL )
64 {
65 libcerror_error_set(
66 error,
67 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
68 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
69 "%s: invalid source.",
70 function );
71
72 return( -1 );
73 }
74 if( narrow_string == NULL )
75 {
76 libcerror_error_set(
77 error,
78 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
79 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
80 "%s: invalid narrow string.",
81 function );
82
83 return( -1 );
84 }
85 if( narrow_string_size > (size_t) SSIZE_MAX )
86 {
87 libcerror_error_set(
88 error,
89 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
90 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
91 "%s: invalid narrow string size value exceeds maximum.",
92 function );
93
94 return( -1 );
95 }
96 source_length = system_string_length(
97 source );
98
99 if( source_length > (size_t) ( SSIZE_MAX - 1 ) )
100 {
101 libcerror_error_set(
102 error,
103 LIBCERROR_ERROR_DOMAIN_RUNTIME,
104 LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,
105 "%s: invalid source length value out of bounds.",
106 function );
107
108 return( -1 );
109 }
110 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
111 if( libclocale_codepage == 0 )
112 {
113 #if SIZEOF_WCHAR_T == 4
114 result = libuna_utf8_string_size_from_utf32(
115 (libuna_utf32_character_t *) source,
116 source_length + 1,
117 &narrow_source_size,
118 error );
119 #elif SIZEOF_WCHAR_T == 2
120 result = libuna_utf8_string_size_from_utf16(
121 (libuna_utf16_character_t *) source,
122 source_length + 1,
123 &narrow_source_size,
124 error );
125 #endif
126 }
127 else
128 {
129 #if SIZEOF_WCHAR_T == 4
130 result = libuna_byte_stream_size_from_utf32(
131 (libuna_utf32_character_t *) source,
132 source_length + 1,
133 libclocale_codepage,
134 &narrow_source_size,
135 error );
136 #elif SIZEOF_WCHAR_T == 2
137 result = libuna_byte_stream_size_from_utf16(
138 (libuna_utf16_character_t *) source,
139 source_length + 1,
140 libclocale_codepage,
141 &narrow_source_size,
142 error );
143 #endif
144 }
145 if( result != 1 )
146 {
147 libcerror_error_set(
148 error,
149 LIBCERROR_ERROR_DOMAIN_CONVERSION,
150 LIBCERROR_CONVERSION_ERROR_GENERIC,
151 "%s: unable to determine narrow string size.",
152 function );
153
154 return( -1 );
155 }
156 #else
157 narrow_source_size = source_length + 1;
158
159 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
160
161 if( narrow_string_size < narrow_source_size )
162 {
163 libcerror_error_set(
164 error,
165 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
166 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
167 "%s: narrow string too small.",
168 function );
169
170 return( -1 );
171 }
172 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
173 if( libclocale_codepage == 0 )
174 {
175 #if SIZEOF_WCHAR_T == 4
176 result = libuna_utf8_string_copy_from_utf32(
177 (libuna_utf8_character_t *) narrow_string,
178 narrow_string_size,
179 (libuna_utf32_character_t *) source,
180 source_length + 1,
181 error );
182 #elif SIZEOF_WCHAR_T == 2
183 result = libuna_utf8_string_copy_from_utf16(
184 (libuna_utf8_character_t *) narrow_string,
185 narrow_string_size,
186 (libuna_utf16_character_t *) source,
187 source_length + 1,
188 error );
189 #endif
190 }
191 else
192 {
193 #if SIZEOF_WCHAR_T == 4
194 result = libuna_byte_stream_copy_from_utf32(
195 (uint8_t *) narrow_string,
196 narrow_string_size,
197 libclocale_codepage,
198 (libuna_utf32_character_t *) source,
199 source_length + 1,
200 error );
201 #elif SIZEOF_WCHAR_T == 2
202 result = libuna_byte_stream_copy_from_utf16(
203 (uint8_t *) narrow_string,
204 narrow_string_size,
205 libclocale_codepage,
206 (libuna_utf16_character_t *) source,
207 source_length + 1,
208 error );
209 #endif
210 }
211 if( result != 1 )
212 {
213 libcerror_error_set(
214 error,
215 LIBCERROR_ERROR_DOMAIN_CONVERSION,
216 LIBCERROR_CONVERSION_ERROR_GENERIC,
217 "%s: unable to set narrow string.",
218 function );
219
220 return( -1 );
221 }
222 #else
223 if( system_string_copy(
224 narrow_string,
225 source,
226 source_length ) == NULL )
227 {
228 libcerror_error_set(
229 error,
230 LIBCERROR_ERROR_DOMAIN_MEMORY,
231 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
232 "%s: unable to set narrow string.",
233 function );
234
235 return( -1 );
236 }
237 narrow_string[ source_length ] = 0;
238
239 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
240
241 return( 1 );
242 }
243
244 #if defined( HAVE_WIDE_CHARACTER_TYPE )
245
246 /* Retrieves source as a wide string
247 * Returns 1 if successful or -1 on error
248 */
249 int esedb_test_support_get_wide_source(
250 const system_character_t *source,
251 wchar_t *wide_string,
252 size_t wide_string_size,
253 libcerror_error_t **error )
254 {
255 static char *function = "esedb_test_support_get_wide_source";
256 size_t wide_source_size = 0;
257 size_t source_length = 0;
258
259 #if !defined( HAVE_WIDE_SYSTEM_CHARACTER )
260 int result = 0;
261 #endif
262
263 if( source == NULL )
264 {
265 libcerror_error_set(
266 error,
267 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
268 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
269 "%s: invalid source.",
270 function );
271
272 return( -1 );
273 }
274 if( wide_string == NULL )
275 {
276 libcerror_error_set(
277 error,
278 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
279 LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE,
280 "%s: invalid wide string.",
281 function );
282
283 return( -1 );
284 }
285 if( wide_string_size > (size_t) SSIZE_MAX )
286 {
287 libcerror_error_set(
288 error,
289 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
290 LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM,
291 "%s: invalid wide string size value exceeds maximum.",
292 function );
293
294 return( -1 );
295 }
296 source_length = system_string_length(
297 source );
298
299 if( source_length > (size_t) ( SSIZE_MAX - 1 ) )
300 {
301 libcerror_error_set(
302 error,
303 LIBCERROR_ERROR_DOMAIN_RUNTIME,
304 LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS,
305 "%s: invalid source length value out of bounds.",
306 function );
307
308 return( -1 );
309 }
310 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
311 wide_source_size = source_length + 1;
312 #else
313 if( libclocale_codepage == 0 )
314 {
315 #if SIZEOF_WCHAR_T == 4
316 result = libuna_utf32_string_size_from_utf8(
317 (libuna_utf8_character_t *) source,
318 source_length + 1,
319 &wide_source_size,
320 error );
321 #elif SIZEOF_WCHAR_T == 2
322 result = libuna_utf16_string_size_from_utf8(
323 (libuna_utf8_character_t *) source,
324 source_length + 1,
325 &wide_source_size,
326 error );
327 #endif
328 }
329 else
330 {
331 #if SIZEOF_WCHAR_T == 4
332 result = libuna_utf32_string_size_from_byte_stream(
333 (uint8_t *) source,
334 source_length + 1,
335 libclocale_codepage,
336 &wide_source_size,
337 error );
338 #elif SIZEOF_WCHAR_T == 2
339 result = libuna_utf16_string_size_from_byte_stream(
340 (uint8_t *) source,
341 source_length + 1,
342 libclocale_codepage,
343 &wide_source_size,
344 error );
345 #endif
346 }
347 if( result != 1 )
348 {
349 libcerror_error_set(
350 error,
351 LIBCERROR_ERROR_DOMAIN_CONVERSION,
352 LIBCERROR_CONVERSION_ERROR_GENERIC,
353 "%s: unable to determine wide string size.",
354 function );
355
356 return( -1 );
357 }
358
359 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
360
361 if( wide_string_size < wide_source_size )
362 {
363 libcerror_error_set(
364 error,
365 LIBCERROR_ERROR_DOMAIN_ARGUMENTS,
366 LIBCERROR_ARGUMENT_ERROR_VALUE_TOO_SMALL,
367 "%s: wide string too small.",
368 function );
369
370 return( -1 );
371 }
372 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
373 if( system_string_copy(
374 wide_string,
375 source,
376 source_length ) == NULL )
377 {
378 libcerror_error_set(
379 error,
380 LIBCERROR_ERROR_DOMAIN_MEMORY,
381 LIBCERROR_MEMORY_ERROR_COPY_FAILED,
382 "%s: unable to set wide string.",
383 function );
384
385 return( -1 );
386 }
387 wide_string[ source_length ] = 0;
388 #else
389 if( libclocale_codepage == 0 )
390 {
391 #if SIZEOF_WCHAR_T == 4
392 result = libuna_utf32_string_copy_from_utf8(
393 (libuna_utf32_character_t *) wide_string,
394 wide_string_size,
395 (uint8_t *) source,
396 source_length + 1,
397 error );
398 #elif SIZEOF_WCHAR_T == 2
399 result = libuna_utf16_string_copy_from_utf8(
400 (libuna_utf16_character_t *) wide_string,
401 wide_string_size,
402 (uint8_t *) source,
403 source_length + 1,
404 error );
405 #endif
406 }
407 else
408 {
409 #if SIZEOF_WCHAR_T == 4
410 result = libuna_utf32_string_copy_from_byte_stream(
411 (libuna_utf32_character_t *) wide_string,
412 wide_string_size,
413 (uint8_t *) source,
414 source_length + 1,
415 libclocale_codepage,
416 error );
417 #elif SIZEOF_WCHAR_T == 2
418 result = libuna_utf16_string_copy_from_byte_stream(
419 (libuna_utf16_character_t *) wide_string,
420 wide_string_size,
421 (uint8_t *) source,
422 source_length + 1,
423 libclocale_codepage,
424 error );
425 #endif
426 }
427 if( result != 1 )
428 {
429 libcerror_error_set(
430 error,
431 LIBCERROR_ERROR_DOMAIN_CONVERSION,
432 LIBCERROR_CONVERSION_ERROR_GENERIC,
433 "%s: unable to set wide string.",
434 function );
435
436 return( -1 );
437 }
438
439 #endif /* defined( HAVE_WIDE_SYSTEM_CHARACTER ) */
440
441 return( 1 );
442 }
443
444 #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */
445
446 /* Tests the libesedb_get_version function
447 * Returns 1 if successful or 0 if not
448 */
449 int esedb_test_get_version(
450 void )
451 {
452 const char *version_string = NULL;
453 int result = 0;
454
455 version_string = libesedb_get_version();
456
457 result = narrow_string_compare(
458 version_string,
459 LIBESEDB_VERSION_STRING,
460 9 );
461
462 ESEDB_TEST_ASSERT_EQUAL_INT(
463 "result",
464 result,
465 0 );
466
467 return( 1 );
468
469 on_error:
470 return( 0 );
471 }
472
473 /* Tests the libesedb_get_access_flags_read function
474 * Returns 1 if successful or 0 if not
475 */
476 int esedb_test_get_access_flags_read(
477 void )
478 {
479 int access_flags = 0;
480
481 access_flags = libesedb_get_access_flags_read();
482
483 ESEDB_TEST_ASSERT_EQUAL_INT(
484 "access_flags",
485 access_flags,
486 LIBESEDB_ACCESS_FLAG_READ );
487
488 return( 1 );
489
490 on_error:
491 return( 0 );
492 }
493
494 /* Tests the libesedb_get_codepage function
495 * Returns 1 if successful or 0 if not
496 */
497 int esedb_test_get_codepage(
498 void )
499 {
500 libcerror_error_t *error = NULL;
501 int codepage = 0;
502 int result = 0;
503
504 result = libesedb_get_codepage(
505 &codepage,
506 &error );
507
508 ESEDB_TEST_ASSERT_EQUAL_INT(
509 "result",
510 result,
511 1 );
512
513 ESEDB_TEST_ASSERT_IS_NULL(
514 "error",
515 error );
516
517 /* Test error cases
518 */
519 result = libesedb_get_codepage(
520 NULL,
521 &error );
522
523 ESEDB_TEST_ASSERT_EQUAL_INT(
524 "result",
525 result,
526 -1 );
527
528 ESEDB_TEST_ASSERT_IS_NOT_NULL(
529 "error",
530 error );
531
532 libcerror_error_free(
533 &error );
534
535 return( 1 );
536
537 on_error:
538 if( error != NULL )
539 {
540 libcerror_error_free(
541 &error );
542 }
543 return( 0 );
544 }
545
546 /* Tests the libesedb_set_codepage function
547 * Returns 1 if successful or 0 if not
548 */
549 int esedb_test_set_codepage(
550 void )
551 {
552 libcerror_error_t *error = NULL;
553 int result = 0;
554
555 result = libesedb_set_codepage(
556 0,
557 &error );
558
559 ESEDB_TEST_ASSERT_EQUAL_INT(
560 "result",
561 result,
562 1 );
563
564 ESEDB_TEST_ASSERT_IS_NULL(
565 "error",
566 error );
567
568 /* Test error cases
569 */
570 result = libesedb_set_codepage(
571 -1,
572 &error );
573
574 ESEDB_TEST_ASSERT_EQUAL_INT(
575 "result",
576 result,
577 -1 );
578
579 ESEDB_TEST_ASSERT_IS_NOT_NULL(
580 "error",
581 error );
582
583 libcerror_error_free(
584 &error );
585
586 return( 1 );
587
588 on_error:
589 if( error != NULL )
590 {
591 libcerror_error_free(
592 &error );
593 }
594 return( 0 );
595 }
596
597 /* Tests the libesedb_check_file_signature function
598 * Returns 1 if successful or 0 if not
599 */
600 int esedb_test_check_file_signature(
601 const system_character_t *source )
602 {
603 char narrow_source[ 256 ];
604
605 libcerror_error_t *error = NULL;
606 int result = 0;
607
608 /* Initialize test
609 */
610 result = esedb_test_support_get_narrow_source(
611 source,
612 narrow_source,
613 256,
614 &error );
615
616 ESEDB_TEST_ASSERT_EQUAL_INT(
617 "result",
618 result,
619 1 );
620
621 ESEDB_TEST_ASSERT_IS_NULL(
622 "error",
623 error );
624
625 /* Test check file signature
626 */
627 result = libesedb_check_file_signature(
628 narrow_source,
629 &error );
630
631 ESEDB_TEST_ASSERT_EQUAL_INT(
632 "result",
633 result,
634 1 );
635
636 ESEDB_TEST_ASSERT_IS_NULL(
637 "error",
638 error );
639
640 /* Test error cases
641 */
642 result = libesedb_check_file_signature(
643 NULL,
644 &error );
645
646 ESEDB_TEST_ASSERT_EQUAL_INT(
647 "result",
648 result,
649 -1 );
650
651 ESEDB_TEST_ASSERT_IS_NOT_NULL(
652 "error",
653 error );
654
655 libcerror_error_free(
656 &error );
657
658 return( 1 );
659
660 on_error:
661 if( error != NULL )
662 {
663 libcerror_error_free(
664 &error );
665 }
666 return( 0 );
667 }
668
669 #if defined( HAVE_WIDE_CHARACTER_TYPE )
670
671 /* Tests the libesedb_check_file_signature_wide function
672 * Returns 1 if successful or 0 if not
673 */
674 int esedb_test_check_file_signature_wide(
675 const system_character_t *source )
676 {
677 wchar_t wide_source[ 256 ];
678
679 libcerror_error_t *error = NULL;
680 int result = 0;
681
682 /* Initialize test
683 */
684 result = esedb_test_support_get_wide_source(
685 source,
686 wide_source,
687 256,
688 &error );
689
690 ESEDB_TEST_ASSERT_EQUAL_INT(
691 "result",
692 result,
693 1 );
694
695 ESEDB_TEST_ASSERT_IS_NULL(
696 "error",
697 error );
698
699 /* Test check file signature
700 */
701 result = libesedb_check_file_signature_wide(
702 wide_source,
703 &error );
704
705 ESEDB_TEST_ASSERT_EQUAL_INT(
706 "result",
707 result,
708 1 );
709
710 ESEDB_TEST_ASSERT_IS_NULL(
711 "error",
712 error );
713
714 /* Test error cases
715 */
716 result = libesedb_check_file_signature_wide(
717 NULL,
718 &error );
719
720 ESEDB_TEST_ASSERT_EQUAL_INT(
721 "result",
722 result,
723 -1 );
724
725 ESEDB_TEST_ASSERT_IS_NOT_NULL(
726 "error",
727 error );
728
729 libcerror_error_free(
730 &error );
731
732 return( 1 );
733
734 on_error:
735 if( error != NULL )
736 {
737 libcerror_error_free(
738 &error );
739 }
740 return( 0 );
741 }
742
743 #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */
744
745 /* Tests the libesedb_check_file_signature_file_io_handle function
746 * Returns 1 if successful or 0 if not
747 */
748 int esedb_test_check_file_signature_file_io_handle(
749 const system_character_t *source )
750 {
751 uint8_t empty_block[ 512 ];
752
753 libbfio_handle_t *file_io_handle = NULL;
754 libcerror_error_t *error = NULL;
755 void *memset_result = NULL;
756 size_t source_length = 0;
757 int result = 0;
758
759 /* Initialize test
760 */
761 result = libbfio_file_initialize(
762 &file_io_handle,
763 &error );
764
765 ESEDB_TEST_ASSERT_EQUAL_INT(
766 "result",
767 result,
768 1 );
769
770 ESEDB_TEST_ASSERT_IS_NOT_NULL(
771 "file_io_handle",
772 file_io_handle );
773
774 ESEDB_TEST_ASSERT_IS_NULL(
775 "error",
776 error );
777
778 source_length = system_string_length(
779 source );
780
781 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
782 result = libbfio_file_set_name_wide(
783 file_io_handle,
784 source,
785 source_length,
786 &error );
787 #else
788 result = libbfio_file_set_name(
789 file_io_handle,
790 source,
791 source_length,
792 &error );
793 #endif
794 ESEDB_TEST_ASSERT_EQUAL_INT(
795 "result",
796 result,
797 1 );
798
799 ESEDB_TEST_ASSERT_IS_NULL(
800 "error",
801 error );
802
803 result = libbfio_handle_open(
804 file_io_handle,
805 LIBBFIO_OPEN_READ,
806 &error );
807
808 ESEDB_TEST_ASSERT_EQUAL_INT(
809 "result",
810 result,
811 1 );
812
813 ESEDB_TEST_ASSERT_IS_NULL(
814 "error",
815 error );
816
817 /* Test check file signature
818 */
819 result = libesedb_check_file_signature_file_io_handle(
820 file_io_handle,
821 &error );
822
823 ESEDB_TEST_ASSERT_EQUAL_INT(
824 "result",
825 result,
826 1 );
827
828 ESEDB_TEST_ASSERT_IS_NULL(
829 "error",
830 error );
831
832 /* Test error cases
833 */
834 result = libesedb_check_file_signature_file_io_handle(
835 NULL,
836 &error );
837
838 ESEDB_TEST_ASSERT_EQUAL_INT(
839 "result",
840 result,
841 -1 );
842
843 ESEDB_TEST_ASSERT_IS_NOT_NULL(
844 "error",
845 error );
846
847 libcerror_error_free(
848 &error );
849
850 /* Clean up
851 */
852 result = libbfio_handle_close(
853 file_io_handle,
854 &error );
855
856 ESEDB_TEST_ASSERT_EQUAL_INT(
857 "result",
858 result,
859 0 );
860
861 ESEDB_TEST_ASSERT_IS_NULL(
862 "error",
863 error );
864
865 result = libbfio_handle_free(
866 &file_io_handle,
867 &error );
868
869 ESEDB_TEST_ASSERT_EQUAL_INT(
870 "result",
871 result,
872 1 );
873
874 ESEDB_TEST_ASSERT_IS_NULL(
875 "file_io_handle",
876 file_io_handle );
877
878 ESEDB_TEST_ASSERT_IS_NULL(
879 "error",
880 error );
881
882 /* Initialize test
883 */
884 memset_result = memory_set(
885 empty_block,
886 0,
887 sizeof( uint8_t ) * 512 );
888
889 ESEDB_TEST_ASSERT_IS_NOT_NULL(
890 "memset_result",
891 memset_result );
892
893 result = libbfio_memory_range_initialize(
894 &file_io_handle,
895 &error );
896
897 ESEDB_TEST_ASSERT_EQUAL_INT(
898 "result",
899 result,
900 1 );
901
902 ESEDB_TEST_ASSERT_IS_NOT_NULL(
903 "file_io_handle",
904 file_io_handle );
905
906 ESEDB_TEST_ASSERT_IS_NULL(
907 "error",
908 error );
909
910 result = libbfio_memory_range_set(
911 file_io_handle,
912 empty_block,
913 sizeof( uint8_t ) * 512,
914 &error );
915
916 ESEDB_TEST_ASSERT_EQUAL_INT(
917 "result",
918 result,
919 1 );
920
921 ESEDB_TEST_ASSERT_IS_NULL(
922 "error",
923 error );
924
925 result = libbfio_handle_open(
926 file_io_handle,
927 LIBBFIO_OPEN_READ,
928 &error );
929
930 ESEDB_TEST_ASSERT_EQUAL_INT(
931 "result",
932 result,
933 1 );
934
935 ESEDB_TEST_ASSERT_IS_NULL(
936 "error",
937 error );
938
939 /* Test check file signature
940 */
941 result = libesedb_check_file_signature_file_io_handle(
942 file_io_handle,
943 &error );
944
945 ESEDB_TEST_ASSERT_EQUAL_INT(
946 "result",
947 result,
948 0 );
949
950 ESEDB_TEST_ASSERT_IS_NULL(
951 "error",
952 error );
953
954 /* Clean up
955 */
956 result = libbfio_handle_close(
957 file_io_handle,
958 &error );
959
960 ESEDB_TEST_ASSERT_EQUAL_INT(
961 "result",
962 result,
963 0 );
964
965 ESEDB_TEST_ASSERT_IS_NULL(
966 "error",
967 error );
968
969 result = libbfio_handle_free(
970 &file_io_handle,
971 &error );
972
973 ESEDB_TEST_ASSERT_EQUAL_INT(
974 "result",
975 result,
976 1 );
977
978 ESEDB_TEST_ASSERT_IS_NULL(
979 "file_io_handle",
980 file_io_handle );
981
982 ESEDB_TEST_ASSERT_IS_NULL(
983 "error",
984 error );
985
986 /* TODO test file too small */
987
988 return( 1 );
989
990 on_error:
991 if( error != NULL )
992 {
993 libcerror_error_free(
994 &error );
995 }
996 if( file_io_handle != NULL )
997 {
998 libbfio_handle_free(
999 &file_io_handle,
1000 NULL );
1001 }
1002 return( 0 );
1003 }
1004
1005 /* The main program
1006 */
1007 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
1008 int wmain(
1009 int argc,
1010 wchar_t * const argv[] )
1011 #else
1012 int main(
1013 int argc,
1014 char * const argv[] )
1015 #endif
1016 {
1017 system_character_t *source = NULL;
1018 system_integer_t option = 0;
1019
1020 while( ( option = esedb_test_getopt(
1021 argc,
1022 argv,
1023 _SYSTEM_STRING( "" ) ) ) != (system_integer_t) -1 )
1024 {
1025 switch( option )
1026 {
1027 case (system_integer_t) '?':
1028 default:
1029 fprintf(
1030 stderr,
1031 "Invalid argument: %" PRIs_SYSTEM ".\n",
1032 argv[ optind - 1 ] );
1033
1034 return( EXIT_FAILURE );
1035 }
1036 }
1037 if( optind < argc )
1038 {
1039 source = argv[ optind ];
1040 }
1041
1042 ESEDB_TEST_RUN(
1043 "libesedb_get_version",
1044 esedb_test_get_version );
1045
1046 ESEDB_TEST_RUN(
1047 "libesedb_get_access_flags_read",
1048 esedb_test_get_access_flags_read );
1049
1050 ESEDB_TEST_RUN(
1051 "libesedb_get_codepage",
1052 esedb_test_get_codepage );
1053
1054 ESEDB_TEST_RUN(
1055 "libesedb_set_codepage",
1056 esedb_test_set_codepage );
1057
1058 #if !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 )
1059 if( source != NULL )
1060 {
1061 ESEDB_TEST_RUN_WITH_ARGS(
1062 "libesedb_check_file_signature",
1063 esedb_test_check_file_signature,
1064 source );
1065
1066 #if defined( HAVE_WIDE_CHARACTER_TYPE )
1067
1068 ESEDB_TEST_RUN_WITH_ARGS(
1069 "libesedb_check_file_signature_wide",
1070 esedb_test_check_file_signature_wide,
1071 source );
1072
1073 #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */
1074
1075 ESEDB_TEST_RUN_WITH_ARGS(
1076 "libesedb_check_file_signature_file_io_handle",
1077 esedb_test_check_file_signature_file_io_handle,
1078 source );
1079 }
1080 #endif /* !defined( __BORLANDC__ ) || ( __BORLANDC__ >= 0x0560 ) */
1081
1082 return( EXIT_SUCCESS );
1083
1084 on_error:
1085 return( EXIT_FAILURE );
1086 }
1087
0 /*
1 * Library table type test program
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <types.h>
24
25 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
26 #include <stdlib.h>
27 #endif
28
29 #include "esedb_test_libcerror.h"
30 #include "esedb_test_libesedb.h"
31 #include "esedb_test_macros.h"
32 #include "esedb_test_memory.h"
33 #include "esedb_test_unused.h"
34
35 #include "../libesedb/libesedb_table.h"
36
37 /* Tests the libesedb_table_free function
38 * Returns 1 if successful or 0 if not
39 */
40 int esedb_test_table_free(
41 void )
42 {
43 libcerror_error_t *error = NULL;
44 int result = 0;
45
46 /* Test error cases
47 */
48 result = libesedb_table_free(
49 NULL,
50 &error );
51
52 ESEDB_TEST_ASSERT_EQUAL_INT(
53 "result",
54 result,
55 -1 );
56
57 ESEDB_TEST_ASSERT_IS_NOT_NULL(
58 "error",
59 error );
60
61 libcerror_error_free(
62 &error );
63
64 return( 1 );
65
66 on_error:
67 if( error != NULL )
68 {
69 libcerror_error_free(
70 &error );
71 }
72 return( 0 );
73 }
74
75 #if defined( __GNUC__ )
76
77 #endif /* defined( __GNUC__ ) */
78
79 /* The main program
80 */
81 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
82 int wmain(
83 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
84 wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
85 #else
86 int main(
87 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
88 char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
89 #endif
90 {
91 ESEDB_TEST_UNREFERENCED_PARAMETER( argc )
92 ESEDB_TEST_UNREFERENCED_PARAMETER( argv )
93
94 #if defined( __GNUC__ )
95
96 /* TODO: add tests for libesedb_table_initialize */
97
98 #endif /* defined( __GNUC__ ) */
99
100 ESEDB_TEST_RUN(
101 "libesedb_table_free",
102 esedb_test_table_free );
103
104 #if defined( __GNUC__ )
105
106 /* TODO: add tests for libesedb_table_get_identifier */
107
108 /* TODO: add tests for libesedb_table_get_utf8_name_size */
109
110 /* TODO: add tests for libesedb_table_get_utf8_name */
111
112 /* TODO: add tests for libesedb_table_get_utf16_name_size */
113
114 /* TODO: add tests for libesedb_table_get_utf16_name */
115
116 /* TODO: add tests for libesedb_table_get_utf8_template_name_size */
117
118 /* TODO: add tests for libesedb_table_get_utf8_template_name */
119
120 /* TODO: add tests for libesedb_table_get_utf16_template_name_size */
121
122 /* TODO: add tests for libesedb_table_get_utf16_template_name */
123
124 /* TODO: add tests for libesedb_table_get_number_of_columns */
125
126 /* TODO: add tests for libesedb_table_get_column */
127
128 /* TODO: add tests for libesedb_table_get_number_of_indexes */
129
130 /* TODO: add tests for libesedb_table_get_index */
131
132 /* TODO: add tests for libesedb_table_get_number_of_records */
133
134 /* TODO: add tests for libesedb_table_get_record */
135
136 #endif /* defined( __GNUC__ ) */
137
138 return( EXIT_SUCCESS );
139
140 on_error:
141 return( EXIT_FAILURE );
142 }
143
0 /*
1 * Library table_definition type test program
2 *
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
4 *
5 * Refer to AUTHORS for acknowledgements.
6 *
7 * This software is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this software. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include <common.h>
22 #include <file_stream.h>
23 #include <types.h>
24
25 #if defined( HAVE_STDLIB_H ) || defined( WINAPI )
26 #include <stdlib.h>
27 #endif
28
29 #include "esedb_test_libcerror.h"
30 #include "esedb_test_libesedb.h"
31 #include "esedb_test_macros.h"
32 #include "esedb_test_memory.h"
33 #include "esedb_test_unused.h"
34
35 #include "../libesedb/libesedb_table_definition.h"
36
37 #if defined( __GNUC__ )
38
39 /* Tests the libesedb_table_definition_free function
40 * Returns 1 if successful or 0 if not
41 */
42 int esedb_test_table_definition_free(
43 void )
44 {
45 libcerror_error_t *error = NULL;
46 int result = 0;
47
48 /* Test error cases
49 */
50 result = libesedb_table_definition_free(
51 NULL,
52 &error );
53
54 ESEDB_TEST_ASSERT_EQUAL_INT(
55 "result",
56 result,
57 -1 );
58
59 ESEDB_TEST_ASSERT_IS_NOT_NULL(
60 "error",
61 error );
62
63 libcerror_error_free(
64 &error );
65
66 return( 1 );
67
68 on_error:
69 if( error != NULL )
70 {
71 libcerror_error_free(
72 &error );
73 }
74 return( 0 );
75 }
76
77 #endif /* defined( __GNUC__ ) */
78
79 /* The main program
80 */
81 #if defined( HAVE_WIDE_SYSTEM_CHARACTER )
82 int wmain(
83 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
84 wchar_t * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
85 #else
86 int main(
87 int argc ESEDB_TEST_ATTRIBUTE_UNUSED,
88 char * const argv[] ESEDB_TEST_ATTRIBUTE_UNUSED )
89 #endif
90 {
91 ESEDB_TEST_UNREFERENCED_PARAMETER( argc )
92 ESEDB_TEST_UNREFERENCED_PARAMETER( argv )
93
94 #if defined( __GNUC__ )
95
96 /* TODO: add tests for libesedb_table_definition_initialize */
97
98 ESEDB_TEST_RUN(
99 "libesedb_table_definition_free",
100 esedb_test_table_definition_free );
101
102 /* TODO: add tests for libesedb_table_definition_set_long_value_catalog_definition */
103
104 /* TODO: add tests for libesedb_table_definition_set_callback_catalog_definition */
105
106 /* TODO: add tests for libesedb_table_definition_append_column_catalog_definition */
107
108 /* TODO: add tests for libesedb_table_definition_append_index_catalog_definition */
109
110 #endif /* defined( __GNUC__ ) */
111
112 return( EXIT_SUCCESS );
113
114 on_error:
115 return( EXIT_FAILURE );
116 }
117
00 /*
11 * The unused definition
22 *
3 * Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
3 * Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
44 *
55 * Refer to AUTHORS for acknowledgements.
66 *
+0
-46
tests/pyesedb_test_get_version.py less more
0 #!/usr/bin/env python
1 #
2 # Python-bindings get version test program
3 #
4 # Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
5 #
6 # Refer to AUTHORS for acknowledgements.
7 #
8 # This software is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU Lesser General Public License as published by
10 # the Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
12 #
13 # This software is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU Lesser General Public License
19 # along with this software. If not, see <http://www.gnu.org/licenses/>.
20
21 import argparse
22 import sys
23
24 import pyesedb
25
26
27 def main():
28 args_parser = argparse.ArgumentParser(
29 description="Tests get_version.")
30
31 options = args_parser.parse_args()
32
33 try:
34 pyesedb.get_version()
35 except Exception:
36 return False
37
38 return True
39
40
41 if __name__ == "__main__":
42 if not main():
43 sys.exit(1)
44 else:
45 sys.exit(0)
+0
-276
tests/pyesedb_test_open_close.py less more
0 #!/usr/bin/env python
1 #
2 # Python-bindings open close testing program
3 #
4 # Copyright (C) 2009-2016, Joachim Metz <joachim.metz@gmail.com>
5 #
6 # Refer to AUTHORS for acknowledgements.
7 #
8 # This software is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU Lesser General Public License as published by
10 # the Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
12 #
13 # This software is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU Lesser General Public License
19 # along with this software. If not, see <http://www.gnu.org/licenses/>.
20
21 from __future__ import print_function
22 import argparse
23 import sys
24
25 import pyesedb
26
27
28 def get_filename_string(filename):
29 """Retrieves a human readable string representation of the filename."""
30 if not filename:
31 return "None"
32 return filename
33
34
35 def get_mode_string(mode):
36 """Retrieves a human readable string representation of the access mode."""
37 if mode == "r":
38 mode_string = "read"
39 elif mode == "w":
40 mode_string = "write"
41 else:
42 mode_string = "unknown ({0:s})".format(mode)
43 return mode_string
44
45
46 def pyesedb_test_single_open_close_file(filename, mode):
47 """Tests a single open and close."""
48 description = (
49 "Testing single open close of: {0:s} with access: {1:s}"
50 "\t").format(get_filename_string(filename), get_mode_string(mode))
51 print(description, end="")
52
53 error_string = None
54 result = True
55
56 try:
57 esedb_file = pyesedb.file()
58
59 esedb_file.open(filename, mode)
60 esedb_file.close()
61
62 except TypeError as exception:
63 expected_message = (
64 "{0:s}: unsupported string object type.").format(
65 "pyesedb_file_open")
66
67 if not filename and str(exception) == expected_message:
68 pass
69
70 else:
71 error_string = str(exception)
72 result = False
73
74 except ValueError as exception:
75 expected_message = (
76 "{0:s}: unsupported mode: w.").format(
77 "pyesedb_file_open")
78
79 if mode != "w" or str(exception) != expected_message:
80 error_string = str(exception)
81 result = False
82
83 except Exception as exception:
84 error_string = str(exception)
85 result = False
86
87 if not result:
88 print("(FAIL)")
89 else:
90 print("(PASS)")
91
92 if error_string:
93 print(error_string)
94 return result
95
96
97 def pyesedb_test_multi_open_close_file(filename, mode):
98 """Tests multiple open and close."""
99 description = (
100 "Testing multi open close of: {0:s} with access: {1:s}"
101 "\t").format(get_filename_string(filename), get_mode_string(mode))
102 print(description, end="")
103
104 error_string = None
105 result = True
106
107 try:
108 esedb_file = pyesedb.file()
109
110 esedb_file.open(filename, mode)
111 esedb_file.close()
112 esedb_file.open(filename, mode)
113 esedb_file.close()
114
115 except Exception as exception:
116 error_string = str(exception)
117 result = False
118
119 if not result:
120 print("(FAIL)")
121 else:
122 print("(PASS)")
123
124 if error_string:
125 print(error_string)
126 return result
127
128
129 def pyesedb_test_single_open_close_file_object(filename, mode):
130 """Tests a single file-like object open and close."""
131 description = (
132 "Testing single open close of file-like object of: {0:s} with access: "
133 "{1:s}\t").format(get_filename_string(filename), get_mode_string(mode))
134 print(description, end="")
135
136 error_string = None
137 result = True
138
139 try:
140 file_object = open(filename, "rb")
141 esedb_file = pyesedb.file()
142
143 esedb_file.open_file_object(file_object, mode)
144 esedb_file.close()
145
146 except Exception as exception:
147 error_string = str(exception)
148 result = False
149
150 if not result:
151 print("(FAIL)")
152 else:
153 print("(PASS)")
154
155 if error_string:
156 print(error_string)
157 return result
158
159
160 def pyesedb_test_single_open_close_file_object_with_dereference(
161 filename, mode):
162 """Tests single file-like object open and close with dereference."""
163 description = (
164 "Testing single open close of file-like object with dereference of: "
165 "{0:s} with access: {1:s}\t").format(
166 get_filename_string(filename), get_mode_string(mode))
167 print(description, end="")
168
169 error_string = None
170 result = True
171
172 try:
173 file_object = open(filename, "rb")
174 esedb_file = pyesedb.file()
175
176 esedb_file.open_file_object(file_object, mode)
177 del file_object
178 esedb_file.close()
179
180 except Exception as exception:
181 error_string = str(exception)
182 result = False
183
184 if not result:
185 print("(FAIL)")
186 else:
187 print("(PASS)")
188
189 if error_string:
190 print(error_string)
191 return result
192
193
194 def pyesedb_test_multi_open_close_file_object(filename, mode):
195 """Tests multiple file-like object open and close."""
196 description = (
197 "Testing multi open close of file-like object of: {0:s} "
198 "with access: {1:s}\t").format(
199 get_filename_string(filename), get_mode_string(mode))
200 print(description, end="")
201
202 error_string = None
203 result = True
204
205 try:
206 file_object = open(filename, "rb")
207 esedb_file = pyesedb.file()
208
209 esedb_file.open_file_object(file_object, mode)
210 esedb_file.close()
211 esedb_file.open_file_object(file_object, mode)
212 esedb_file.close()
213
214 except Exception as exception:
215 error_string = str(exception)
216 result = False
217
218 if not result:
219 print("(FAIL)")
220 else:
221 print("(PASS)")
222
223 if error_string:
224 print(error_string)
225 return result
226
227
228 def main():
229 args_parser = argparse.ArgumentParser(
230 description="Tests open and close.")
231
232 args_parser.add_argument(
233 "source", nargs="?", action="store", metavar="FILENAME",
234 default=None, help="The source filename.")
235
236 options = args_parser.parse_args()
237
238 if not options.source:
239 print("Source value is missing.")
240 print("")
241 args_parser.print_help()
242 print("")
243 return False
244
245 if not pyesedb_test_single_open_close_file(options.source, "r"):
246 return False
247
248 if not pyesedb_test_single_open_close_file(None, "r"):
249 return False
250
251 if not pyesedb_test_single_open_close_file(options.source, "w"):
252 return False
253
254 if not pyesedb_test_multi_open_close_file(options.source, "r"):
255 return False
256
257 if not pyesedb_test_single_open_close_file_object(options.source, "r"):
258 return False
259
260 if not pyesedb_test_single_open_close_file_object_with_dereference(
261 options.source, "r"):
262 return False
263
264 if not pyesedb_test_multi_open_close_file_object(
265 options.source, "r"):
266 return False
267
268 return True
269
270
271 if __name__ == "__main__":
272 if not main():
273 sys.exit(1)
274 else:
275 sys.exit(0)
0 #!/usr/bin/env python
1 #
2 # Python-bindings support functions test script
3 #
4 # Copyright (C) 2009-2017, Joachim Metz <joachim.metz@gmail.com>
5 #
6 # Refer to AUTHORS for acknowledgements.
7 #
8 # This software is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU Lesser General Public License as published by
10 # the Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
12 #
13 # This software is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU Lesser General Public License
19 # along with this software. If not, see <http://www.gnu.org/licenses/>.
20
21 import unittest
22
23 import pyesedb
24
25
26 class SupportFunctionsTests(unittest.TestCase):
27 """Tests the support functions."""
28
29 def test_get_version(self):
30 """Tests the get_version function."""
31 version = pyesedb.get_version()
32
33 # TODO: check version.
34 # self.assertEqual(version, "00000000")
35
36
37 if __name__ == "__main__":
38 unittest.main(verbosity=2)
+0
-125
tests/test_api_functions.sh less more
0 #!/bin/bash
1 # Library API functions testing script
2 #
3 # Version: 20160420
4
5 EXIT_SUCCESS=0;
6 EXIT_FAILURE=1;
7 EXIT_IGNORE=77;
8
9 TEST_PREFIX=`dirname ${PWD}`;
10 TEST_PREFIX=`basename ${TEST_PREFIX} | sed 's/^lib\([^-]*\).*$/\1/'`;
11
12 TEST_PROFILE="lib${TEST_PREFIX}";
13 TEST_FUNCTIONS="get_version";
14 TEST_FUNCTIONS_WITH_INPUT="open_close";
15 OPTION_SETS="";
16
17 TEST_TOOL_DIRECTORY=".";
18 INPUT_DIRECTORY="input";
19 INPUT_GLOB="*";
20
21 test_api_function()
22 {
23 local TEST_PROFILE=$1;
24 local TEST_FUNCTION=$2;
25 local OPTION_SETS=$3;
26
27 local TEST_TOOL="${TEST_PREFIX}_test_${TEST_FUNCTION}";
28
29 local TEST_EXECUTABLE="${TEST_TOOL_DIRECTORY}/${TEST_TOOL}";
30
31 if ! test -x "${TEST_EXECUTABLE}";
32 then
33 TEST_EXECUTABLE="${TEST_TOOL_DIRECTORY}/${TEST_TOOL}.exe";
34 fi
35
36 echo -n -e "Testing API function: lib${TEST_PREFIX}_${TEST_FUNCTION}\t";
37
38 # TODO: add support for TEST_PROFILE and OPTION_SETS?
39 run_test_with_arguments ${TEST_EXECUTABLE};
40 local RESULT=$?;
41
42 if test ${RESULT} -ne ${EXIT_SUCCESS};
43 then
44 echo "(FAIL)";
45 else
46 echo "(PASS)";
47 fi
48 return ${RESULT};
49 }
50
51 test_api_function_with_input()
52 {
53 local TEST_PROFILE=$1;
54 local TEST_FUNCTION=$2;
55 local OPTION_SETS=$3;
56 local INPUT_DIRECTORY=$4;
57 local INPUT_GLOB=$5;
58 local TEST_TOOL="${TEST_PREFIX}_test_${TEST_FUNCTION}";
59
60 local TEST_EXECUTABLE="${TEST_TOOL_DIRECTORY}/${TEST_TOOL}";
61
62 if ! test -x "${TEST_EXECUTABLE}";
63 then
64 TEST_EXECUTABLE="${TEST_TOOL_DIRECTORY}/${TEST_TOOL}.exe";
65 fi
66
67 run_test_on_input_directory "${TEST_PROFILE}" "${TEST_FUNCTION}" "default" "${OPTION_SETS}" "${TEST_EXECUTABLE}" "${INPUT_DIRECTORY}" "${INPUT_GLOB}";
68 local RESULT=$?;
69
70 return ${RESULT};
71 }
72
73 if ! test -z ${SKIP_LIBRARY_TESTS};
74 then
75 exit ${EXIT_IGNORE};
76 fi
77
78 TEST_RUNNER="tests/test_runner.sh";
79
80 if ! test -f "${TEST_RUNNER}";
81 then
82 TEST_RUNNER="./test_runner.sh";
83 fi
84
85 if ! test -f "${TEST_RUNNER}";
86 then
87 echo "Missing test runner: ${TEST_RUNNER}";
88
89 exit ${EXIT_FAILURE};
90 fi
91
92 source ${TEST_RUNNER};
93
94 RESULT=${EXIT_IGNORE};
95
96 for TEST_FUNCTION in ${TEST_FUNCTIONS};
97 do
98 test_api_function "${TEST_PROFILE}" "${TEST_FUNCTION}" "${OPTION_SETS}";
99 RESULT=$?;
100
101 if test ${RESULT} -ne ${EXIT_SUCCESS};
102 then
103 break;
104 fi
105 done
106
107 if test ${RESULT} -ne ${EXIT_SUCCESS} && test ${RESULT} -ne ${EXIT_IGNORE};
108 then
109 exit ${RESULT};
110 fi
111
112 for TEST_FUNCTION in ${TEST_FUNCTIONS_WITH_INPUT};
113 do
114 test_api_function_with_input "${TEST_PROFILE}" "${TEST_FUNCTION}" "${OPTION_SETS}" "${INPUT_DIRECTORY}" "${INPUT_GLOB}";
115 RESULT=$?;
116
117 if test ${RESULT} -ne ${EXIT_SUCCESS};
118 then
119 break;
120 fi
121 done
122
123 exit ${RESULT};
124
00 #!/bin/bash
11 # Export tool testing script
22 #
3 # Version: 20160411
3 # Version: 20160328
44
55 EXIT_SUCCESS=0;
66 EXIT_FAILURE=1;
77 EXIT_IGNORE=77;
88
99 TEST_PREFIX=`dirname ${PWD}`;
10 TEST_PREFIX=`basename ${TEST_PREFIX} | sed 's/^lib\([^-]*\)/\1/'`;
10 TEST_PREFIX=`basename ${TEST_PREFIX} | sed 's/^lib\([^-]*\).*$/\1/'`;
1111 TEST_SUFFIX="export";
1212
1313 TEST_PROFILE="${TEST_PREFIX}${TEST_SUFFIX}";
1717 TEST_TOOL_DIRECTORY="../${TEST_PREFIX}tools";
1818 TEST_TOOL="${TEST_PREFIX}${TEST_SUFFIX}";
1919 INPUT_DIRECTORY="input";
20 INPUT_GLOB="*.[Ees]*01";
21
22 test_callback()
23 {
24 local TMPDIR=$1;
25 local TEST_SET_DIRECTORY=$2;
26 local TEST_OUTPUT=$3;
27 local TEST_EXECUTABLE=$4;
28 local TEST_INPUT=$5;
29 shift 5;
30 local ARGUMENTS=$@;
31
32 TEST_EXECUTABLE=`readlink -f ${TEST_EXECUTABLE}`;
33 INPUT_FILE_FULL_PATH=`readlink -f "${INPUT_FILE}"`;
34
35 (cd ${TMPDIR} && run_test_with_input_and_arguments "${TEST_EXECUTABLE}" "${INPUT_FILE_FULL_PATH}" ${ARGUMENTS[@]} ${OPTIONS[@]});
36 local RESULT=$?;
37
38 local TEST_LOG="${TEST_OUTPUT}.log";
39
40 if test "${PLATFORM}" = "Darwin";
41 then
42 (cd ${TMPDIR} && find "${INPUT_NAME}.export" -type f -exec md5 {} \; | sort -k 2 > "${TEST_LOG}");
43 else
44 (cd ${TMPDIR} && find "${INPUT_NAME}.export" -type f -exec md5sum {} \; | sort -k 2 > "${TEST_LOG}");
45 fi
46
47 local TEST_RESULTS="${TMPDIR}/${TEST_LOG}";
48 local STORED_TEST_RESULTS="${TEST_SET_DIRECTORY}/${TEST_LOG}.gz";
49
50 if test -f "${STORED_TEST_RESULTS}";
51 then
52 # Using zcat here since zdiff has issues on Mac OS X.
53 # Note that zcat on Mac OS X requires the input from stdin.
54 zcat < "${STORED_TEST_RESULTS}" | diff "${TEST_RESULTS}" -;
55 RESULT=$?;
56 else
57 gzip ${TEST_RESULTS};
58
59 mv "${TEST_RESULTS}.gz" ${TEST_SET_DIRECTORY};
60 fi
61 return ${RESULT};
62 }
20 INPUT_GLOB="*";
6321
6422 if ! test -z ${SKIP_TOOLS_TESTS};
6523 then
9452 exit ${EXIT_FAILURE};
9553 fi
9654
97 PLATFORM=`uname -s`;
98
9955 source ${TEST_RUNNER};
10056
101 assert_availability_binary find;
102
103 if test "${PLATFORM}" = "Darwin";
104 then
105 assert_availability_binary md5;
106 else
107 assert_availability_binary md5sum;
108 fi
109
110 run_test_on_input_directory "${TEST_PROFILE}" "${TEST_DESCRIPTION}" "with_callback" "${OPTION_SETS}" "${TEST_EXECUTABLE}" "${INPUT_DIRECTORY}" "${INPUT_GLOB}";
57 run_test_on_input_directory "${TEST_PROFILE}" "${TEST_DESCRIPTION}" "with_stdout_reference" "${OPTION_SETS}" "${TEST_EXECUTABLE}" "${INPUT_DIRECTORY}" "${INPUT_GLOB}";
11158 RESULT=$?;
11259
11360 exit ${RESULT};
0 #!/bin/bash
1 # Tests C library functions and types.
2 #
3 # Version: 20170115
4
5 EXIT_SUCCESS=0;
6 EXIT_FAILURE=1;
7 EXIT_IGNORE=77;
8
9 TEST_PREFIX=`dirname ${PWD}`;
10 TEST_PREFIX=`basename ${TEST_PREFIX} | sed 's/^lib\([^-]*\).*$/\1/'`;
11
12 TEST_PROFILE="lib${TEST_PREFIX}";
13 LIBRARY_TESTS="catalog catalog_definition column column_type data_definition data_segment database error index io_handle key long_value multi_value notify page page_tree page_value record table table_definition";
14 LIBRARY_TESTS_WITH_INPUT="file support";
15 OPTION_SETS="";
16
17 TEST_TOOL_DIRECTORY=".";
18 INPUT_DIRECTORY="input";
19 INPUT_GLOB="*";
20
21 run_test()
22 {
23 local TEST_NAME=$1;
24
25 local TEST_DESCRIPTION="Testing: ${TEST_NAME}";
26 local TEST_EXECUTABLE="${TEST_TOOL_DIRECTORY}/${TEST_PREFIX}_test_${TEST_NAME}";
27
28 if ! test -x "${TEST_EXECUTABLE}";
29 then
30 TEST_EXECUTABLE="${TEST_EXECUTABLE}.exe";
31 fi
32
33 # TODO: add support for TEST_PROFILE and OPTION_SETS?
34 run_test_with_arguments "${TEST_DESCRIPTION}" "${TEST_EXECUTABLE}";
35 local RESULT=$?;
36
37 return ${RESULT};
38 }
39
40 run_test_with_input()
41 {
42 local TEST_NAME=$1;
43
44 local TEST_DESCRIPTION="Testing: ${TEST_NAME}";
45 local TEST_EXECUTABLE="${TEST_TOOL_DIRECTORY}/${TEST_PREFIX}_test_${TEST_NAME}";
46
47 if ! test -x "${TEST_EXECUTABLE}";
48 then
49 TEST_EXECUTABLE="${TEST_EXECUTABLE}.exe";
50 fi
51
52 run_test_on_input_directory "${TEST_PROFILE}" "${TEST_DESCRIPTION}" "default" "${OPTION_SETS}" "${TEST_EXECUTABLE}" "${INPUT_DIRECTORY}" "${INPUT_GLOB}";
53 local RESULT=$?;
54
55 return ${RESULT};
56 }
57
58 if ! test -z ${SKIP_LIBRARY_TESTS};
59 then
60 exit ${EXIT_IGNORE};
61 fi
62
63 TEST_RUNNER="tests/test_runner.sh";
64
65 if ! test -f "${TEST_RUNNER}";
66 then
67 TEST_RUNNER="./test_runner.sh";
68 fi
69
70 if ! test -f "${TEST_RUNNER}";
71 then
72 echo "Missing test runner: ${TEST_RUNNER}";
73
74 exit ${EXIT_FAILURE};
75 fi
76
77 source ${TEST_RUNNER};
78
79 RESULT=${EXIT_IGNORE};
80
81 for TEST_NAME in ${LIBRARY_TESTS};
82 do
83 run_test "${TEST_NAME}";
84 RESULT=$?;
85
86 if test ${RESULT} -ne ${EXIT_SUCCESS};
87 then
88 break;
89 fi
90 done
91
92 if test ${RESULT} -ne ${EXIT_SUCCESS} && test ${RESULT} -ne ${EXIT_IGNORE};
93 then
94 exit ${RESULT};
95 fi
96
97 for TEST_NAME in ${LIBRARY_TESTS_WITH_INPUT};
98 do
99 if test -d ${INPUT_DIRECTORY};
100 then
101 run_test_with_input "${TEST_NAME}";
102 RESULT=$?;
103 else
104 run_test "${TEST_NAME}";
105 RESULT=$?;
106 fi
107
108 if test ${RESULT} -ne ${EXIT_SUCCESS};
109 then
110 break;
111 fi
112 done
113
114 exit ${RESULT};
115
+0
-111
tests/test_python_functions.sh less more
0 #!/bin/bash
1 # Python module functions testing script
2 #
3 # Version: 20160420
4
5 EXIT_SUCCESS=0;
6 EXIT_FAILURE=1;
7 EXIT_IGNORE=77;
8
9 TEST_PREFIX=`dirname ${PWD}`;
10 TEST_PREFIX=`basename ${TEST_PREFIX} | sed 's/^lib\([^-]*\).*$/\1/'`;
11
12 TEST_PROFILE="py${TEST_PREFIX}";
13 TEST_FUNCTIONS="get_version";
14 TEST_FUNCTIONS_WITH_INPUT="open_close";
15 OPTION_SETS="";
16
17 TEST_TOOL_DIRECTORY=".";
18 INPUT_DIRECTORY="input";
19 INPUT_GLOB="*";
20
21 test_python_function()
22 {
23 local TEST_PROFILE=$1;
24 local TEST_FUNCTION=$2;
25 local OPTION_SETS=$3;
26
27 local TEST_SCRIPT="${TEST_TOOL_DIRECTORY}/py${TEST_PREFIX}_test_${TEST_FUNCTION}.py";
28
29 echo -n -e "Testing Python-bindings function: py${TEST_PREFIX}.${TEST_FUNCTION}\t";
30
31 run_test_with_arguments "${TEST_SCRIPT}";
32 local RESULT=$?;
33
34 if test ${RESULT} -ne ${EXIT_SUCCESS};
35 then
36 echo "(FAIL)";
37 else
38 echo "(PASS)";
39 fi
40 return ${RESULT};
41 }
42
43 test_python_function_with_input()
44 {
45 local TEST_PROFILE=$1;
46 local TEST_FUNCTION=$2;
47 local OPTION_SETS=$3;
48 local INPUT_DIRECTORY=$4;
49 local INPUT_GLOB=$5;
50
51 local TEST_SCRIPT="${TEST_TOOL_DIRECTORY}/py${TEST_PREFIX}_test_${TEST_FUNCTION}.py";
52
53 run_test_on_input_directory "${TEST_PROFILE}" "${TEST_FUNCTION}" "default" "${OPTION_SETS}" "${TEST_SCRIPT}" "${INPUT_DIRECTORY}" "${INPUT_GLOB}";
54 local RESULT=$?;
55
56 return ${RESULT};
57 }
58
59 if ! test -z ${SKIP_PYTHON_TESTS};
60 then
61 exit ${EXIT_IGNORE};
62 fi
63
64 TEST_RUNNER="tests/test_runner.sh";
65
66 if ! test -f "${TEST_RUNNER}";
67 then
68 TEST_RUNNER="./test_runner.sh";
69 fi
70
71 if ! test -f "${TEST_RUNNER}";
72 then
73 echo "Missing test runner: ${TEST_RUNNER}";
74
75 exit ${EXIT_FAILURE};
76 fi
77
78 source ${TEST_RUNNER};
79
80 RESULT=${EXIT_IGNORE};
81
82 for TEST_FUNCTION in ${TEST_FUNCTIONS};
83 do
84 test_python_function "${TEST_PROFILE}" "${TEST_FUNCTION}" "${OPTION_SETS}";
85 RESULT=$?;
86
87 if test ${RESULT} -ne ${EXIT_SUCCESS};
88 then
89 break;
90 fi
91 done
92
93 if test ${RESULT} -ne ${EXIT_SUCCESS} && test ${RESULT} -ne ${EXIT_IGNORE};
94 then
95 exit ${RESULT};
96 fi
97
98 for TEST_FUNCTION in ${TEST_FUNCTIONS_WITH_INPUT};
99 do
100 test_python_function_with_input "${TEST_PROFILE}" "${TEST_FUNCTION}" "${OPTION_SETS}" "${INPUT_DIRECTORY}" "${INPUT_GLOB}";
101 RESULT=$?;
102
103 if test ${RESULT} -ne ${EXIT_SUCCESS};
104 then
105 break;
106 fi
107 done
108
109 exit ${RESULT};
110
0 #!/bin/bash
1 # Tests Python module functions and types.
2 #
3 # Version: 20170115
4
5 EXIT_SUCCESS=0;
6 EXIT_FAILURE=1;
7 EXIT_IGNORE=77;
8
9 TEST_PREFIX=`dirname ${PWD}`;
10 TEST_PREFIX=`basename ${TEST_PREFIX} | sed 's/^lib\([^-]*\).*$/\1/'`;
11
12 TEST_PROFILE="py${TEST_PREFIX}";
13 TEST_FUNCTIONS="support";
14 TEST_FUNCTIONS_WITH_INPUT="file";
15 OPTION_SETS="";
16
17 TEST_TOOL_DIRECTORY=".";
18 INPUT_DIRECTORY="input";
19 INPUT_GLOB="*";
20
21 test_python_function()
22 {
23 local TEST_FUNCTION=$1;
24
25 local TEST_DESCRIPTION="Testing Python-bindings functions: ${TEST_FUNCTION}";
26 local TEST_SCRIPT="${TEST_TOOL_DIRECTORY}/py${TEST_PREFIX}_test_${TEST_FUNCTION}.py";
27
28 run_test_with_arguments "${TEST_DESCRIPTION}" "${TEST_SCRIPT}";
29 local RESULT=$?;
30
31 return ${RESULT};
32 }
33
34 test_python_function_with_input()
35 {
36 local TEST_FUNCTION=$1;
37
38 local TEST_DESCRIPTION="Testing Python-bindings functions: ${TEST_FUNCTION}";
39 local TEST_SCRIPT="${TEST_TOOL_DIRECTORY}/py${TEST_PREFIX}_test_${TEST_FUNCTION}.py";
40
41 run_test_on_input_directory "${TEST_PROFILE}" "${TEST_DESCRIPTION}" "default" "${OPTION_SETS}" "${TEST_SCRIPT}" "${INPUT_DIRECTORY}" "${INPUT_GLOB}";
42 local RESULT=$?;
43
44 return ${RESULT};
45 }
46
47 if ! test -z ${SKIP_PYTHON_TESTS};
48 then
49 exit ${EXIT_IGNORE};
50 fi
51
52 TEST_RUNNER="tests/test_runner.sh";
53
54 if ! test -f "${TEST_RUNNER}";
55 then
56 TEST_RUNNER="./test_runner.sh";
57 fi
58
59 if ! test -f "${TEST_RUNNER}";
60 then
61 echo "Missing test runner: ${TEST_RUNNER}";
62
63 exit ${EXIT_FAILURE};
64 fi
65
66 source ${TEST_RUNNER};
67
68 RESULT=${EXIT_IGNORE};
69
70 for TEST_FUNCTION in ${TEST_FUNCTIONS};
71 do
72 test_python_function "${TEST_FUNCTION}";
73 RESULT=$?;
74
75 if test ${RESULT} -ne ${EXIT_SUCCESS};
76 then
77 break;
78 fi
79 done
80
81 if test ${RESULT} -ne ${EXIT_SUCCESS} && test ${RESULT} -ne ${EXIT_IGNORE};
82 then
83 exit ${RESULT};
84 fi
85
86 for TEST_FUNCTION in ${TEST_FUNCTIONS_WITH_INPUT};
87 do
88 test_python_function_with_input "${TEST_FUNCTION}";
89 RESULT=$?;
90
91 if test ${RESULT} -ne ${EXIT_SUCCESS};
92 then
93 break;
94 fi
95 done
96
97 exit ${RESULT};
98
00 #!/bin/bash
11 # Bash functions to run an executable for testing.
22 #
3 # Version: 20160426
3 # Version: 20161115
44 #
55 # When CHECK_WITH_GDB is set to a non-empty value the test executable
66 # is run with gdb, otherwise it is run without.
3434 fi
3535 }
3636
37 # Checks the availability of binaries and exits if not available.
38 #
39 # Globals:
40 # CHECK_WITH_GDB
41 # CHECK_WITH_VALGRIND
42 #
43 assert_availability_binaries()
44 {
45 assert_availability_binary cat;
46 assert_availability_binary cut;
47 assert_availability_binary diff;
48 assert_availability_binary file;
49 assert_availability_binary gzip;
50 assert_availability_binary ls;
51 assert_availability_binary readlink;
52 assert_availability_binary sed;
53 assert_availability_binary tr;
54 assert_availability_binary uname;
55 assert_availability_binary wc;
56 assert_availability_binary zcat;
57
58 if test -n "${CHECK_WITH_GDB}";
59 then
60 assert_availability_binary gdb;
61
62 elif test -n "${CHECK_WITH_VALGRIND}";
63 then
64 assert_availability_binary valgrind;
65 fi
66 }
67
3768 # Checks if the input directory is in the ignore list.
3869 #
3970 # Arguments:
74105 {
75106 local TEST_EXECUTABLE=$1;
76107
77 TEST_EXECUTABLE=`readlink -f ${TEST_EXECUTABLE}`;
108 TEST_EXECUTABLE=$( readlink_f "${TEST_EXECUTABLE}" );
78109
79110 # Note that the behavior of `file -bi` is not helpful on Mac OS X.
80111 local EXECUTABLE_TYPE=`file -b ${TEST_EXECUTABLE}`;
260291 echo "${TEST_SET_DIRECTORY}";
261292 }
262293
294 # Provides a cross-platform variant of "readlink -f"
295 #
296 # Arguments:
297 # a string containing a path
298 #
299 # Returns:
300 # a string containing the path with all symbolic links resolved
301 #
302 readlink_f() {
303 local TARGET="$1"
304
305 if test -f "${TARGET}";
306 then
307 while test -L "${TARGET}";
308 do
309 TARGET=`readlink "${TARGET}"`;
310 done
311 fi
312 local BASENAME=`basename "${TARGET}"`;
313 local DIRNAME=`dirname "${TARGET}"`;
314
315 DIRNAME=`(cd "${DIRNAME}" && pwd -P)`;
316
317 echo "${DIRNAME}/${BASENAME}";
318 }
319
263320 # Reads the test profile ignore file if it exists.
264321 #
265322 # Arguments:
314371 # PYTHON_VERSION
315372 #
316373 # Arguments:
374 # a string containing the test description
317375 # a string containing the path of the test executable
318376 # an array containing the arguments for the test executable
319377 #
322380 #
323381 run_test_with_arguments()
324382 {
325 local TEST_EXECUTABLE=$1;
326 shift 1;
383 local TEST_DESCRIPTION=$1;
384 local TEST_EXECUTABLE=$2;
385 shift 2;
327386 local ARGUMENTS=$@;
328387
329388 if ! test -f "${TEST_EXECUTABLE}";
357416 fi
358417 local RESULT=0;
359418
360 if ! test -z ${CHECK_WITH_GDB};
419 if test -n "${CHECK_WITH_GDB}";
361420 then
362421 local TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} );
363422 local LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} );
384443 fi
385444 fi
386445
387 elif ! test -z ${CHECK_WITH_VALGRIND};
446 elif test -n "${CHECK_WITH_VALGRIND}";
388447 then
389448 local TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} );
390449 local LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} );
469528
470529 if test "${PLATFORM}" = "Darwin";
471530 then
472 if ! test -z ${CHECK_WITH_STDERR};
531 if test -n "${CHECK_WITH_STDERR}";
473532 then
474533 DYLD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]};
475534 RESULT=$?;
478537 RESULT=$?;
479538 fi
480539 else
481 if ! test -z ${CHECK_WITH_STDERR};
540 if test -n "${CHECK_WITH_STDERR}";
482541 then
483542 LD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]};
484543 RESULT=$?;
496555 return ${EXIT_FAILURE};
497556 fi
498557
499 if ! test -z ${CHECK_WITH_STDERR};
558 if test -n "${CHECK_WITH_STDERR}";
500559 then
501560 ${TEST_EXECUTABLE} ${ARGUMENTS[@]};
502561 RESULT=$?;
503562 else
504563 ${TEST_EXECUTABLE} ${ARGUMENTS[@]} 2> /dev/null;
505564 RESULT=$?;
565 fi
566 fi
567 if test -n "${TEST_DESCRIPTION}";
568 then
569 echo -n "${TEST_DESCRIPTION} ";
570
571 if test ${RESULT} -ne ${EXIT_SUCCESS};
572 then
573 echo " (FAIL)";
574 else
575 echo " (PASS)";
506576 fi
507577 fi
508578 return ${RESULT};
562632 fi
563633 local RESULT=0;
564634
565 if ! test -z ${CHECK_WITH_GDB};
635 if test -n "${CHECK_WITH_GDB}";
566636 then
567637 local TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} );
568638 local LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} );
589659 fi
590660 fi
591661
592 elif ! test -z ${CHECK_WITH_VALGRIND};
662 elif test -n "${CHECK_WITH_VALGRIND}";
593663 then
594664 local TEST_EXECUTABLE=$( find_binary_executable ${TEST_EXECUTABLE} );
595665 local LIBRARY_PATH=$( find_binary_library_path ${TEST_EXECUTABLE} );
674744
675745 if test "${PLATFORM}" = "Darwin";
676746 then
677 if ! test -z ${CHECK_WITH_STDERR};
747 if test -n "${CHECK_WITH_STDERR}";
678748 then
679749 DYLD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}";
680750 RESULT=$?;
683753 RESULT=$?;
684754 fi
685755 else
686 if ! test -z ${CHECK_WITH_STDERR};
756 if test -n "${CHECK_WITH_STDERR}";
687757 then
688758 LD_LIBRARY_PATH="${LIBRARY_PATH}" PYTHONPATH="${PYTHON_MODULE_PATH}" "${PYTHON}" "${TEST_EXECUTABLE}" ${ARGUMENTS[@]} "${INPUT_FILE}";
689759 RESULT=$?;
701771 return ${EXIT_FAILURE};
702772 fi
703773
704 if ! test -z ${CHECK_WITH_STDERR};
774 if test -n "${CHECK_WITH_STDERR}";
705775 then
706776 ${TEST_EXECUTABLE} ${ARGUMENTS[@]} "${INPUT_FILE}";
707777 RESULT=$?;
745815 local OPTIONS=();
746816 local TEST_OUTPUT="${INPUT_NAME}";
747817
748 if ! test -z "${OPTION_SET}";
818 if test -n "${OPTION_SET}";
749819 then
750820 OPTIONS_STRING=$(read_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}");
751821 IFS=" " read -a OPTIONS <<< "${OPTIONS_STRING}";
766836
767837 elif test "${TEST_MODE}" = "with_stdout_reference";
768838 then
769 TEST_EXECUTABLE=`readlink -f ${TEST_EXECUTABLE}`;
839 TEST_EXECUTABLE=$( readlink_f "${TEST_EXECUTABLE}" );
770840
771841 if ! test -x ${TEST_EXECUTABLE};
772842 then
775845
776846 return ${EXIT_FAILURE};
777847 fi
778 local INPUT_FILE_FULL_PATH=`readlink -f "${INPUT_FILE}"`;
848 local INPUT_FILE_FULL_PATH=$( readlink_f "${INPUT_FILE}" );
779849 local TEST_LOG="${TEST_OUTPUT}.log";
780850
781851 (cd ${TMPDIR} && run_test_with_input_and_arguments "${TEST_EXECUTABLE}" "${INPUT_FILE_FULL_PATH}" ${ARGUMENTS[@]} ${OPTIONS[@]} | sed '1,2d' > "${TEST_LOG}");
803873
804874 rm -rf ${TMPDIR};
805875
806 if test -z "${OPTION_SET}";
807 then
808 echo -n "Testing ${TEST_DESCRIPTION} with input: ${INPUT_FILE}";
809 else
810 echo -n "Testing ${TEST_DESCRIPTION} with option: ${OPTION_SET} and input: ${INPUT_FILE}";
811 fi
812
813 if test ${RESULT} -ne ${EXIT_SUCCESS};
814 then
815 echo " (FAIL)";
816 else
817 echo " (PASS)";
876 if test -n "${TEST_DESCRIPTION}";
877 then
878 if test -z "${OPTION_SET}";
879 then
880 echo -n "${TEST_DESCRIPTION} with input: ${INPUT_FILE}";
881 else
882 echo -n "${TEST_DESCRIPTION} with option: ${OPTION_SET} and input: ${INPUT_FILE}";
883 fi
884
885 if test ${RESULT} -ne ${EXIT_SUCCESS};
886 then
887 echo " (FAIL)";
888 else
889 echo " (PASS)";
890 fi
891 fi
892 return ${RESULT};
893 }
894
895 # Runs the test with options on the input file.
896 #
897 # Note that this function is not intended to be directly invoked
898 # from outside the test runner script.
899 #
900 # Arguments:
901 # a string containing the path of the test set directory
902 # a string containing the description of the test
903 # a string containing the test mode
904 # a string containing the name of the option sets
905 # a string containing the path of the test executable
906 # a string containing the path of the test input file
907 # an array containing the arguments for the test executable
908 #
909 # Returns:
910 # an integer containg the exit status of the test executable
911 #
912 run_test_on_input_file_with_options()
913 {
914 local TEST_SET_DIRECTORY=$1;
915 local TEST_DESCRIPTION=$2;
916 local TEST_MODE=$3;
917 local OPTION_SETS=$4;
918 local TEST_EXECUTABLE=$5;
919 local INPUT_FILE=$6;
920 shift 6;
921 local ARGUMENTS=$@;
922
923 local RESULT=${EXIT_SUCCESS};
924 local TESTED_WITH_OPTIONS=0;
925
926 for OPTION_SET in `echo ${OPTION_SETS} | tr ' ' '\n'`;
927 do
928 local OPTION_FILE=$(get_testion_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}");
929
930 if ! test -f ${OPTION_FILE};
931 then
932 continue
933 fi
934
935 run_test_on_input_file "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "${TEST_MODE}" "${OPTION_SET}" "${TEST_EXECUTABLE}" "${INPUT_FILE}" ${ARGUMENTS[@]};
936 RESULT=$?;
937
938 if test ${RESULT} -ne ${EXIT_SUCCESS};
939 then
940 break;
941 fi
942 TESTED_WITH_OPTIONS=1;
943 done
944
945 if test ${RESULT} -eq ${EXIT_SUCCESS} && test ${TESTED_WITH_OPTIONS} -eq 0;
946 then
947 run_test_on_input_file "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "${TEST_MODE}" "" "${TEST_EXECUTABLE}" "${INPUT_FILE}" ${ARGUMENTS[@]};
948 RESULT=$?;
818949 fi
819950 return ${RESULT};
820951 }
838969 # to stdout, except for the first 2 lines, should
839970 # be compared to a reference file, if available.
840971 # Note the globals override the test mode.
841 # a string containing the name of the option set
972 # a string containing the name of the option sets
842973 # a string containing the path of the test executable
843974 # a string containing the path of the test input directory
844975 # a string containing the input glob
859990 shift 7;
860991 local ARGUMENTS=$@;
861992
862 assert_availability_binary cat;
863 assert_availability_binary cut;
864 assert_availability_binary diff;
865 assert_availability_binary file;
866 assert_availability_binary gzip;
867 assert_availability_binary ls;
868 assert_availability_binary readlink;
869 assert_availability_binary sed;
870 assert_availability_binary tr;
871 assert_availability_binary uname;
872 assert_availability_binary wc;
873 assert_availability_binary zcat;
874
875 if ! test -z ${CHECK_WITH_GDB};
876 then
877 assert_availability_binary gdb;
878
879 elif ! test -z ${CHECK_WITH_VALGRIND};
880 then
881 assert_availability_binary valgrind;
882 fi
993 assert_availability_binaries;
883994
884995 if ! test "${TEST_MODE}" = "default" && test "${TEST_MODE}" != "with_callback" && ! test "${TEST_MODE}" = "with_stdout_reference";
885996 then
9341045 local INPUT_FILES="";
9351046 if test -f "${TEST_SET_DIRECTORY}/files";
9361047 then
937 INPUT_FILES=`cat ${TEST_SET_DIRECTORY}/files | sed "s?^?${TEST_SET_INPUT_DIRECTORY}/?"`;
938 else
939 INPUT_FILES="${TEST_SET_INPUT_DIRECTORY}/${INPUT_GLOB}";
940 fi
941
942 while read -r INPUT_FILE;
943 do
944 local TESTED_WITH_OPTIONS=0;
945
946 for OPTION_SET in `echo ${OPTION_SETS} | tr ' ' '\n'`;
1048 while read -r INPUT_FILE;
9471049 do
948 local OPTION_FILE=$(get_testion_option_file "${TEST_SET_DIRECTORY}" "${INPUT_FILE}" "${OPTION_SET}");
949
950 if ! test -f ${OPTION_FILE};
951 then
952 continue
953 fi
954
955 run_test_on_input_file "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "${TEST_MODE}" "${OPTION_SET}" "${TEST_EXECUTABLE}" "${INPUT_FILE}" ${ARGUMENTS[@]};
1050 run_test_on_input_file_with_options "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "${TEST_MODE}" "${OPTION_SETS}" "${TEST_EXECUTABLE}" "${INPUT_FILE}" ${ARGUMENTS[@]};
9561051 RESULT=$?;
9571052
9581053 if test ${RESULT} -ne ${EXIT_SUCCESS};
9591054 then
9601055 return ${RESULT};
9611056 fi
962 TESTED_WITH_OPTIONS=1;
963 done
964
965 if test ${RESULT} -eq ${EXIT_SUCCESS} && test ${TESTED_WITH_OPTIONS} -eq 0;
966 then
967 run_test_on_input_file "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "${TEST_MODE}" "" "${TEST_EXECUTABLE}" "${INPUT_FILE}" ${ARGUMENTS[@]};
1057 done < <(cat ${TEST_SET_DIRECTORY}/files | sed "s?^?${TEST_SET_INPUT_DIRECTORY}/?");
1058 else
1059 while read -r INPUT_FILE;
1060 do
1061 run_test_on_input_file_with_options "${TEST_SET_DIRECTORY}" "${TEST_DESCRIPTION}" "${TEST_MODE}" "${OPTION_SETS}" "${TEST_EXECUTABLE}" "${INPUT_FILE}" ${ARGUMENTS[@]};
9681062 RESULT=$?;
9691063
9701064 if test ${RESULT} -ne ${EXIT_SUCCESS};
9711065 then
9721066 return ${RESULT};
9731067 fi
974 fi
975 done < <(ls -1 ${INPUT_FILES});
1068 done < <(ls -1 ${TEST_SET_INPUT_DIRECTORY}/${INPUT_GLOB});
1069 fi
1070
9761071 done
9771072
9781073 return ${RESULT};