Add --with-versioned-libs for libcdio_paranioa and libcdio_cdda Remove

use of "new" even in private C parts. Changes and patch from Nicholas
Boullis.
This commit is contained in:
rocky
2005-09-20 00:42:14 +00:00
parent e2ceddbb4d
commit d8826d36a2
11 changed files with 245 additions and 50 deletions

View File

@@ -1,4 +1,4 @@
# $Id: Makefile.am,v 1.8 2005/09/17 20:57:19 rocky Exp $
# $Id: Makefile.am,v 1.9 2005/09/20 00:42:14 rocky Exp $
#
# Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
#
@@ -136,8 +136,9 @@ libiso9660_la_DEPENDENCIES = $(libcdio9660_la_dependencies) libiso9660.la.ver
libiso9660.la.ver: $(libiso9660_la_OBJECTS) $(srcdir)/libiso9660.sym
echo 'ISO9660_$(libiso9660_la_MAJOR) {' > $@
nm $(patsubst %.lo,%.o,$(libiso9660_la_OBJECTS)) | sed -n -e 's/^.*[ ][ABCDGIRSTW][ABCDGIRSTW]*[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$$/\1/p' | sort -u | { first=true; while read symbol; do if grep -q "^$${symbol}\$$" $(srcdir)/libiso9660.sym; then if test $$first = true; then echo " global:"; first=false; fi; echo " $${symbol};"; fi; done; } >> $@
nm $(patsubst %.lo,%.o,$(libiso9660_la_OBJECTS)) | sed -n -e 's/^.*[ ][ABCDGIRSTW][ABCDGIRSTW]*[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$$/\1/p' | sort -u | { first=true; while read symbol; do if grep -q "^$${symbol}\$$" $(srcdir)/libiso9660.sym; then :; else if test $$first = true; then echo " local:"; first=false; fi; echo " $${symbol};"; fi; done; } >> $@
objs=`for obj in $(libiso9660_la_OBJECTS); do sed -ne "s/^pic_object='\(.*\)'$$/\1/p" $$obj; done`; \
nm $${objs} | sed -n -e 's/^.*[ ][ABCDGIRSTW][ABCDGIRSTW]*[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$$/\1/p' | sort -u | { first=true; while read symbol; do if grep -q "^$${symbol}\$$" $(srcdir)/libiso9660.sym; then if test $$first = true; then echo " global:"; first=false; fi; echo " $${symbol};"; fi; done; } >> $@; \
nm $${objs} | sed -n -e 's/^.*[ ][ABCDGIRSTW][ABCDGIRSTW]*[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$$/\1/p' | sort -u | { first=true; while read symbol; do if grep -q "^$${symbol}\$$" $(srcdir)/libiso9660.sym; then :; else if test $$first = true; then echo " local:"; first=false; fi; echo " $${symbol};"; fi; done; } >> $@
echo '};' >> $@
MOSTLYCLEANFILES = libiso9660.la.ver

View File

@@ -1,5 +1,5 @@
/*
$Id: iso9660.c,v 1.13 2005/03/03 10:32:01 rocky Exp $
$Id: iso9660.c,v 1.14 2005/09/20 00:42:14 rocky Exp $
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
@@ -48,7 +48,7 @@ const char ISO_STANDARD_ID[] = {'C', 'D', '0', '0', '1'};
#include <errno.h>
#endif
static const char _rcsid[] = "$Id: iso9660.c,v 1.13 2005/03/03 10:32:01 rocky Exp $";
static const char _rcsid[] = "$Id: iso9660.c,v 1.14 2005/09/20 00:42:14 rocky Exp $";
/* Variables to hold debugger-helping enumerations */
enum iso_enum1_s iso_enums1;
@@ -301,14 +301,15 @@ iso9660_name_translate(const char *psz_old, char *psz_new)
The length of the translated string is returned.
*/
int
iso9660_name_translate_ext(const char *old, char *new, uint8_t i_joliet_level)
iso9660_name_translate_ext(const char *psz_oldname, char *psz_newname,
uint8_t i_joliet_level)
{
int len = strlen(old);
int len = strlen(psz_oldname);
int i;
if (0 == len) return 0;
for (i = 0; i < len; i++) {
unsigned char c = old[i];
unsigned char c = psz_oldname[i];
if (!c)
break;
@@ -316,20 +317,21 @@ iso9660_name_translate_ext(const char *old, char *new, uint8_t i_joliet_level)
if (!i_joliet_level && isupper(c)) c = tolower(c);
/* Drop trailing '.;1' (ISO 9660:1988 7.5.1 requires period) */
if (c == '.' && i == len - 3 && old[i + 1] == ';' && old[i + 2] == '1')
if (c == '.' && i == len - 3
&& psz_oldname[i + 1] == ';' && psz_oldname[i + 2] == '1')
break;
/* Drop trailing ';1' */
if (c == ';' && i == len - 2 && old[i + 1] == '1')
if (c == ';' && i == len - 2 && psz_oldname[i + 1] == '1')
break;
/* Convert remaining ';' to '.' */
if (c == ';')
c = '.';
new[i] = c;
psz_newname[i] = c;
}
new[i] = '\0';
psz_newname[i] = '\0';
return i;
}
@@ -453,7 +455,8 @@ iso9660_set_evd(void *pd)
memset(&ied, 0, sizeof(ied));
ied.type = to_711(ISO_VD_END);
iso9660_strncpy_pad (ied.id, ISO_STANDARD_ID, sizeof(ied.id), ISO9660_DCHARS);
iso9660_strncpy_pad (ied.id, ISO_STANDARD_ID, sizeof(ied.id),
ISO9660_DCHARS);
ied.version = to_711(ISO_VERSION);
memcpy(pd, &ied, sizeof(ied));