Hello community,

here is the log from the commit of package libdiscid for openSUSE:Factory 
checked in at 2013-03-10 08:23:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libdiscid (Old)
 and      /work/SRC/openSUSE:Factory/.libdiscid.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libdiscid", Maintainer is "vdziewie...@suse.com"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libdiscid/libdiscid.changes      2013-02-13 
14:38:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.libdiscid.new/libdiscid.changes 2013-03-10 
08:23:19.000000000 +0100
@@ -1,0 +2,11 @@
+Fri Mar  8 19:54:35 UTC 2013 - Johannes Dewender <nov...@jonnyjd.net>
+
+- updated to 0.4.1
+ - LIB-23: add has_feature() and get_feature_list() to API (platform check)
+ - add get_version_string() to API
+ - CMake : add FreeBSD, NetBSD, OpenBSD -> all platforms supported
+ - LIB-32: change libtool from -version-info to -version-name
+- libdiscid-visibility.patch refreshed via quilt
+- libdiscid-no-crypto.patch refreshed via quilt
+
+-------------------------------------------------------------------

Old:
----
  libdiscid-0.3.2.tar.gz

New:
----
  libdiscid-0.4.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libdiscid.spec ++++++
--- /var/tmp/diff_new_pack.JEEuIa/_old  2013-03-10 08:23:20.000000000 +0100
+++ /var/tmp/diff_new_pack.JEEuIa/_new  2013-03-10 08:23:20.000000000 +0100
@@ -17,9 +17,9 @@
 
 
 Name:           libdiscid
-Version:        0.3.2
+Version:        0.4.1
 Release:        0
-Summary:        Library for creating MusicBrainz DiscIDs from audio CDs
+Summary:        Library for gathering DiscIDs and ISRCs from audio CDs
 License:        LGPL-2.1+
 Group:          Development/Libraries/C and C++
 Url:            http://musicbrainz.org/doc/libdiscid
@@ -32,53 +32,43 @@
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
-libdiscid is a C library for creating MusicBrainz DiscIDs from audio
-CDs. It reads a CD's table of contents (TOC) and generates an
-identifier which can be used to lookup the CD at MusicBrainz.
+libdiscid is a C library for creating MusicBrainz and freedb DiscIDs
+from audio CDs.
+It reads a CD's table of contents (TOC) and generates an identifier
+which can be used to lookup the CD at MusicBrainz.
 Additionally, it provides a submission URL for adding the DiscID to the
-database.
-
-The interface of this library is new, but the DiscID algorithm and the
-operating system dependent CD-ROM/DVD-ROM access code have been ported
-from libmusicbrainz version 2. For more info about the interface read
-the [WWW] API documentation.
+database and gathers ISRCs and the MCN from disc.
 
 %define libname libdiscid0
 
 %package -n %{libname}
-Summary:        Library for creating MusicBrainz DiscIDs from audio CDs
+Summary:        Library for gathering DiscIDs and ISRCs from audio CDs
 Group:          Development/Libraries/C and C++
 # provide for debuginfo package (always requiring main package name)
 Provides:       libdiscid = %{version}
 
 %description -n %{libname}
-libdiscid is a C library for creating MusicBrainz DiscIDs from audio
-CDs. It reads a CD's table of contents (TOC) and generates an
-identifier which can be used to lookup the CD at MusicBrainz.
+libdiscid is a C library for creating MusicBrainz and freedb DiscIDs
+from audio CDs.
+It reads a CD's table of contents (TOC) and generates an identifier
+which can be used to lookup the CD at MusicBrainz.
 Additionally, it provides a submission URL for adding the DiscID to the
-database.
+database and gathers ISRCs and the MCN from disc.
 
-The interface of this library is new, but the DiscID algorithm and the
-operating system dependent CD-ROM/DVD-ROM access code have been ported
-from libmusicbrainz version 2. For more info about the interface read
-the [WWW] API documentation.
 
 %package devel
-Summary:        Library for creating MusicBrainz DiscIDs from audio CDs
+Summary:        Library for gathering DiscIDs and ISRCs from audio CDs
 Group:          Development/Libraries/C and C++
 Requires:       %{libname} = %{version}
 
 %description devel
-libdiscid is a C library for creating MusicBrainz DiscIDs from audio
-CDs. It reads a CD's table of contents (TOC) and generates an
-identifier which can be used to lookup the CD at MusicBrainz.
+libdiscid is a C library for creating MusicBrainz and freedb DiscIDs
+from audio CDs.
+It reads a CD's table of contents (TOC) and generates an identifier
+which can be used to lookup the CD at MusicBrainz.
 Additionally, it provides a submission URL for adding the DiscID to the
-database.
+database and gathers ISRCs and the MCN from disc.
 
-The interface of this library is new, but the DiscID algorithm and the
-operating system dependent CD-ROM/DVD-ROM access code have been ported
-from libmusicbrainz version 2. For more info about the interface read
-the [WWW] API documentation.
 
 %prep
 %setup -q

++++++ libdiscid-0.3.2.tar.gz -> libdiscid-0.4.1.tar.gz ++++++
++++ 3789 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdiscid-0.3.2/AUTHORS new/libdiscid-0.4.1/AUTHORS
--- old/libdiscid-0.3.2/AUTHORS 2013-02-11 13:31:46.000000000 +0100
+++ new/libdiscid-0.4.1/AUTHORS 2013-03-08 17:51:26.000000000 +0100
@@ -23,7 +23,7 @@
    Anton Yabchinskiy <arn at bestmx dot ru>
     - Implemented and tested OpenBSD support.
 
-   Shunsuke Kuroda
+   Shunsuke Kuroda <kronox at lifewithsolaris dot jp>
     - Implemented and tested Solaris/OpenSolaris support.
 
    Nicholas Humphrey
@@ -31,7 +31,8 @@
 
    Johannes Dewender <brainz at JonnyJD dot net>
     - Implemented ISRC reading on Linux
-    - Build fixes for Cmake/Autotools on Solaris, Darwin, Windows, Cygwin
+    - Implemented features API and generic platform
+    - Completed CMake support on all platforms
+      Various Autotools fixes, switch to libtool -version-number
+      versioninfo resource for DLL
 
--- 
-$Id$
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdiscid-0.3.2/CMakeLists.txt new/libdiscid-0.4.1/CMakeLists.txt
--- old/libdiscid-0.3.2/CMakeLists.txt  2013-02-11 13:31:46.000000000 +0100
+++ new/libdiscid-0.4.1/CMakeLists.txt  2013-03-08 17:51:26.000000000 +0100
@@ -1,22 +1,28 @@
 cmake_minimum_required(VERSION 2.6)
+set(CMAKE_LEGACY_CYGWIN_WIN32 0)
 
 PROJECT(libdiscid)
-SET(PROJECT_VERSION 0.3.2)
 
