diff options
| author | David M. Syzdek <david@syzdek.net> | 2021-10-11 14:48:12 -0800 |
|---|---|---|
| committer | David M. Syzdek <david@syzdek.net> | 2021-10-11 14:48:12 -0800 |
| commit | 2dccd926445b5cb23092c856a349c031d0e53745 (patch) | |
| tree | 3d60325000f85d5e36bc5d77cde33480cda34345 | |
| parent | 4d07591e3a9281553d28848b10e147b93bfed7e9 (diff) | |
| download | dmstools-2dccd926445b5cb23092c856a349c031d0e53745.tar.gz dmstools-2dccd926445b5cb23092c856a349c031d0e53745.tar.bz2 dmstools-2dccd926445b5cb23092c856a349c031d0e53745.tar.xz dmstools-2dccd926445b5cb23092c856a349c031d0e53745.zip | |
libdms.la: removing libdms.la and dmsversion
| -rw-r--r-- | Makefile.am | 40 | ||||
| -rw-r--r-- | acinclude.m4 | 25 | ||||
| -rw-r--r-- | configure.ac | 2 | ||||
| -rw-r--r-- | include/dms.h | 173 | ||||
| -rw-r--r-- | include/dmsversion.h.in | 60 | ||||
| -rw-r--r-- | lib/libdms.h | 80 | ||||
| -rw-r--r-- | lib/libdms.sym | 60 | ||||
| -rw-r--r-- | lib/libdms_version.c | 112 | ||||
| -rw-r--r-- | lib/libdms_version.h | 40 |
9 files changed, 3 insertions, 589 deletions
diff --git a/Makefile.am b/Makefile.am index 82adaa7..1d45fd2 100644 --- a/Makefile.am +++ b/Makefile.am | |||
| @@ -56,9 +56,8 @@ DEFS = -DLOCALEDIR="\"$(localedir)\"" @DEFS@ | |||
| 56 | 56 | ||
| 57 | # automake targets | 57 | # automake targets |
| 58 | bin_PROGRAMS = | 58 | bin_PROGRAMS = |
| 59 | include_HEADERS = include/dms.h \ | 59 | include_HEADERS = |
| 60 | include/dmsversion.h | 60 | lib_LTLIBRARIES = |
| 61 | lib_LTLIBRARIES = lib/libdms.la | ||
| 62 | noinst_PROGRAMS = | 61 | noinst_PROGRAMS = |
| 63 | noinst_HEADERS = src/common.h | 62 | noinst_HEADERS = src/common.h |
| 64 | man_MANS = | 63 | man_MANS = |
| @@ -67,7 +66,6 @@ EXTRA = src/bindump \ | |||
| 67 | src/bitops \ | 66 | src/bitops \ |
| 68 | src/codetagger \ | 67 | src/codetagger \ |
| 69 | src/colors \ | 68 | src/colors \ |
| 70 | src/dmsversion \ | ||
| 71 | src/endian \ | 69 | src/endian \ |
| 72 | src/macaddrinfo \ | 70 | src/macaddrinfo \ |
| 73 | src/netcalc \ | 71 | src/netcalc \ |
| @@ -78,24 +76,9 @@ EXTRA = src/bindump \ | |||
| 78 | src/typedef-info | 76 | src/typedef-info |
| 79 | 77 | ||
| 80 | 78 | ||
| 81 | # macros for lib/libotadm.la | ||
| 82 | lib_libdms_la_DEPENDENCIES = Makefile lib/libdms.sym | ||
| 83 | lib_libdms_la_CFLAGS = $(AM_CFLAGS) | ||
| 84 | lib_libdms_la_LIBADD = $(AM_LIBS) | ||
| 85 | lib_libdms_la_LDFLAGS = -rpath '$(libdir)' \ | ||
| 86 | -version-info $(LIB_VERSION_INFO) \ | ||
| 87 | $(AM_LDFLAGS) \ | ||
| 88 | -export-symbols $(srcdir)/lib/libdms.sym | ||
| 89 | lib_libdms_la_SOURCES = include/dms.h \ | ||
| 90 | include/dmsversion.h \ | ||
| 91 | lib/libdms.h \ | ||
| 92 | lib/libdms_version.c \ | ||
| 93 | lib/libdms_version.h | ||
| 94 | |||
| 95 | |||
| 96 | # lists | 79 | # lists |
| 97 | AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = | 80 | AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = |
| 98 | BUILT_SOURCES = include/dmsversion.h | 81 | BUILT_SOURCES = |
| 99 | TESTS = | 82 | TESTS = |
| 100 | XFAIL_TESTS = | 83 | XFAIL_TESTS = |
| 101 | EXTRA_MANS = | 84 | EXTRA_MANS = |
| @@ -106,8 +89,6 @@ EXTRA_DIST = autogen.sh \ | |||
| 106 | doc/macaddrinfo.1.in \ | 89 | doc/macaddrinfo.1.in \ |
| 107 | doc/numconvert.1.in \ | 90 | doc/numconvert.1.in \ |
| 108 | doc/posixregex.1.in \ | 91 | doc/posixregex.1.in \ |
| 109 | include/dmsversion.h.in \ | ||
| 110 | lib/libdms.sym \ | ||
| 111 | m4/dmstools_gcc.m4 \ | 92 | m4/dmstools_gcc.m4 \ |
| 112 | m4/dmstools_git.m4 \ | 93 | m4/dmstools_git.m4 \ |
| 113 | $(srcdir)/build-aux/dmstools.tags \ | 94 | $(srcdir)/build-aux/dmstools.tags \ |
| @@ -129,7 +110,6 @@ CLEANFILES = \ | |||
| 129 | config.h.in~ $(srcdir)/config.h.in~ \ | 110 | config.h.in~ $(srcdir)/config.h.in~ \ |
| 130 | configure.scan $(srcdir)/configure.scan \ | 111 | configure.scan $(srcdir)/configure.scan \ |
| 131 | $(man_MANS) \ | 112 | $(man_MANS) \ |
| 132 | include/dmsversion.h \ | ||
| 133 | @PACKAGE_TARNAME@-*.tar.* \ | 113 | @PACKAGE_TARNAME@-*.tar.* \ |
| 134 | @PACKAGE_TARNAME@-*.zip | 114 | @PACKAGE_TARNAME@-*.zip |
| 135 | DISTCHECK_CONFIGURE_FLAGS = --enable-strictwarnings \ | 115 | DISTCHECK_CONFIGURE_FLAGS = --enable-strictwarnings \ |
| @@ -184,16 +164,6 @@ if WANT_COLORS | |||
| 184 | endif | 164 | endif |
| 185 | 165 | ||
| 186 | 166 | ||
| 187 | # macros for src/dmsversion | ||
| 188 | src_dmsversion_DEPENDENCIES = $(lib_LTLIBRARIES) Makefile | ||
| 189 | src_dmsversion_CPPFLAGS = -DPROGRAM_NAME="\"dmsversion\"" $(AM_CPPFLAGS) | ||
| 190 | src_dmsversion_LDADD = $(AM_LDADD) lib/libdms.la | ||
| 191 | src_dmsversion_SOURCES = $(noinst_HEADERS) src/dmsversion.c | ||
| 192 | if WANT_DMSVERSION | ||
| 193 | bin_PROGRAMS += src/dmsversion | ||
| 194 | endif | ||
| 195 | |||
| 196 | |||
| 197 | # macros for src/endian | 167 | # macros for src/endian |
| 198 | src_endian_DEPENDENCIES = $(lib_LTLIBRARIES) Makefile | 168 | src_endian_DEPENDENCIES = $(lib_LTLIBRARIES) Makefile |
| 199 | src_endian_CPPFLAGS = -DPROGRAM_NAME="\"endian\"" $(AM_CPPFLAGS) | 169 | src_endian_CPPFLAGS = -DPROGRAM_NAME="\"endian\"" $(AM_CPPFLAGS) |
| @@ -291,10 +261,6 @@ doc/numconvert.1: Makefile $(srcdir)/doc/numconvert.1.in | |||
| 291 | doc/posixregex.1: Makefile $(srcdir)/doc/posixregex.1.in | 261 | doc/posixregex.1: Makefile $(srcdir)/doc/posixregex.1.in |
| 292 | $(do_subst_dt) | 262 | $(do_subst_dt) |
| 293 | 263 | ||
| 294 | include/dmsversion.h: Makefile $(srcdir)/include/dmsversion.h.in | ||
| 295 | $(mkdir_p) include | ||
| 296 | $(do_subst_dt) | ||
| 297 | |||
| 298 | 264 | ||
| 299 | # local targets | 265 | # local targets |
| 300 | install-exec-local: | 266 | install-exec-local: |
diff --git a/acinclude.m4 b/acinclude.m4 index 476450f..75d54cd 100644 --- a/acinclude.m4 +++ b/acinclude.m4 | |||
| @@ -219,31 +219,6 @@ AC_DEFUN([AC_DMS_TOOL_COLORS],[dnl | |||
| 219 | ])dnl | 219 | ])dnl |
| 220 | 220 | ||
| 221 | 221 | ||
| 222 | # AC_DMS_TOOL_DMSVERSION | ||
| 223 | # ______________________________________________________________________________ | ||
| 224 | AC_DEFUN([AC_DMS_TOOL_DMSVERSION],[dnl | ||
| 225 | |||
| 226 | AC_REQUIRE([AC_DMS_TOOL_ALL]) | ||
| 227 | |||
| 228 | enableval="" | ||
| 229 | AC_ARG_ENABLE( | ||
| 230 | dmsversion, | ||
| 231 | [AS_HELP_STRING([--enable-dmsversion], [enable building dmsversion])], | ||
| 232 | [ EDMSVERSION=$enableval ], | ||
| 233 | [ EDMSVERSION=$enableval ] | ||
| 234 | ) | ||
| 235 | |||
| 236 | if test "x${EDMSVERSION}" == "x";then | ||
| 237 | EDMSVERSION="${EALL}" | ||
| 238 | fi | ||
| 239 | if test "x${EDMSVERSION}" == "xauto";then | ||
| 240 | EDMSVERSION=no | ||
| 241 | fi | ||
| 242 | |||
| 243 | AM_CONDITIONAL([WANT_DMSVERSION], [test "$EDMSVERSION" = "yes"]) | ||
| 244 | ])dnl | ||
| 245 | |||
| 246 | |||
| 247 | # AC_DMS_TOOL_ENDIAN | 222 | # AC_DMS_TOOL_ENDIAN |
| 248 | # ______________________________________________________________________________ | 223 | # ______________________________________________________________________________ |
| 249 | AC_DEFUN([AC_DMS_TOOL_ENDIAN],[dnl | 224 | AC_DEFUN([AC_DMS_TOOL_ENDIAN],[dnl |
diff --git a/configure.ac b/configure.ac index 05804aa..aaa7550 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -189,7 +189,6 @@ AC_DMS_TOOL_BITCOPY | |||
| 189 | AC_DMS_TOOL_BITOPS | 189 | AC_DMS_TOOL_BITOPS |
| 190 | AC_DMS_TOOL_CODETAGGER | 190 | AC_DMS_TOOL_CODETAGGER |
| 191 | AC_DMS_TOOL_COLORS | 191 | AC_DMS_TOOL_COLORS |
| 192 | AC_DMS_TOOL_DMSVERSION | ||
| 193 | AC_DMS_TOOL_ENDIAN | 192 | AC_DMS_TOOL_ENDIAN |
| 194 | AC_DMS_TOOL_MACADDRINFO | 193 | AC_DMS_TOOL_MACADDRINFO |
| 195 | AC_DMS_TOOL_NETCALC | 194 | AC_DMS_TOOL_NETCALC |
| @@ -212,7 +211,6 @@ AC_MSG_NOTICE([ build bitcopy $EBITCOPY]) | |||
| 212 | AC_MSG_NOTICE([ build bitops $EBITOPS]) | 211 | AC_MSG_NOTICE([ build bitops $EBITOPS]) |
| 213 | AC_MSG_NOTICE([ build codetagger $ECODETAGGER]) | 212 | AC_MSG_NOTICE([ build codetagger $ECODETAGGER]) |
| 214 | AC_MSG_NOTICE([ build colors $ECOLORS]) | 213 | AC_MSG_NOTICE([ build colors $ECOLORS]) |
| 215 | AC_MSG_NOTICE([ build dmsversion $EDMSVERSION]) | ||
| 216 | AC_MSG_NOTICE([ build endian $EENDIAN]) | 214 | AC_MSG_NOTICE([ build endian $EENDIAN]) |
| 217 | AC_MSG_NOTICE([ build macaddrinfo $EMACADDRINFO]) | 215 | AC_MSG_NOTICE([ build macaddrinfo $EMACADDRINFO]) |
| 218 | AC_MSG_NOTICE([ build netcalc $ENETCALC]) | 216 | AC_MSG_NOTICE([ build netcalc $ENETCALC]) |
diff --git a/include/dms.h b/include/dms.h deleted file mode 100644 index 7d68728..0000000 --- a/include/dms.h +++ /dev/null | |||
| @@ -1,173 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * DMS Tools and Utilities | ||
| 3 | * Copyright (C) 2010 David M. Syzdek <david@syzdek.net>. | ||
| 4 | * | ||
| 5 | * @SYZDEK_LICENSE_HEADER_START@ | ||
| 6 | * | ||
| 7 | * Redistribution and use in source and binary forms, with or without | ||
| 8 | * modification, are permitted provided that the following conditions are | ||
| 9 | * met: | ||
| 10 | * | ||
| 11 | * * Redistributions of source code must retain the above copyright | ||
| 12 | * notice, this list of conditions and the following disclaimer. | ||
| 13 | * * Redistributions in binary form must reproduce the above copyright | ||
| 14 | * notice, this list of conditions and the following disclaimer in the | ||
| 15 | * documentation and/or other materials provided with the distribution. | ||
| 16 | * * Neither the name of David M. Syzdek nor the | ||
| 17 | * names of its contributors may be used to endorse or promote products | ||
| 18 | * derived from this software without specific prior written permission. | ||
| 19 | * | ||
| 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
| 21 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
| 22 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAVID M. SYZDEK BE LIABLE FOR | ||
| 24 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
| 26 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
| 27 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 28 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 29 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 30 | * SUCH DAMAGE. | ||
| 31 | * | ||
| 32 | * @SYZDEK_LICENSE_HEADER_END@ | ||
| 33 | */ | ||
| 34 | /** | ||
| 35 | * @file lib/dms.h defines API for libdms.la | ||
| 36 | */ | ||
| 37 | #ifndef _DMS_H | ||
| 38 | #define _DMS_H 1 | ||
| 39 | |||
| 40 | ////////////// | ||
| 41 | // // | ||
| 42 | // Macros // | ||
| 43 | // // | ||
| 44 | ////////////// | ||
| 45 | |||
| 46 | /* | ||
| 47 | * The macros "BEGIN_C_DECLS" and "END_C_DECLS" are taken verbatim | ||
| 48 | * from section 7.1 of the Libtool 1.5.14 manual. | ||
| 49 | */ | ||
| 50 | /* BEGIN_C_DECLS should be used at the beginning of your declarations, | ||
| 51 | so that C++ compilers don't mangle their names. Use END_C_DECLS at | ||
| 52 | the end of C declarations. */ | ||
| 53 | #undef BEGIN_C_DECLS | ||
| 54 | #undef END_C_DECLS | ||
| 55 | #if defined(__cplusplus) || defined(c_plusplus) | ||
| 56 | # define BEGIN_C_DECLS extern "C" { ///< exports as C functions | ||
| 57 | # define END_C_DECLS } ///< exports as C functions | ||
| 58 | #else | ||
| 59 | # define BEGIN_C_DECLS /* empty */ ///< exports as C functions | ||
| 60 | # define END_C_DECLS /* empty */ ///< exports as C functions | ||
| 61 | #endif | ||
| 62 | |||
| 63 | |||
| 64 | /* | ||
| 65 | * The macro "PARAMS" is taken verbatim from section 7.1 of the | ||
| 66 | * Libtool 1.5.14 manual. | ||
| 67 | */ | ||
| 68 | /* PARAMS is a macro used to wrap function prototypes, so that | ||
| 69 | compilers that don't understand ANSI C prototypes still work, | ||
| 70 | and ANSI C compilers can issue warnings about type mismatches. */ | ||
| 71 | #undef PARAMS | ||
| 72 | #if defined (__STDC__) || defined (_AIX) \ | ||
| 73 | || (defined (__mips) && defined (_SYSTYPE_SVR4)) \ | ||
| 74 | || defined(WIN32) || defined (__cplusplus) | ||
| 75 | # define PARAMS(protos) protos ///< wraps function arguments in order to support ANSI C | ||
| 76 | #else | ||
| 77 | # define PARAMS(protos) () ///< wraps function arguments in order to support ANSI C | ||
| 78 | #endif | ||
| 79 | |||
| 80 | |||
| 81 | /* | ||
| 82 | * The following macro is taken verbatim from section 5.40 of the GCC | ||
| 83 | * 4.0.2 manual. | ||
| 84 | */ | ||
| 85 | #if __STDC_VERSION__ < 199901L | ||
| 86 | # if __GNUC__ >= 2 | ||
| 87 | # define __func__ __FUNCTION__ | ||
| 88 | # else | ||
| 89 | # define __func__ "<unknown>" | ||
| 90 | # endif | ||
| 91 | #endif | ||
| 92 | |||
| 93 | |||
| 94 | // Exports function type | ||
| 95 | #ifdef WIN32 | ||
| 96 | # ifdef DMS_LIBS_DYNAMIC | ||
| 97 | # define DMS_F(type) extern __declspec(dllexport) type ///< used for library calls | ||
| 98 | # define DMS_V(type) extern __declspec(dllexport) type ///< used for library calls | ||
| 99 | # else | ||
| 100 | # define DMS_F(type) extern __declspec(dllimport) type ///< used for library calls | ||
| 101 | # define DMS_V(type) extern __declspec(dllimport) type ///< used for library calls | ||
| 102 | # endif | ||
| 103 | #else | ||
| 104 | # ifdef DMS_LIBS_DYNAMIC | ||
| 105 | # define DMS_F(type) type ///< used for library calls | ||
| 106 | # define DMS_V(type) type ///< used for library calls | ||
| 107 | # else | ||
| 108 | # define DMS_F(type) extern type ///< used for library calls | ||
| 109 | # define DMS_V(type) extern type ///< used for library calls | ||
| 110 | # endif | ||
| 111 | #endif | ||
| 112 | |||
| 113 | |||
| 114 | /////////////// | ||
| 115 | // // | ||
| 116 | // Headers // | ||
| 117 | // // | ||
| 118 | /////////////// | ||
| 119 | |||
| 120 | #include <inttypes.h> | ||
| 121 | #include <dmsversion.h> | ||
| 122 | |||
| 123 | |||
| 124 | /////////////////// | ||
| 125 | // // | ||
| 126 | // Definitions // | ||
| 127 | // // | ||
| 128 | /////////////////// | ||
| 129 | |||
| 130 | #define DMS_TRUE 0x01 | ||
| 131 | #define DMS_FALSE 0x00 | ||
| 132 | #define DMS_YES 0x01 | ||
| 133 | #define DMS_NO 0x00 | ||
| 134 | |||
| 135 | |||
| 136 | ///////////////// | ||
| 137 | // // | ||
| 138 | // Datatypes // | ||
| 139 | // // | ||
| 140 | ///////////////// | ||
| 141 | |||
| 142 | |||
| 143 | ////////////////// | ||
| 144 | // // | ||
| 145 | // Prototypes // | ||
| 146 | // // | ||
| 147 | ////////////////// | ||
| 148 | BEGIN_C_DECLS | ||
| 149 | |||
| 150 | // returns the binary GNU Libtool LIB_VERSION_INFO value | ||
| 151 | DMS_F(int) dms_lib_version PARAMS((void)); | ||
| 152 | |||
| 153 | // returns the GNU Libtool LIB_VERSION_AGE value | ||
| 154 | DMS_F(int) dms_lib_version_age PARAMS((void)); | ||
| 155 | |||
| 156 | // checks for library binary compatability | ||
| 157 | DMS_F(int) dms_lib_version_check PARAMS((int version)); | ||
| 158 | |||
| 159 | // returns the GNU Libtool LIB_VERSION_CURRENT value | ||
| 160 | DMS_F(int) dms_lib_version_current PARAMS((void)); | ||
| 161 | |||
| 162 | // returns the GNU Libtool LIB_VERSION_INFO string | ||
| 163 | DMS_F(const char *) dms_lib_version_info PARAMS((void)); | ||
| 164 | |||
| 165 | // returns the GNU Libtool LIB_VERSION_REVISION value | ||
| 166 | DMS_F(int) dms_lib_version_revision PARAMS((void)); | ||
| 167 | |||
| 168 | // returns version info string for library | ||
| 169 | DMS_F(const char *) dms_version PARAMS((void)); | ||
| 170 | |||
| 171 | |||
| 172 | END_C_DECLS | ||
| 173 | #endif /* end of header file */ | ||
diff --git a/include/dmsversion.h.in b/include/dmsversion.h.in deleted file mode 100644 index 9f7de55..0000000 --- a/include/dmsversion.h.in +++ /dev/null | |||
| @@ -1,60 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * DMS Tools and Utilities | ||
| 3 | * Copyright (C) 2010 David M. Syzdek <david@syzdek.net>. | ||
| 4 | * | ||
| 5 | * @SYZDEK_LICENSE_HEADER_START@ | ||
| 6 | * | ||
| 7 | * Redistribution and use in source and binary forms, with or without | ||
| 8 | * modification, are permitted provided that the following conditions are | ||
| 9 | * met: | ||
| 10 | * | ||
| 11 | * * Redistributions of source code must retain the above copyright | ||
| 12 | * notice, this list of conditions and the following disclaimer. | ||
| 13 | * * Redistributions in binary form must reproduce the above copyright | ||
| 14 | * notice, this list of conditions and the following disclaimer in the | ||
| 15 | * documentation and/or other materials provided with the distribution. | ||
| 16 | * * Neither the name of David M. Syzdek nor the | ||
| 17 | * names of its contributors may be used to endorse or promote products | ||
| 18 | * derived from this software without specific prior written permission. | ||
| 19 | * | ||
| 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
| 21 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
| 22 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAVID M. SYZDEK BE LIABLE FOR | ||
| 24 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
| 26 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
| 27 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 28 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 29 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 30 | * SUCH DAMAGE. | ||
| 31 | * | ||
| 32 | * @SYZDEK_LICENSE_HEADER_END@ | ||
| 33 | */ | ||
| 34 | /** | ||
| 35 | * @file lib/dms.h defines API for libdms.la | ||
| 36 | */ | ||
| 37 | #ifndef _DMSVERSION_H | ||
| 38 | #define _DMSVERSION_H 1 | ||
| 39 | |||
| 40 | /////////////////// | ||
| 41 | // // | ||
| 42 | // Definitions // | ||
| 43 | // // | ||
| 44 | /////////////////// | ||
| 45 | |||
| 46 | // Module Version Info (similar to libtool's library version) | ||
| 47 | // Current -- the current version number of this API | ||
| 48 | // Revision -- the software revision of this API version | ||
| 49 | // Age -- How many seqential past API versions is supported by | ||
| 50 | // this API version | ||
| 51 | #define DMS_LIB_VERSION_CURRENT @LIB_VERSION_CURRENT@ | ||
| 52 | #define DMS_LIB_VERSION_REVISION @LIB_VERSION_REVISION@ | ||
| 53 | #define DMS_LIB_VERSION_AGE @LIB_VERSION_AGE@ | ||
| 54 | #define DMS_LIB_VERSION_INFO "@LIB_VERSION_INFO@" | ||
| 55 | #define DMS_LIB_VERSION ( ((@LIB_VERSION_CURRENT@ & 0xFFFF) << 16) | \ | ||
| 56 | ((@LIB_VERSION_REVISION@ & 0xFF) << 8) | \ | ||
| 57 | (@LIB_VERSION_AGE@ & 0xFF) ) | ||
| 58 | |||
| 59 | |||
| 60 | #endif /* end of header file */ | ||
diff --git a/lib/libdms.h b/lib/libdms.h deleted file mode 100644 index fb26d4b..0000000 --- a/lib/libdms.h +++ /dev/null | |||
| @@ -1,80 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * DMS Tools and Utilities | ||
| 3 | * Copyright (C) 2010 David M. Syzdek <david@syzdek.net>. | ||
| 4 | * | ||
| 5 | * @SYZDEK_LICENSE_HEADER_START@ | ||
| 6 | * | ||
| 7 | * Redistribution and use in source and binary forms, with or without | ||
| 8 | * modification, are permitted provided that the following conditions are | ||
| 9 | * met: | ||
| 10 | * | ||
| 11 | * * Redistributions of source code must retain the above copyright | ||
| 12 | * notice, this list of conditions and the following disclaimer. | ||
| 13 | * * Redistributions in binary form must reproduce the above copyright | ||
| 14 | * notice, this list of conditions and the following disclaimer in the | ||
| 15 | * documentation and/or other materials provided with the distribution. | ||
| 16 | * * Neither the name of David M. Syzdek nor the | ||
| 17 | * names of its contributors may be used to endorse or promote products | ||
| 18 | * derived from this software without specific prior written permission. | ||
| 19 | * | ||
| 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
| 21 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
| 22 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAVID M. SYZDEK BE LIABLE FOR | ||
| 24 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
| 26 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
| 27 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 28 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 29 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 30 | * SUCH DAMAGE. | ||
| 31 | * | ||
| 32 | * @SYZDEK_LICENSE_HEADER_END@ | ||
| 33 | */ | ||
| 34 | /** | ||
| 35 | * @file lib/libdms.h internal directives for libdms.la | ||
| 36 | */ | ||
| 37 | #ifndef _OTADM_LIB_LIBDMS_H | ||
| 38 | #define _OTADM_LIB_LIBDMS_H 1 | ||
| 39 | |||
| 40 | /////////////// | ||
| 41 | // // | ||
| 42 | // Headers // | ||
| 43 | // // | ||
| 44 | /////////////// | ||
| 45 | |||
| 46 | #ifdef HAVE_CONFIG_H | ||
| 47 | #include <config.h> | ||
| 48 | #endif | ||
| 49 | |||
| 50 | #include <dms.h> | ||
| 51 | |||
| 52 | |||
| 53 | /////////////////// | ||
| 54 | // // | ||
| 55 | // Definitions // | ||
| 56 | // // | ||
| 57 | /////////////////// | ||
| 58 | |||
| 59 | #ifndef DMS_LIBS_DYNAMIC | ||
| 60 | #define DMS_LIBS_DYNAMIC 1 | ||
| 61 | #endif | ||
| 62 | |||
| 63 | #ifndef PACKAGE_TARNAME | ||
| 64 | #define PACKAGE_TARNAME "dmstools" | ||
| 65 | #endif | ||
| 66 | |||
| 67 | #ifndef SYSCONFDIR | ||
| 68 | #define SYSCONFDIR "/usr/local/etc" | ||
| 69 | #endif | ||
| 70 | |||
| 71 | #ifndef LIBEXECDIR | ||
| 72 | #define LIBEXECDIR "/usr/local/libexec" | ||
| 73 | #endif | ||
| 74 | |||
| 75 | #ifndef MODULEDIR | ||
| 76 | #define MODULEDIR "/usr/local/libexec/otadm" | ||
| 77 | #endif | ||
| 78 | |||
| 79 | |||
| 80 | #endif /* end of header file */ | ||
diff --git a/lib/libdms.sym b/lib/libdms.sym deleted file mode 100644 index bcdc307..0000000 --- a/lib/libdms.sym +++ /dev/null | |||
| @@ -1,60 +0,0 @@ | |||
| 1 | # | ||
| 2 | # DMS Tools and Utilities | ||
| 3 | # Copyright (C) 2010 David M. Syzdek <david@syzdek.net>. | ||
| 4 | # | ||
| 5 | # @SYZDEK_LICENSE_HEADER_START@ | ||
| 6 | # | ||
| 7 | # Redistribution and use in source and binary forms, with or without | ||
| 8 | # modification, are permitted provided that the following conditions are | ||
| 9 | # met: | ||
| 10 | # | ||
| 11 | # * Redistributions of source code must retain the above copyright | ||
| 12 | # notice, this list of conditions and the following disclaimer. | ||
| 13 | # * Redistributions in binary form must reproduce the above copyright | ||
| 14 | # notice, this list of conditions and the following disclaimer in the | ||
| 15 | # documentation and/or other materials provided with the distribution. | ||
| 16 | # * Neither the name of David M. Syzdek nor the | ||
| 17 | # names of its contributors may be used to endorse or promote products | ||
| 18 | # derived from this software without specific prior written permission. | ||
| 19 | # | ||
| 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
| 21 | # IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
| 22 | # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 23 | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAVID M. SYZDEK BE LIABLE FOR | ||
| 24 | # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 25 | # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
| 26 | # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
| 27 | # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 28 | # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 29 | # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 30 | # SUCH DAMAGE. | ||
| 31 | # | ||
| 32 | # @SYZDEK_LICENSE_HEADER_END@ | ||
| 33 | # | ||
| 34 | # lib/libdms.sym - list of symbols to export in libdms.la | ||
| 35 | # | ||
| 36 | # Build: | ||
| 37 | # CFLAGS="-g -O2 -W -Wall -Werror -I../include" | ||
| 38 | # LDFLAGS="-g -O2 -export-symbols libdms.sym -rpath /usr/local/lib" | ||
| 39 | # export CFLAGS LDFLAGS | ||
| 40 | # | ||
| 41 | # libtool --mode=compile gcc ${CFLAGS} -c libdms_version.c | ||
| 42 | # libtool --mode=link gcc ${LDFLAGS} -o libdms.la libdms_version.lo | ||
| 43 | # | ||
| 44 | # Install: | ||
| 45 | # libtool --mode=install install -c libotadm.la /usr/local/lib/libacs-utils.la | ||
| 46 | # | ||
| 47 | # Uninstall: | ||
| 48 | # libtool --mode=uninstall rm -f /usr/local/lib/libdms.la | ||
| 49 | # | ||
| 50 | # Clean: | ||
| 51 | # libtool --mode=clean rm -f libdms.la libdms_version.lo | ||
| 52 | # | ||
| 53 | dms_lib_version | ||
| 54 | dms_lib_version_age | ||
| 55 | dms_lib_version_check | ||
| 56 | dms_lib_version_current | ||
| 57 | dms_lib_version_info | ||
| 58 | dms_lib_version_revision | ||
| 59 | dms_version | ||
| 60 | # end of symbol export file | ||
diff --git a/lib/libdms_version.c b/lib/libdms_version.c deleted file mode 100644 index 64a56c7..0000000 --- a/lib/libdms_version.c +++ /dev/null | |||
| @@ -1,112 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * DMS Tools and Utilities | ||
| 3 | * Copyright (C) 2010 David M. Syzdek <david@syzdek.net>. | ||
| 4 | * | ||
| 5 | * @SYZDEK_LICENSE_HEADER_START@ | ||
| 6 | * | ||
| 7 | * Redistribution and use in source and binary forms, with or without | ||
| 8 | * modification, are permitted provided that the following conditions are | ||
| 9 | * met: | ||
| 10 | * | ||
| 11 | * * Redistributions of source code must retain the above copyright | ||
| 12 | * notice, this list of conditions and the following disclaimer. | ||
| 13 | * * Redistributions in binary form must reproduce the above copyright | ||
| 14 | * notice, this list of conditions and the following disclaimer in the | ||
| 15 | * documentation and/or other materials provided with the distribution. | ||
| 16 | * * Neither the name of David M. Syzdek nor the | ||
| 17 | * names of its contributors may be used to endorse or promote products | ||
| 18 | * derived from this software without specific prior written permission. | ||
| 19 | * | ||
| 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
| 21 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
| 22 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAVID M. SYZDEK BE LIABLE FOR | ||
| 24 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
| 26 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
| 27 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 28 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 29 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 30 | * SUCH DAMAGE. | ||
| 31 | * | ||
| 32 | * @SYZDEK_LICENSE_HEADER_END@ | ||
| 33 | */ | ||
| 34 | /** | ||
| 35 | * @file lib/dms_version.c functions for querying information about the library | ||
| 36 | */ | ||
| 37 | #define _DMS_LIB_LIBDMS_VERSION_C 1 | ||
| 38 | #include "libdms_version.h" | ||
| 39 | |||
| 40 | /////////////// | ||
| 41 | // // | ||
| 42 | // Headers // | ||
| 43 | // // | ||
| 44 | /////////////// | ||
| 45 | |||
| 46 | #include "libdms.h" | ||
| 47 | |||
| 48 | |||
| 49 | ///////////////// | ||
| 50 | // // | ||
| 51 | // Functions // | ||
| 52 | // // | ||
| 53 | ///////////////// | ||
| 54 | |||
| 55 | /// returns the binary GNU Libtool LIB_VERSION_INFO value | ||
| 56 | int dms_lib_version(void) | ||
| 57 | { | ||
| 58 | return(DMS_LIB_VERSION); | ||
| 59 | } | ||
| 60 | |||
| 61 | |||
| 62 | /// returns the GNU Libtool LIB_VERSION_AGE value | ||
| 63 | int dms_lib_version_age(void) | ||
| 64 | { | ||
| 65 | return(DMS_LIB_VERSION_AGE); | ||
| 66 | } | ||
| 67 | |||
| 68 | |||
| 69 | /// checks for library binary compatability | ||
| 70 | /// @param[in] info version info to compare | ||
| 71 | int dms_lib_version_check(int version) | ||
| 72 | { | ||
| 73 | int lib_cur = ((DMS_LIB_VERSION_CURRENT >> 16) & 0xFFFF); | ||
| 74 | int lib_age = ((DMS_LIB_VERSION_AGE >> 0) & 0xFF); | ||
| 75 | int ver_cur = ((version >> 16) & 0xFFFF); | ||
| 76 | int ver_age = ((version >> 0) & 0xFF); | ||
| 77 | if (ver_cur < (lib_cur-lib_age)) | ||
| 78 | return(1); | ||
| 79 | if (lib_cur < (ver_cur-ver_age)) | ||
| 80 | return(1); | ||
| 81 | return(0); | ||
| 82 | } | ||
| 83 | |||
| 84 | |||
| 85 | /// returns the GNU Libtool LIB_VERSION_CURRENT value | ||
| 86 | int dms_lib_version_current(void) | ||
| 87 | { | ||
| 88 | return(DMS_LIB_VERSION_CURRENT); | ||
| 89 | } | ||
| 90 | |||
| 91 | |||
| 92 | /// returns the GNU Libtool LIB_VERSION_INFO string | ||
| 93 | const char * dms_lib_version_info(void) | ||
| 94 | { | ||
| 95 | return(DMS_LIB_VERSION_INFO); | ||
| 96 | } | ||
| 97 | |||
| 98 | |||
| 99 | /// returns the GNU Libtool LIB_VERSION_REVISION value | ||
| 100 | int dms_lib_version_revision(void) | ||
| 101 | { | ||
| 102 | return(DMS_LIB_VERSION_REVISION); | ||
| 103 | } | ||
| 104 | |||
| 105 | |||
| 106 | /// returns version info string for library | ||
| 107 | const char * dms_version(void) | ||
| 108 | { | ||
| 109 | return("libdms.la (" PACKAGE_NAME ") " DMS_LIB_VERSION_INFO); | ||
| 110 | } | ||
| 111 | |||
| 112 | /* end of source code */ | ||
diff --git a/lib/libdms_version.h b/lib/libdms_version.h deleted file mode 100644 index 8d6c27f..0000000 --- a/lib/libdms_version.h +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * DMS Tools and Utilities | ||
| 3 | * Copyright (C) 2010 David M. Syzdek <david@syzdek.net>. | ||
| 4 | * | ||
| 5 | * @SYZDEK_LICENSE_HEADER_START@ | ||
| 6 | * | ||
| 7 | * Redistribution and use in source and binary forms, with or without | ||
| 8 | * modification, are permitted provided that the following conditions are | ||
| 9 | * met: | ||
| 10 | * | ||
| 11 | * * Redistributions of source code must retain the above copyright | ||
| 12 | * notice, this list of conditions and the following disclaimer. | ||
| 13 | * * Redistributions in binary form must reproduce the above copyright | ||
| 14 | * notice, this list of conditions and the following disclaimer in the | ||
| 15 | * documentation and/or other materials provided with the distribution. | ||
| 16 | * * Neither the name of David M. Syzdek nor the | ||
| 17 | * names of its contributors may be used to endorse or promote products | ||
| 18 | * derived from this software without specific prior written permission. | ||
| 19 | * | ||
| 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
| 21 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
| 22 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAVID M. SYZDEK BE LIABLE FOR | ||
| 24 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
| 26 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
| 27 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 28 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 29 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 30 | * SUCH DAMAGE. | ||
| 31 | * | ||
| 32 | * @SYZDEK_LICENSE_HEADER_END@ | ||
| 33 | */ | ||
| 34 | /** | ||
| 35 | * @file lib/dms_version.h functions for querying information about the library | ||
| 36 | */ | ||
| 37 | #ifndef _DMS_LIB_LIBDMS_VERSION_H | ||
| 38 | #define _DMS_LIB_LIBDMS_VERSION_H 1 | ||
| 39 | |||
| 40 | #endif /* end of source code */ | ||
