Fixes for Mingw+MSYS and DLL support from Carlo Bramini
* configure.ac: Added AC_LIBTOOL_WIN32_DLL for enabling the creation of shared libraries. * configure.ac: Added -I$(top_srcdir)/include to LIBCDIO_CFLAGS, it allows to build outside the source tree. * configure.ac: Added LT_NO_UNDEFINED for adding '-no-undefined' switch to libtool when building win32 shared libraries. * configure.ac: Check for Windows.h presence if under Mingw (included for using Sleep() function). * configure.ac: Check for more missing functions: setenv(), unsetenv(), sleep(), gmtime_r(), localtime_r(). * example/cdchange.c: If sleep() function does not exist, it tries to emulate it with a similar code (require inclusion of Windows.h) * src/cddb.c: * lib/cdda_interface/scsi_interface.c: Compilation fails because u_int32_t is undefined. It has been changed to uint32_t to be compliant to all other parts of the libraries. * lib/cdda_interface/Makefile.am: * lib/iso9660/Makefile.am: * lib/cdio++/Makefile.am: * lib/paranoia/Makefile.am: * lib/udf/Makefile.am: * lib/driver/Makefile.am: added LT_NO_UNDEFINED to libtool flags. * lib/iso9660/iso9660.c: Added replacements for setenv(), unsetenv(), gmtime_r\ (), localtime_r().
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $Id: Makefile.am,v 1.14 2008/06/13 19:26:22 flameeyes Exp $
|
||||
# $Id: Makefile.am,v 1.15 2008/06/25 08:01:53 rocky Exp $
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2006, 2007, 2008 Rocky Bernstein <rocky@gnu.org>
|
||||
#
|
||||
@@ -57,7 +57,7 @@ libcdio_cdda_sources = common_interface.c cddap_interface.c interface.c \
|
||||
lib_LTLIBRARIES = libcdio_cdda.la
|
||||
|
||||
libcdio_cdda_la_SOURCES = $(libcdio_cdda_sources)
|
||||
libcdio_cdda_la_ldflags = -version-info $(libcdio_cdda_la_CURRENT):$(libcdio_cdda_la_REVISION):$(libcdio_cdda_la_AGE)
|
||||
libcdio_cdda_la_ldflags = -version-info $(libcdio_cdda_la_CURRENT):$(libcdio_cdda_la_REVISION):$(libcdio_cdda_la_AGE) @LT_NO_UNDEFINED@
|
||||
|
||||
INCLUDES = $(LIBCDIO_CFLAGS)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: scsi_interface.c,v 1.4 2008/06/13 19:26:23 flameeyes Exp $
|
||||
$Id: scsi_interface.c,v 1.5 2008/06/25 08:01:53 rocky Exp $
|
||||
|
||||
Copyright (C) 2004, 2008 Rocky Bernstein <rocky@gnu.org>
|
||||
Original interface.c Copyright (C) 1994-1997
|
||||
@@ -575,7 +575,7 @@ scsi_read_toc (cdrom_drive_t *d)
|
||||
static int
|
||||
scsi_read_toc2 (cdrom_drive_t *d)
|
||||
{
|
||||
u_int32_t foo,bar;
|
||||
uint32_t foo,bar;
|
||||
|
||||
int i;
|
||||
track_t i_tracks;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: Makefile.am,v 1.8 2008/03/20 19:02:38 karl Exp $
|
||||
# $Id: Makefile.am,v 1.9 2008/06/25 08:01:54 rocky Exp $
|
||||
#
|
||||
# Copyright (C) 2005, 2006, 2007, 2008 Rocky Bernstein <rocky@gnu.org>
|
||||
#
|
||||
@@ -50,7 +50,7 @@ libcdiopp_la_AGE = 0
|
||||
libcdiopp_sources = cdio.cpp devices.cpp
|
||||
|
||||
libcdio___la_SOURCES = $(libcdiopp_sources)
|
||||
libcdio___la_ldflags = -version-info $(libcdiopp_la_CURRENT):$(libcdiopp_la_REVISION):$(libcdiopp_la_AGE)
|
||||
libcdio___la_ldflags = -version-info $(libcdiopp_la_CURRENT):$(libcdiopp_la_REVISION):$(libcdiopp_la_AGE) @LT_NO_UNDEFINED@
|
||||
|
||||
libiso9660pp_la_CURRENT = 0
|
||||
libiso9660pp_la_REVISION = 0
|
||||
@@ -59,6 +59,6 @@ libiso9660pp_la_AGE = 0
|
||||
libiso9660pp_sources = iso9660.cpp
|
||||
|
||||
libiso9660___la_SOURCES = $(libiso9660pp_sources)
|
||||
libiso9660___la_ldflags = -version-info $(libiso9660pp_la_CURRENT):$(libiso9660pp_la_REVISION):$(libiso9660pp_la_AGE)
|
||||
libiso9660___la_ldflags = -version-info $(libiso9660pp_la_CURRENT):$(libiso9660pp_la_REVISION):$(libiso9660pp_la_AGE) @LT_NO_UNDEFINED@
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include/
|
||||
INCLUDES = -I$(top_srcdir)/include/ -I$(top_builddir)/include
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: Makefile.am,v 1.16 2008/03/20 19:02:38 karl Exp $
|
||||
# $Id: Makefile.am,v 1.17 2008/06/25 08:01:54 rocky Exp $
|
||||
#
|
||||
# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
|
||||
# Rocky Bernstein <rocky@gnu.org>
|
||||
@@ -66,7 +66,7 @@ libiso9660_la_SOURCES = \
|
||||
xa.c
|
||||
|
||||
libiso9660_la_LIBADD = @LIBCDIO_LIBS@
|
||||
libiso9660_la_ldflags = -version-info $(libiso9660_la_CURRENT):$(libiso9660_la_REVISION):$(libiso9660_la_AGE)
|
||||
libiso9660_la_ldflags = -version-info $(libiso9660_la_CURRENT):$(libiso9660_la_REVISION):$(libiso9660_la_AGE) @LT_NO_UNDEFINED@
|
||||
libiso9660_la_dependencies = libcdio.la
|
||||
|
||||
INCLUDES = $(LIBCDIO_CFLAGS)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
$Id: iso9660.c,v 1.40 2008/06/03 08:40:15 rocky Exp $
|
||||
$Id: iso9660.c,v 1.41 2008/06/25 08:01:54 rocky Exp $
|
||||
|
||||
Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008
|
||||
Rocky Bernstein <rocky@gnu.org>
|
||||
@@ -57,6 +57,22 @@ const char ISO_STANDARD_ID[] = {'C', 'D', '0', '0', '1'};
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SETENV
|
||||
static int
|
||||
setenv(const char *envname, const char *envval, int overwrite)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_UNSETENV
|
||||
static int
|
||||
unsetenv(const char *envname)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_TIMEGM
|
||||
static time_t
|
||||
timegm(struct tm *tm)
|
||||
@@ -77,7 +93,35 @@ timegm(struct tm *tm)
|
||||
}
|
||||
#endif
|
||||
|
||||
static const char _rcsid[] = "$Id: iso9660.c,v 1.40 2008/06/03 08:40:15 rocky Exp $";
|
||||
#ifndef HAVE_GMTIME_R
|
||||
static struct tm *
|
||||
gmtime_r(const time_t *timer, struct tm *result)
|
||||
{
|
||||
struct tm *tmp = gmtime(timer);
|
||||
|
||||
if (tmp) {
|
||||
*result = *tmp;
|
||||
return result;
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_LOCALTIME_R
|
||||
static struct tm *
|
||||
localtime_r(const time_t *timer, struct tm *result)
|
||||
{
|
||||
struct tm *tmp = localtime(timer);
|
||||
|
||||
if (tmp) {
|
||||
*result = *tmp;
|
||||
return result;
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
#endif
|
||||
|
||||
static const char _rcsid[] = "$Id: iso9660.c,v 1.41 2008/06/25 08:01:54 rocky Exp $";
|
||||
|
||||
/* Variables to hold debugger-helping enumerations */
|
||||
enum iso_enum1_s iso_enums1;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: Makefile.am,v 1.8 2008/03/20 19:02:38 karl Exp $
|
||||
# $Id: Makefile.am,v 1.9 2008/06/25 08:01:54 rocky Exp $
|
||||
#
|
||||
# Copyright (C) 2004, 2006, 2008 Rocky Bernstein <rocky@gnu.org>
|
||||
#
|
||||
@@ -56,7 +56,7 @@ libcdio_paranoia_sources = gap.c isort.c overlap.c overlap.h \
|
||||
lib_LTLIBRARIES = libcdio_paranoia.la
|
||||
|
||||
libcdio_paranoia_la_SOURCES = $(libcdio_paranoia_sources)
|
||||
libcdio_paranoia_la_ldflags = -version-info $(libcdio_paranoia_la_CURRENT):$(libcdio_paranoia_la_REVISION):$(libcdio_paranoia_la_AGE)
|
||||
libcdio_paranoia_la_ldflags = -version-info $(libcdio_paranoia_la_CURRENT):$(libcdio_paranoia_la_REVISION):$(libcdio_paranoia_la_AGE) @LT_NO_UNDEFINED@
|
||||
|
||||
INCLUDES = $(LIBCDIO_CFLAGS)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# $Id: Makefile.am,v 1.8 2008/03/20 19:02:38 karl Exp $
|
||||
# $Id: Makefile.am,v 1.9 2008/06/25 08:01:54 rocky Exp $
|
||||
#
|
||||
# Copyright (C) 2003, 2004, 2006, 2008 Rocky Bernstein <rocky@gnu.org>
|
||||
#
|
||||
@@ -53,6 +53,6 @@ lib_LTLIBRARIES = libudf.la
|
||||
|
||||
libudf_la_SOURCES = udf.c udf_file.c udf_fs.c udf_time.c filemode.c
|
||||
|
||||
libudf_la_LIBADD = @LIBCDIO_LIBS@
|
||||
libudf_la_LIBADD = @LIBCDIO_LIBS@ @LT_NO_UNDEFINED@
|
||||
|
||||
INCLUDES = $(LIBCDIO_CFLAGS)
|
||||
|
||||
Reference in New Issue
Block a user