-# 1. If the library source code has changed at all since the last update, then 
increment revision.
-# 2. If any interfaces have been added, removed, or changed since the last 
update, increment current, and set revision to 0.
-# 3. If any interfaces have been added since the last public release, then 
increment age.
-# 4. If any interfaces have been removed since the last public release, then 
set age to 0. 
-SET(libdiscid_SOVERSION_CURRENT  3)
-SET(libdiscid_SOVERSION_REVISION 2)
-SET(libdiscid_SOVERSION_AGE      3)
-
-math(EXPR libdiscid_SOVERSION_MAJOR "${libdiscid_SOVERSION_CURRENT} - 
${libdiscid_SOVERSION_AGE}")
-math(EXPR libdiscid_SOVERSION_MINOR "${libdiscid_SOVERSION_AGE}")
-math(EXPR libdiscid_SOVERSION_PATCH "${libdiscid_SOVERSION_REVISION}")
+# VERSION NUMBERING:
+# see http://semver.org, we use that schmea starting with 0.x.x already thoug
+# short:
+# MAJOR is increased when backwards incompatible changes are made to the API
+# MINOR is increased when features are added to the API
+# PATCH is increase for all other releases
+SET(libdiscid_MAJOR 0)
+SET(libdiscid_MINOR 4)
+SET(libdiscid_PATCH 1)
+
+
+SET(libdiscid_VERSION ${libdiscid_MAJOR}.${libdiscid_MINOR}.${libdiscid_PATCH})
+SET(libdiscid_SOVERSION ${libdiscid_MAJOR})
+# version for windows resource file
+SET(libdiscid_VERSION_RC 
${libdiscid_MAJOR},${libdiscid_MINOR},${libdiscid_PATCH},0)
+
+# currently the sole purpose of the project is the library,
+# so we use that version
+SET(PROJECT_VERSION ${libdiscid_VERSION})
 
-set(libdiscid_VERSION 
${libdiscid_SOVERSION_MAJOR}.${libdiscid_SOVERSION_MINOR}.${libdiscid_SOVERSION_PATCH})
-set(libdiscid_SOVERSION ${libdiscid_SOVERSION_MAJOR})
 
 SET(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)")
 SET(EXEC_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "Installation 
prefix for executables and object code libraries" FORCE)
@@ -27,34 +33,56 @@
 # compatibility with automake
 SET(PACKAGE ${PROJECT_NAME})
 SET(VERSION ${PROJECT_VERSION})
+SET(PACKAGE_STRING "${PACKAGE} ${VERSION}")
 SET(prefix ${CMAKE_INSTALL_PREFIX})
 SET(exec_prefix ${EXEC_INSTALL_PREFIX})
 SET(includedir ${INCLUDE_INSTALL_DIR})
 SET(libdir ${LIB_INSTALL_DIR})
 
 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libdiscid.pc.in 
${CMAKE_CURRENT_BINARY_DIR}/libdiscid.pc)
+CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/versioninfo.rc.in 
${CMAKE_CURRENT_BINARY_DIR}/versioninfo.rc)
 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in 
${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile)
 
+
+# normalizing operating systems
 IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-    SET(libdiscid_OSDEP_SRCS src/disc_linux.c)
+    SET(libdiscid_OS "linux")
 ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
-    SET(libdiscid_OSDEP_SRCS src/disc_darwin.c)
-    FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation)
-    SET(libdiscid_OSDEP_LIBS ${COREFOUNDATION_LIBRARY} IOKit)
+    SET(libdiscid_OS "darwin")
+ELSEIF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
+    SET(libdiscid_OS "freebsd")
+ELSEIF(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+    SET(libdiscid_OS "openbsd")
+ELSEIF(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
+    SET(libdiscid_OS "openbsd")
 ELSEIF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
-    SET(libdiscid_OSDEP_SRCS src/disc_solaris.c)
+    SET(libdiscid_OS "solaris")
 ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Windows")
-    SET(libdiscid_OSDEP_SRCS src/disc_win32.c src/disc_win32_new.c)
-    SET(libdiscid_OSDEP_LIBS winmm)
-# ${CMAKE_SYSTEM_NAME} leads to CYGWIN, is taken as ${CYGWIN} -> no braces
+    SET(libdiscid_OS "win32")
 ELSEIF(CMAKE_SYSTEM_NAME MATCHES "CYGWIN")
+    SET(libdiscid_OS "win32")
+ELSE()
+    SET(libdiscid_OS "generic")
+    MESSAGE(STATUS "WARNING: unknown operating system, no disc reading 
available!")
+ENDIF()
+
+# choose platform dependent source files
+IF(libdiscid_OS MATCHES "win32")
     SET(libdiscid_OSDEP_SRCS src/disc_win32.c src/disc_win32_new.c)
+    SET(libdiscid_RCS ${CMAKE_CURRENT_BINARY_DIR}/versioninfo.rc)
     SET(libdiscid_OSDEP_LIBS winmm)
-ELSE(CMAKE_SYSTEM_NAME MATCHES "Linux")
-    MESSAGE(FATAL_ERROR        "unsupported operating system")
-ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+ELSEIF(libdiscid_OS MATCHES "darwin")
+    SET(libdiscid_OSDEP_SRCS src/disc_darwin.c)
+    FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation)
+    SET(libdiscid_OSDEP_LIBS ${COREFOUNDATION_LIBRARY} IOKit)
+ELSE()
+    SET(libdiscid_OSDEP_SRCS src/disc_${libdiscid_OS}.c)
+ENDIF()
+
+STRING(REPLACE ";" " " libdiscid_OSDEP_STR "${libdiscid_OSDEP_SRCS}")
+MESSAGE(STATUS "Using discid implementation ${libdiscid_OSDEP_STR}")
 
-ADD_LIBRARY(libdiscid SHARED ${libdiscid_OSDEP_SRCS} src/base64.c src/disc.c 
src/sha1.c)
+ADD_LIBRARY(libdiscid SHARED ${libdiscid_OSDEP_SRCS} ${libdiscid_RCS} 
src/base64.c src/disc.c src/sha1.c)
 TARGET_LINK_LIBRARIES(libdiscid ${libdiscid_OSDEP_LIBS})
 SET_TARGET_PROPERTIES(libdiscid PROPERTIES
     OUTPUT_NAME discid
@@ -76,6 +104,7 @@
 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libdiscid.pc DESTINATION 
${LIB_INSTALL_DIR}/pkgconfig)
 INSTALL(FILES include/discid/discid.h DESTINATION 
${INCLUDE_INSTALL_DIR}/discid)
 
+
 ADD_CUSTOM_TARGET(docs doxygen)
 
 ADD_CUSTOM_TARGET(check ./test_discid DEPENDS test_discid)
@@ -88,6 +117,7 @@
     COMMAND cp 
"${PROJECT_NAME}-${PROJECT_VERSION}/${PROJECT_NAME}-${PROJECT_VERSION}.tar.gz" .
 )
 
+
 # Tests needed for sha1.h
 INCLUDE(TestBigEndian)
 TEST_BIG_ENDIAN(WORDS_BIGENDIAN)
@@ -97,3 +127,7 @@
 CONFIGURE_FILE(config-cmake.h.in ${CMAKE_BINARY_DIR}/config.h)
 INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})
 ADD_DEFINITIONS(-DHAVE_CONFIG_H)
+
+IF(CMAKE_COMPILER_IS_GNUCC)
+    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O2")
+ENDIF()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdiscid-0.3.2/ChangeLog new/libdiscid-0.4.1/ChangeLog
--- old/libdiscid-0.3.2/ChangeLog       2013-02-11 13:31:46.000000000 +0100
+++ new/libdiscid-0.4.1/ChangeLog       2013-03-08 17:51:26.000000000 +0100
@@ -1,6 +1,21 @@
 libdiscid ChangeLog:
 --------------------
 
+libdiscid-0.4.1:
+
+ - fix distribution: include disc_generic.c in Autotools dist
+
+libdiscid-0.4.0:
+
+ - LIB-23: add has_feature() and get_feature_list() to API (platform check)
+ - add get_version_string() to API
+ - CMake : add FreeBSD, NetBSD, OpenBSD -> all platforms supported
+ - LIB-24: support generic platform (discid_put() only)
+ - Win32 : Added versioninfo resource to DLL
+ - LIB-32: change libtool from -version-info to -version-name
+ - LIB-27: fix (k)FreeBSD includes
+ - fix lots of compiler warnings
+
 libdiscid-0.3.2:
 
   - fix distribution so it works for autotools AND cmake
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdiscid-0.3.2/INSTALL new/libdiscid-0.4.1/INSTALL
--- old/libdiscid-0.3.2/INSTALL 2013-02-11 13:31:46.000000000 +0100
+++ new/libdiscid-0.4.1/INSTALL 2013-03-08 17:51:26.000000000 +0100
@@ -1,9 +1,7 @@
 Build and Installation of Libdiscid
 ===================================
 
-You can either use the autotools to build libdiscid or,
-on Linux, Mac OS X, Windows, SunOS and Cygwin,
-you can also use Cmake.
+You can either use the autotools or Cmake to build libdiscid.
 
 
 Cmake
@@ -30,6 +28,10 @@
 
     make check
 
+API documentation is created with:
+
+    make docs
+
 
 Tips for Windows
 ----------------
@@ -42,3 +44,15 @@
 
 You can also create Visual Studio project files.
 Just type "cmake" to see a list of options.
+
+
+Notes for BSD
+-------------
+
+With Cmake builds the library version/soname will work the same as on Linux.
+With the Autotools, libtool is used and generates sonames as major+minor.
+For NetBSD there seems to be a change with libdiscid 0.4.0, where libtool now
+seems to use Linux versioning (soversion=major).
+
+Please make sure that the correct soname is used.
+Libdiscid still has major version 0 and is backwards compatible to 0.1.0.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdiscid-0.3.2/Makefile.am new/libdiscid-0.4.1/Makefile.am
--- old/libdiscid-0.3.2/Makefile.am     2013-02-11 13:31:46.000000000 +0100
+++ new/libdiscid-0.4.1/Makefile.am     2013-03-08 17:51:26.000000000 +0100
@@ -27,3 +27,6 @@
 pc_DATA = libdiscid.pc
 
 EXTRA_DIST = libdiscid.pc.in Doxyfile.in CMakeLists.txt config-cmake.h.in
+
+docs:
+       doxygen
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdiscid-0.3.2/config-cmake.h.in new/libdiscid-0.4.1/config-cmake.h.in
--- old/libdiscid-0.3.2/config-cmake.h.in       2013-02-11 13:31:46.000000000 
+0100
+++ new/libdiscid-0.4.1/config-cmake.h.in       2013-03-08 17:51:26.000000000 
+0100
@@ -1,8 +1,17 @@
-/* Values needed by our sha1.h */
+/* generated by cmake from config-cmake.h.in */
+
+/* version string for debug output */
+#define        PACKAGE_STRING "@PACKAGE_STRING@"
+
+/**
+ * Values needed by our sha1.h
+ */
 
 /* defined to 1 if words are stored with the most significant byte first
  * SPARC (mostly Solaris/SunOS) is an example */
 #cmakedefine WORDS_BIGENDIAN
 
-/* the size of "long", computed/tested by cmake */
+/* the size of "long", computed/tested by cmake
+ * The value is needed, so cmakedefine doesn't work
+ */
 #define SIZEOF_LONG @SIZEOF_LONG@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdiscid-0.3.2/config.h.in new/libdiscid-0.4.1/config.h.in
--- old/libdiscid-0.3.2/config.h.in     2013-02-11 13:31:49.000000000 +0100
+++ new/libdiscid-0.4.1/config.h.in     2013-03-08 17:51:29.000000000 +0100
@@ -78,3 +78,6 @@
 #  undef WORDS_BIGENDIAN
 # endif
 #endif
+
+/* "the header is used to create the library" */
+#undef libdiscid_EXPORTS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdiscid-0.3.2/configure.ac new/libdiscid-0.4.1/configure.ac
--- old/libdiscid-0.3.2/configure.ac    2013-02-11 13:31:46.000000000 +0100
+++ new/libdiscid-0.4.1/configure.ac    2013-03-08 17:51:26.000000000 +0100
@@ -1,19 +1,44 @@
-dnl Process this file with autoconf to produce a configure script.
-dnl
+dnl Process this file with autoconf to produce a configure script.  dnl
 dnl NOTE: Each time a release is made, the version number below and the
 dnl       libtool version number in src/Makefile.am have to be incremented.
 dnl       The libtool version number has to be changed ALWAYS, no matter how
 dnl       small the change to the source code was!
 dnl
-AC_INIT(libdiscid, 0.3.2)
+
+# AC_INIT would complain with "not a literal" when using MAJOR/MINOR/PATCH vars
+# currently the sole purpose of the project is the library,
+# so we use the library version also as project version
+# don't forget to update MAJOR/MINOR/PATCH below!
+AC_INIT(libdiscid, 0.4.1)
 AC_CONFIG_SRCDIR(src/disc.c)
 AM_INIT_AUTOMAKE
 AC_CONFIG_HEADERS(config.h)
 
+# VERSION NUMBERING:
+# see http://semver.org, we use that schema starting with 0.x.x
+# in short:
+# MAJOR is increased when backwards incompatible changes are made to the API
+# MINOR is increased when features are added to the API
+# PATCH is increase for all other releases
+libdiscid_MAJOR=0
+libdiscid_MINOR=4
+libdiscid_PATCH=1
+# don't forget to update AC_INIT above!
+
+libdiscid_VERSION=${libdiscid_MAJOR}.${libdiscid_MINOR}.${libdiscid_PATCH}
+libdiscid_VERSION_LT=${libdiscid_MAJOR}:${libdiscid_MINOR}:${libdiscid_PATCH}
+libdiscid_VERSION_RC=${libdiscid_MAJOR},${libdiscid_MINOR},${libdiscid_PATCH},0
+AC_SUBST(libdiscid_VERSION)
+AC_SUBST(libdiscid_VERSION_LT)
+AC_SUBST(libdiscid_VERSION_RC)
+
 dnl Set the host_cpu, host_vendor, and host_os variables.
 AC_CANONICAL_HOST
 
+# compatibility with cmake
 EXTRA_DIST=config-cmake.h.in
+AC_DEFINE(libdiscid_EXPORTS, [], "the header is used to create the library")
+
 
 case "${host_cpu}-${host_os}" in
   #*-beos*)    os=beos; LIBS='-lbe -lroot' ;;
@@ -28,7 +53,8 @@
   #*-os2_emx*) os=os2 ;;
   *-solaris*) os=solaris ;;
   #*-qnx*)     os=qnx; LIBS='-lsocket' ;;
-  *)          AC_MSG_ERROR([unsupported operating system]) ;;
+  *)          os=generic;
+         AC_MSG_WARN([unsupported operating system, no disc reading 
available!]) ;;
 esac
 dnl AM_CONDITIONAL(DARWIN, test x$os = xdarwin)
 
@@ -37,13 +63,15 @@
 if test "${os}" = "win32"; then
   DISC_OS_OBJ="disc_${os}.lo disc_${os}_new.lo"
   AC_MSG_NOTICE([using discid implementation disc_${os}.c disc_${os}_new.c])
+  DISC_OS_OBJ="${DISC_OS_OBJ} ../versioninfo.lo"
 else
   DISC_OS_OBJ="disc_${os}.lo"
   AC_MSG_NOTICE([using discid implementation disc_${os}.c])
 fi
 AC_SUBST(DISC_OS_OBJ)
 
-
+LT_INIT([win32-dll])
+LT_LANG([Windows Resource])
 
 dnl Checks for programs.
 AC_PROG_CC
@@ -51,7 +79,6 @@
 AC_SUBST(LIBTOOL_DEPS)  
 AC_PROG_INSTALL
 
-
 dnl Test endianness and size of a long; required for the SHA1 implementation.
 AC_C_BIGENDIAN
 AC_CHECK_SIZEOF(long)
@@ -64,5 +91,5 @@
 
 AC_OUTPUT([
   Makefile src/Makefile include/Makefile include/discid/Makefile
-  examples/Makefile test/Makefile libdiscid.pc Doxyfile
+  examples/Makefile test/Makefile libdiscid.pc versioninfo.rc Doxyfile
 ])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdiscid-0.3.2/examples/discid.c new/libdiscid-0.4.1/examples/discid.c
--- old/libdiscid-0.3.2/examples/discid.c       2013-02-11 13:31:46.000000000 
+0100
+++ new/libdiscid-0.4.1/examples/discid.c       2013-03-08 17:51:26.000000000 
+0100
@@ -28,14 +28,15 @@
 int main(int argc, char *argv[]) {
        DiscId *disc = discid_new();
        int i;
-        char *device = NULL;
+       char *device = NULL;
 
-        /* If we have an argument, use it as the device name */
-        if (argc > 1)
-            device = argv[1];
+       /* If we have an argument, use it as the device name */
+       if (argc > 1) {
+               device = argv[1];
+       }
 
        /* read the disc in the default disc drive */
-       if ( discid_read(disc, device) == 0 ) {
+       if (discid_read(disc, device) == 0) {
                fprintf(stderr, "Error: %s\n", discid_get_error_msg(disc));
                return 1;
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdiscid-0.3.2/examples/discisrc.c new/libdiscid-0.4.1/examples/discisrc.c
--- old/libdiscid-0.3.2/examples/discisrc.c     2013-02-11 13:31:46.000000000 
+0100
+++ new/libdiscid-0.4.1/examples/discisrc.c     2013-03-08 17:51:26.000000000 
+0100
@@ -26,27 +26,58 @@
 
 
 int main(int argc, char *argv[]) {
-       DiscId *disc = discid_new();
        int i;
-  char *device = NULL;
+       char *device = NULL;
+       DiscId *disc = discid_new();
 
-  /* If we have an argument, use it as the device name */
-  if (argc > 1)
-      device = argv[1];
+       printf("%s\n", discid_get_version_string());
+
+       /* If we have an argument, use it as the device name */
+       if (argc > 1) {
+               device = argv[1];
+       }
+
+       if (!discid_has_feature(DISCID_FEATURE_READ)) {
+               fprintf(stderr, "Error: not implemented on platform\n");
+               return 1;
+       }
 
        /* read the disc in the default disc drive */
-       if ( discid_read(disc, device) == 0 ) {
+       if (discid_read(disc, device) == 0) {
                fprintf(stderr, "Error: %s\n", discid_get_error_msg(disc));
                return 1;
        }
 
-  printf("MCN      : %s\n", discid_get_mcn(disc));
+       if (discid_has_feature(DISCID_FEATURE_MCN)) {
+               printf("MCN      : %s\n", discid_get_mcn(disc));
+       } else {
+               printf("MCN      : (not implemented)\n");
+       }
 
-       for ( i = discid_get_first_track_num(disc);
-                       i <= discid_get_last_track_num(disc); i++ ) {
+       if (discid_has_feature(DISCID_FEATURE_ISRC)) {
+               for ( i = discid_get_first_track_num(disc);
+                               i <= discid_get_last_track_num(disc); i++ ) {
+
+                       printf("Track %-2d : %s\n", i,
+                                       discid_get_track_isrc(disc, i));
+               }
+       } else {
+               printf("ISRCs    : (not implemented)\n");
+       }
 
-               printf("Track %-2d : %s\n", i, discid_get_track_isrc(disc, i));
+       /* another way to access the features */
+       char *features[DISCID_FEATURE_LENGTH];
+       discid_get_feature_list(features);
+       printf("All features: ");
+       for (i = 0; i < DISCID_FEATURE_LENGTH; i++) {
+               if (features[i]) {
+                       if (i > 0) {
+                               printf(", ");
+                       }
+                       printf("%s", features[i]);
+               }
        }
+       printf("\n");
 
        discid_free(disc);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdiscid-0.3.2/include/discid/discid.h 
new/libdiscid-0.4.1/include/discid/discid.h
--- old/libdiscid-0.3.2/include/discid/discid.h 2013-02-11 13:31:46.000000000 
+0100
+++ new/libdiscid-0.4.1/include/discid/discid.h 2013-03-08 17:51:26.000000000 
+0100
@@ -2,6 +2,8 @@
 
    MusicBrainz -- The Internet music metadatabase
 
+   Copyright (C) 2013 Johannes Dewender
+   Copyright (C) 2006-2010 Lukas Lalinsky
    Copyright (C) 2006 Matthias Friedrich
    
    This library is free software; you can redistribute it and/or
@@ -42,11 +44,18 @@
  * \mainpage libdiscid
  * \section intro Introduction
  *
- * libdiscid is a C library for calculating DiscIDs for Audio CDs. It is a C
- * port of the DiscID-related code from libmusicbrainz2 (which is written in
- * C++). The idea is to have an easy to use library without any dependencies
+ * Libdiscid is a C library for calculating DiscIDs
+ * (<a href="http://musicbrainz.org/doc/Disc ID">MusicBrainz</a>
+ * and <a href="http://freedb.org";>freedb</a>)
+ * for Audio CDs.
+ * Additionally the library can extract the MCN/UPC/EAN and the
+ * <a href="http://musicbrainz.org/doc/ISRC";>ISRCs</a> from disc.
+ *
+ * The idea is to have an easy to use library without any dependencies
  * that can be used from scripting languages.
  *
+ * The API is documented in discid.h.
+ *
  * \section examples Examples
  *
  * This is an example of the most basic usage:
@@ -72,7 +81,8 @@
  * libdiscid provides a pkg-config script that returns the necessary compiler 
and linker flags, as well as the
  * version number.  To build a small sample program one would use:
  *
- * <tt>gcc libdiscid-test.c `pkg-config libdiscid --cflags --libs` -o 
libdiscid-test</tt>
+ * @par
+ * <tt>gcc libdiscid-test.c \`pkg-config libdiscid --cflags --libs\` -o 
libdiscid-test</tt>
  *
  * \section Contact
  *
@@ -298,6 +308,54 @@
 LIBDISCID_API char* discid_get_track_isrc(DiscId *d, int track_num);
 
 
+/**
+ * PLATFORM-DEPENDENT FEATURES
+ *
+ * The platform dependent features are currently:
+ *   - "read"  read TOC from disc
+ *   - "mcn"   read MCN from disc
+ *   - "isrc"  read ISRC from disc
+ *
+ * You can use get_feature_list() or has_feature() below.
+ */
+
+enum discid_feature {
+       DISCID_FEATURE_READ = 1 << 0,
+       DISCID_FEATURE_MCN  = 1 << 1,
+       DISCID_FEATURE_ISRC = 1 << 2,
+};
+/**
+ * Check if a certain feature is implemented on the current platform.
+ *
+ * @return 1 if the feature is implemented and 0 if not.
+ */
+LIBDISCID_API int discid_has_feature(enum discid_feature feature);
+
+#define DISCID_FEATURE_STR_READ                "read"
+#define DISCID_FEATURE_STR_MCN         "mcn"
+#define DISCID_FEATURE_STR_ISRC                "isrc"
+#define DISCID_FEATURE_LENGTH          32
+/**
+ * Return a list of features supported by the current platform.
+ * The array of length DISCID_FEATURES_LENGTH should be allocated by the user.
+ * After the call each element of the array is either NULL
+ * or a pointer to a static string.
+ *
+ * @return an array of supported features (as strings)
+ */
+LIBDISCID_API void discid_get_feature_list(
+               char *features[DISCID_FEATURE_LENGTH]);
+
+/**
+ * Return the full version string of this library, including the name.
+ * This can be used for debug output.
+ * Don't use this to test for features, see discid_has_feature().
+ *
+ * @return a string containing the version of libdiscid.
+ */
+LIBDISCID_API char *discid_get_version_string(void);
+
+
 #ifdef __cplusplus
   }
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdiscid-0.3.2/include/discid/discid_private.h 
new/libdiscid-0.4.1/include/discid/discid_private.h
--- old/libdiscid-0.3.2/include/discid/discid_private.h 2013-02-11 
13:31:46.000000000 +0100
+++ new/libdiscid-0.4.1/include/discid/discid_private.h 2013-03-08 
17:51:26.000000000 +0100
@@ -27,6 +27,8 @@
 #ifndef MUSICBRAINZ_DISC_ID_PRIVATE_H
 #define MUSICBRAINZ_DISC_ID_PRIVATE_H
 
+#include "discid.h"
+
 
 /* Length of a MusicBrainz DiscID in bytes (without a trailing '\0'-byte). */
 #define MB_DISC_ID_LENGTH              32
@@ -96,5 +98,10 @@
  */
 char *mb_disc_get_default_device_unportable(void);
 
+/*
+ * This should return 1 if the feature is supported by the platform
+ * and 0 if not.
+ */
+int mb_disc_has_feature_unportable(enum discid_feature feature);
 
 #endif /* MUSICBRAINZ_DISC_ID_PRIVATE_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdiscid-0.3.2/src/Makefile.am new/libdiscid-0.4.1/src/Makefile.am
--- old/libdiscid-0.3.2/src/Makefile.am 2013-02-11 13:31:46.000000000 +0100
+++ new/libdiscid-0.4.1/src/Makefile.am 2013-03-08 17:51:26.000000000 +0100
@@ -1,6 +1,7 @@
 #
 #  MusicBrainz -- The Internet music metadatabase
 #
+#  Copyright (C) 2013 Johannes Dewender
 #  Copyright (C) 2006 Matthias Friedrich
 #  
 #  This library is free software; you can redistribute it and/or
@@ -17,33 +18,29 @@
 #  License along with this library; if not, write to the Free Software
 #  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
 #
-#    $Id$
-#
 lib_LTLIBRARIES = libdiscid.la
 
 libdiscid_la_SOURCES = base64.c sha1.c disc.c
 EXTRA_libdiscid_la_SOURCES = \
        disc_linux.c disc_win32.c disc_win32_new.c \
-       disc_darwin.c disc_freebsd.c disc_solaris.c disc_openbsd.c
+       disc_darwin.c disc_freebsd.c disc_solaris.c disc_openbsd.c \
+       disc_generic.c
 
 AM_CPPFLAGS = -I$(top_srcdir)/include
 libdiscid_la_LIBADD = @DISC_OS_OBJ@
 libdiscid_la_DEPENDENCIES = @DISC_OS_OBJ@
 
-# Here are a set of rules to help you update your library version information:
-#  Scheme: current:revsion:age
-#  1. Start with version information of `0:0:0' for each libtool library.
-#  2. Update the version information only immediately before a public release 
-#     of your software. More frequent updates are unnecessary, and only 
-#     guarantee that the current interface number gets larger faster.
-#  3. If the library source code has changed at all since the last update, 
-#     then increment revision (`c:r:a' becomes `c:r+1:a').
-#  4. If any interfaces have been added, removed, or changed since the last 
-#     update, increment current, and set revision to 0.
-#  5. If any interfaces have been added since the last public release, then 
-#     increment age.
-#  6. If any interfaces have been removed since the last public release, then 
-#     set age to 0. 
-libdiscid_la_LDFLAGS = -version-info 3:2:3 -no-undefined
+# use a (well defined) version number, rather than version-info calculations
+libdiscid_la_LDFLAGS = -version-number @libdiscid_VERSION_LT@ -no-undefined
 
 EXTRA_DIST = base64.h sha1.h
+
+# for Windows Resource Files
+RCCOMPILE = $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) 
$(CPPFLAGS)
+LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RCCOMPILE)
+
+.rc.o:
+       $(RCCOMPILE) -i "$<" -o "$@"
+
+.rc.lo:
+       $(LTRCCOMPILE) -i "$<" -o "$@"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdiscid-0.3.2/src/disc.c new/libdiscid-0.4.1/src/disc.c
--- old/libdiscid-0.3.2/src/disc.c      2013-02-11 13:31:46.000000000 +0100
+++ new/libdiscid-0.4.1/src/disc.c      2013-03-08 17:51:26.000000000 +0100
@@ -247,6 +247,39 @@
   return disc->isrc[i];
 }
 
+int discid_has_feature(enum discid_feature feature) {
+       return mb_disc_has_feature_unportable(feature);
+}
+
+void discid_get_feature_list(char *features[DISCID_FEATURE_LENGTH]) {
+       int i;
+
+       /* for the code, the parameter is actually only a pointer */
+       memset(features, 0, sizeof(char *) * DISCID_FEATURE_LENGTH);
+       i = 0;
+
+       if (discid_has_feature(DISCID_FEATURE_READ)) {
+               features[i++] = DISCID_FEATURE_STR_READ;
+       }
+       if (discid_has_feature(DISCID_FEATURE_MCN)) {
+               features[i++] = DISCID_FEATURE_STR_MCN;
+       }
+       if (discid_has_feature(DISCID_FEATURE_ISRC)) {
+               features[i++] = DISCID_FEATURE_STR_ISRC;
+       }
+
+       return;
+}
+
+char *discid_get_version_string(void) {
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+       return PACKAGE_STRING;
+#else
+       return "";
+#endif
+}
+
 
 
 /****************************************************************************
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdiscid-0.3.2/src/disc_darwin.c new/libdiscid-0.4.1/src/disc_darwin.c
--- old/libdiscid-0.3.2/src/disc_darwin.c       2013-02-11 13:31:46.000000000 
+0100
+++ new/libdiscid-0.4.1/src/disc_darwin.c       2013-03-08 17:51:26.000000000 
+0100
@@ -44,6 +44,7 @@
 
 #include <CoreFoundation/CoreFoundation.h>
 
+#include "discid/discid.h"
 #include "discid/discid_private.h"
 
 #define TOC_BUFFER_LEN 2048
@@ -139,6 +140,17 @@
     }
 }
 
+int mb_disc_has_feature_unportable(enum discid_feature feature) {
+       switch(feature) {
+               case DISCID_FEATURE_READ:
+               case DISCID_FEATURE_MCN:
+               case DISCID_FEATURE_ISRC:
+                       return 1;
+               default:
+                       return 0;
+       }
+}
+
 
 char *mb_disc_get_default_device_unportable(void) 
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdiscid-0.3.2/src/disc_freebsd.c new/libdiscid-0.4.1/src/disc_freebsd.c
--- old/libdiscid-0.3.2/src/disc_freebsd.c      2013-02-11 13:31:46.000000000 
+0100
+++ new/libdiscid-0.4.1/src/disc_freebsd.c      2013-03-08 17:51:26.000000000 
+0100
@@ -25,16 +25,19 @@
 
 --------------------------------------------------------------------------- */
 #include <stdlib.h>
+#include <stdio.h>
 #include <string.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <assert.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
-#include <fcntl.h>
 #include <sys/cdio.h>
-#include <unistd.h>
-#include <assert.h>
+#include <arpa/inet.h>
 
 
+#include "discid/discid.h"
 #include "discid/discid_private.h"
 
 #define                CD_FRAMES               75 /* per second */
@@ -46,10 +49,6 @@
 #define XA_INTERVAL                    ((60 + 90 + 2) * CD_FRAMES)
 
 
-/* TODO: make sure it's available */
-int snprintf(char *str, size_t size, const char *format, ...);
-
-
 static int read_toc_header(int fd, int *first, int *last) {
        struct ioc_toc_header th;
        struct ioc_read_toc_single_entry te;
@@ -118,6 +117,15 @@
        return MB_DEFAULT_DEVICE;
 }
 
+int mb_disc_has_feature_unportable(enum discid_feature feature) {
+       switch(feature) {
+               case DISCID_FEATURE_READ:
+                       return 1;
+               default:
+                       return 0;
+       }
+}
+
 
 int mb_disc_read_unportable(mb_disc_private *disc, const char *device) {
        int fd;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdiscid-0.3.2/src/disc_generic.c new/libdiscid-0.4.1/src/disc_generic.c
--- old/libdiscid-0.3.2/src/disc_generic.c      1970-01-01 01:00:00.000000000 
+0100
+++ new/libdiscid-0.4.1/src/disc_generic.c      2013-03-08 17:51:26.000000000 
+0100
@@ -0,0 +1,43 @@
+/* --------------------------------------------------------------------------
+
+   MusicBrainz -- The Internet music metadatabase
+
+   Copyright (C) 2013 Johannes Dewender
+   
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+   
+   This library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+   
+   You should have received a copy of the GNU Lesser General Public
+   License along with this library; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
+
+--------------------------------------------------------------------------- */
+#include <stdio.h>
+
+#include "discid/discid.h"
+#include "discid/discid_private.h"
+
+
+char *mb_disc_get_default_device_unportable(void) {
+       return "";
+}
+
+
+int mb_disc_has_feature_unportable(enum discid_feature feature) {
+       return 0;
+}
+
+int mb_disc_read_unportable(mb_disc_private *disc, const char *device) {
+       snprintf(disc->error_msg, MB_ERROR_MSG_LENGTH,
+               "disc reading not implemented on this platform");
+       return 0;
+}
+
+/* EOF */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdiscid-0.3.2/src/disc_linux.c new/libdiscid-0.4.1/src/disc_linux.c
--- old/libdiscid-0.3.2/src/disc_linux.c        2013-02-11 13:31:46.000000000 
+0100
+++ new/libdiscid-0.4.1/src/disc_linux.c        2013-03-08 17:51:26.000000000 
+0100
@@ -24,20 +24,21 @@
      $Id$
 
 --------------------------------------------------------------------------- */
-#include <stdio.h>
 #include <stdlib.h>
+#include <stdio.h>
 #include <string.h>
+#include <fcntl.h>
+#include <assert.h>
+#include <errno.h>
+#include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
-#include <fcntl.h>
-#include <unistd.h>
 #include <linux/cdrom.h>
-#include <assert.h>
-#include <errno.h>
 #include <scsi/sg.h>
 
 
+#include "discid/discid.h"
 #include "discid/discid_private.h"
 
 
@@ -53,10 +54,6 @@
 #endif
 
 
-/* TODO: make sure it's available */
-int snprintf(char *str, size_t size, const char *format, ...);
-
-
 static int read_toc_header(int fd, int *first, int *last) {
        struct cdrom_tochdr th;
        struct cdrom_multisession ms;
@@ -129,15 +126,16 @@
        if(ioctl(fd, CDROM_GET_MCN, &mcn) == -1) {
                fprintf(stderr, "Warning: Unable to read the disc's media 
catalog number.\n");
        } else {
-               strncpy( disc->mcn, mcn.medium_catalog_number, MCN_STR_LENGTH );
+               strncpy( disc->mcn,
+                               (const char *)mcn.medium_catalog_number,
+                               MCN_STR_LENGTH );
        }
 }
 
 /* Send a scsi command and receive data. */
 static int scsi_cmd(int fd, unsigned char *cmd, int cmd_len,
-                   const char *data, int data_len) {
-       int device_fd;
-       char sense_buffer[SG_MAX_SENSE]; /* for "error situations" */
+                   unsigned char *data, int data_len) {
+       unsigned char sense_buffer[SG_MAX_SENSE]; /* for "error situations" */
        sg_io_hdr_t io_hdr;
 
        memset(&io_hdr, 0, sizeof io_hdr);
@@ -200,12 +198,23 @@
                        buffer[i] = data[9 + i];
                }
                buffer[ISRC_STR_LENGTH] = 0;
-               strncpy(disc->isrc[track_num], buffer, sizeof buffer);
+               strncpy(disc->isrc[track_num], buffer, ISRC_STR_LENGTH);
        }
        /* data[21:23] = zero, AFRAME, reserved */
 
 }
 
+int mb_disc_has_feature_unportable(enum discid_feature feature) {
+       switch(feature) {
+               case DISCID_FEATURE_READ:
+               case DISCID_FEATURE_MCN:
+               case DISCID_FEATURE_ISRC:
+                       return 1;
+               default:
+                       return 0;
+       }
+}
+
 
 int mb_disc_read_unportable(mb_disc_private *disc, const char *device) {
        int fd;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdiscid-0.3.2/src/disc_openbsd.c new/libdiscid-0.4.1/src/disc_openbsd.c
--- old/libdiscid-0.3.2/src/disc_openbsd.c      2013-02-11 13:31:46.000000000 
+0100
+++ new/libdiscid-0.4.1/src/disc_openbsd.c      2013-03-08 17:51:26.000000000 
+0100
@@ -35,6 +35,7 @@
 #include <string.h>
 #include <unistd.h>
 
+#include "discid/discid.h"
 #include "discid/discid_private.h"
 
 #define MB_DEFAULT_DEVICE   "/dev/rcd0c"
@@ -145,3 +146,13 @@
 {
     return MB_DEFAULT_DEVICE;
 }
+
+int
+mb_disc_has_feature_unportable(enum discid_feature feature) {
+       switch(feature) {
+               case DISCID_FEATURE_READ:
+                       return 1;
+               default:
+                       return 0;
+       }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdiscid-0.3.2/src/disc_solaris.c new/libdiscid-0.4.1/src/disc_solaris.c
--- old/libdiscid-0.3.2/src/disc_solaris.c      2013-02-11 13:31:46.000000000 
+0100
+++ new/libdiscid-0.4.1/src/disc_solaris.c      2013-03-08 17:51:26.000000000 
+0100
@@ -26,16 +26,18 @@
 
 --------------------------------------------------------------------------- */
 #include <stdlib.h>
+#include <stdio.h>
 #include <string.h>
+#include <fcntl.h>
+#include <assert.h>
+#include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/ioctl.h>
-#include <fcntl.h>
-#include <unistd.h>
 #include <sys/cdio.h>
-#include <assert.h>
 
 
+#include "discid/discid.h"
 #include "discid/discid_private.h"
 
 
@@ -45,10 +47,6 @@
 #define XA_INTERVAL            ((60 + 90 + 2) * CD_FRAMES)
 
 
-/* TODO: make sure it's available */
-int snprintf(char *str, size_t size, const char *format, ...);
-
-
 static int read_toc_header(int fd, int *first, int *last) {
        int ret;
        unsigned long ms_offset;
@@ -133,6 +131,15 @@
        return MB_DEFAULT_DEVICE;
 }
 
+int mb_disc_has_feature_unportable(enum discid_feature feature) {
+       switch(feature) {
+               case DISCID_FEATURE_READ:
+                       return 1;
+               default:
+                       return 0;
+       }
+}
+
 
 int mb_disc_read_unportable(mb_disc_private *disc, const char *device) {
        int fd;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdiscid-0.3.2/src/disc_win32_new.c 
new/libdiscid-0.4.1/src/disc_win32_new.c
--- old/libdiscid-0.3.2/src/disc_win32_new.c    2013-02-11 13:31:46.000000000 
+0100
+++ new/libdiscid-0.4.1/src/disc_win32_new.c    2013-03-08 17:51:26.000000000 
+0100
@@ -28,6 +28,7 @@
 #ifdef _MSC_VER
 #define snprintf _snprintf
 #endif
+#include "discid/discid.h"
 #include "discid/discid_private.h"
 
 #define CD_FRAMES     75
@@ -124,7 +125,8 @@
                fprintf(stderr, "Warning: Unable to read the disc's media 
catalog number.\n");
        }
        else {
-               strncpy(disc->mcn, data.MediaCatalog.MediaCatalog, 
MCN_STR_LENGTH);
+               strncpy(disc->mcn, (char *) data.MediaCatalog.MediaCatalog,
+                       MCN_STR_LENGTH);
        }
 }
 
@@ -145,10 +147,23 @@
                fprintf(stderr, "Warning: Unable to read the international 
standard recording code (ISRC) for track %i\n", track);
        }
        else {
-               strncpy(disc->isrc[track], data.TrackIsrc.TrackIsrc, 
ISRC_STR_LENGTH);
+               strncpy(disc->isrc[track], (char *) data.TrackIsrc.TrackIsrc,
+                       ISRC_STR_LENGTH);
        }
 }
 
+int mb_disc_has_feature_unportable(enum discid_feature feature) {
+       switch(feature) {
+               case DISCID_FEATURE_READ:
+               case DISCID_FEATURE_MCN:
+               case DISCID_FEATURE_ISRC:
+                       return 1;
+               default:
+                       return 0;
+       }
+}
+
+
 int mb_disc_read_unportable_nt(mb_disc_private *disc, const char *device)
 {
        HANDLE hDevice;
@@ -161,7 +176,8 @@
 
        strcpy(filename, "\\\\.\\");
        len = strlen(device);
-       if (colon = strchr(device, ':')) {
+       colon = strchr(device, ':');
+       if (colon) {
                len = colon - device + 1;
        }
        strncat(filename, device, len > 120 ? 120 : len);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libdiscid-0.3.2/versioninfo.rc.in new/libdiscid-0.4.1/versioninfo.rc.in
--- old/libdiscid-0.3.2/versioninfo.rc.in       1970-01-01 01:00:00.000000000 
+0100
+++ new/libdiscid-0.4.1/versioninfo.rc.in       2013-03-08 17:51:26.000000000 
+0100
@@ -0,0 +1,29 @@
+#include <Winver.h>
+
+#define VER_FILEVERSION                @libdiscid_VERSION_RC@
+#define VER_FILEVERSION_STR    "@VERSION@\0"
+
+#define VER_PRODUCTVERSION     @libdiscid_VERSION_RC@
+#define VER_PRODUCTVERSION_STR "@VERSION@\0"
+
+VS_VERSION_INFO        VERSIONINFO
+FILEVERSION    VER_FILEVERSION
+PRODUCTVERSION VER_PRODUCTVERSION
+FILEOS         VOS_NT
+FILETYPE       VFT_DLL
+BEGIN
+    BLOCK "StringFileInfo"
+    BEGIN
+        BLOCK "040904E4"       # = U.S. English, charset=Multilingual
+        BEGIN
+            VALUE "CompanyName",       "MetaBrainz Foundation\0"
+            VALUE "FileDescription",   "MusicBrainz disc ID library\0"
+            VALUE "FileVersion",       VER_FILEVERSION_STR
+            VALUE "InternalName",      "discid\0"
+            VALUE "LegalCopyright",    "2006-2013 MetaBrainz Foundation\0"
+            VALUE "OriginalFilename",  "discid.dll\0"
+            VALUE "ProductName",       "libdiscid\0"
+            VALUE "ProductVersion",    VER_PRODUCTVERSION_STR
+        END
+    END
+END

++++++ libdiscid-no-crypto.patch ++++++
--- /var/tmp/diff_new_pack.JEEuIa/_old  2013-03-10 08:23:20.000000000 +0100
+++ /var/tmp/diff_new_pack.JEEuIa/_new  2013-03-10 08:23:20.000000000 +0100
@@ -1,8 +1,8 @@
-diff --git a/src/Makefile.am b/src/Makefile.am
-index c8fbee3..62a27f5 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -21,13 +21,13 @@
+Index: libdiscid-0.4.1/src/Makefile.am
+===================================================================
+--- libdiscid-0.4.1.orig/src/Makefile.am
++++ libdiscid-0.4.1/src/Makefile.am
+@@ -20,7 +20,7 @@
  #
  lib_LTLIBRARIES = libdiscid.la
  
@@ -10,18 +10,11 @@
 +libdiscid_la_SOURCES = base64.c disc.c
  EXTRA_libdiscid_la_SOURCES = \
        disc_linux.c disc_win32.c disc_win32_new.c \
-       disc_darwin.c disc_freebsd.c disc_solaris.c disc_openbsd.c
- 
- AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include
--libdiscid_la_LIBADD = @DISC_OS_OBJ@
-+libdiscid_la_LIBADD = @DISC_OS_OBJ@ -lcrypto
- libdiscid_la_DEPENDENCIES = @DISC_OS_OBJ@
- 
- # Here are a set of rules to help you update your library version information:
-diff --git a/src/disc.c b/src/disc.c
-index f6cb3dd..d6de86b 100644
---- a/src/disc.c
-+++ b/src/disc.c
+       disc_darwin.c disc_freebsd.c disc_solaris.c disc_openbsd.c \
+Index: libdiscid-0.4.1/src/disc.c
+===================================================================
+--- libdiscid-0.4.1.orig/src/disc.c
++++ libdiscid-0.4.1/src/disc.c
 @@ -25,8 +25,8 @@
  --------------------------------------------------------------------------- */
  #include <string.h>
@@ -32,7 +25,7 @@
  #include "base64.h"
  
  #include "discid/discid.h"
-@@ -260,35 +260,38 @@ char* discid_get_track_isrc(DiscId *d, int i) {
+@@ -293,35 +293,38 @@ char *discid_get_version_string(void) {
   * The DiscID is placed in the provided string buffer.
   */
  static void create_disc_id(mb_disc_private *d, char buf[]) {
@@ -82,3 +75,16 @@
  }
  
  
+Index: libdiscid-0.4.1/configure.ac
+===================================================================
+--- libdiscid-0.4.1.orig/configure.ac
++++ libdiscid-0.4.1/configure.ac
+@@ -47,7 +47,7 @@ case "${host_cpu}-${host_os}" in
+   *-freebsd*) os=freebsd ;;
+   *-kfreebsd*) os=freebsd ;;
+   *-darwin*)  os=darwin; LIBS='-framework CoreFoundation -framework IOKit';;
+-  *-linux*)   os=linux ;;
++  *-linux*)   os=linux; LIBS='-lcrypto';;
+   *-netbsd*)  os=openbsd ;;
+   *-openbsd*) os=openbsd ;;
+   #*-os2_emx*) os=os2 ;;

++++++ libdiscid-visibility.patch ++++++
--- /var/tmp/diff_new_pack.JEEuIa/_old  2013-03-10 08:23:20.000000000 +0100
+++ /var/tmp/diff_new_pack.JEEuIa/_new  2013-03-10 08:23:20.000000000 +0100
@@ -1,10 +1,14 @@
-Index: libdiscid-0.3.2/configure.ac
+Index: libdiscid-0.4.1/configure.ac
 ===================================================================
---- libdiscid-0.3.2.orig/configure.ac
-+++ libdiscid-0.3.2/configure.ac
-@@ -46,8 +46,10 @@ AC_SUBST(DISC_OS_OBJ)
- 
- 
+--- libdiscid-0.4.1.orig/configure.ac
++++ libdiscid-0.4.1/configure.ac
+@@ -70,12 +70,11 @@ else
+ fi
+ AC_SUBST(DISC_OS_OBJ)
+ 
+-LT_INIT([win32-dll])
+-LT_LANG([Windows Resource])
+-
  dnl Checks for programs.
 -AC_PROG_CC
 -AM_PROG_LIBTOOL
@@ -15,7 +19,7 @@
  AC_SUBST(LIBTOOL_DEPS)  
  AC_PROG_INSTALL
  
-@@ -57,9 +59,44 @@ AC_C_BIGENDIAN
+@@ -84,9 +83,44 @@ AC_C_BIGENDIAN
  AC_CHECK_SIZEOF(long)
  
  
@@ -63,11 +67,11 @@
  
  
  AC_OUTPUT([
-Index: libdiscid-0.3.2/include/discid/discid.h
+Index: libdiscid-0.4.1/include/discid/discid.h
 ===================================================================
---- libdiscid-0.3.2.orig/include/discid/discid.h
-+++ libdiscid-0.3.2/include/discid/discid.h
-@@ -22,13 +22,7 @@
+--- libdiscid-0.4.1.orig/include/discid/discid.h
++++ libdiscid-0.4.1/include/discid/discid.h
+@@ -24,13 +24,7 @@
  #ifndef MUSICBRAINZ_DISC_ID_H
  #define MUSICBRAINZ_DISC_ID_H
  
@@ -82,13 +86,13 @@
  #     define LIBDISCID_API
  #endif
  
-Index: libdiscid-0.3.2/src/Makefile.am
+Index: libdiscid-0.4.1/src/Makefile.am
 ===================================================================
---- libdiscid-0.3.2.orig/src/Makefile.am
-+++ libdiscid-0.3.2/src/Makefile.am
+--- libdiscid-0.4.1.orig/src/Makefile.am
++++ libdiscid-0.4.1/src/Makefile.am
 @@ -26,7 +26,7 @@ EXTRA_libdiscid_la_SOURCES = \
-       disc_linux.c disc_win32.c disc_win32_new.c \
-       disc_darwin.c disc_freebsd.c disc_solaris.c disc_openbsd.c
+       disc_darwin.c disc_freebsd.c disc_solaris.c disc_openbsd.c \
+       disc_generic.c
  
 -AM_CPPFLAGS = -I$(top_srcdir)/include
 +AM_CPPFLAGS = -include $(top_builddir)/config.h -I$(top_srcdir)/include

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to