From edca3393380a0663fcebb31b29e8b746c59bee8a Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sun, 16 May 2010 09:07:42 +0000 Subject: [PATCH] Eventually including ../config.h generated by autotools --- cdrskin/cdrskin_timestamp.h | 2 +- libburn/async.c | 3 +++ libburn/cleanup.c | 4 ++++ libburn/crc.c | 27 +++++++++++++++++++++++++++ libburn/ddlpa.c | 4 ++++ libburn/debug.c | 4 ++++ libburn/drive.c | 4 ++++ libburn/ecma130ab.c | 4 ++++ libburn/file.c | 12 ++++++++++-- libburn/init.c | 4 ++++ libburn/libdax_audioxtr.c | 4 ++++ libburn/libdax_msgs.c | 4 ++++ libburn/mmc.c | 4 ++++ libburn/null.c | 4 ++++ libburn/options.c | 4 ++++ libburn/read.c | 4 ++++ libburn/sbc.c | 3 +++ libburn/sector.c | 3 +++ libburn/sg-dummy.c | 4 ++++ libburn/sg-freebsd-port.c | 4 ++++ libburn/sg-freebsd.c | 4 ++++ libburn/sg-libcdio.c | 4 ++++ libburn/sg-linux.c | 4 ++++ libburn/sg.c | 5 +++++ libburn/source.c | 4 ++++ libburn/spc.c | 5 ++++- libburn/structure.c | 4 ++++ libburn/toc.c | 4 ++++ libburn/util.c | 4 ++++ libburn/write.c | 4 ++++ 30 files changed, 144 insertions(+), 4 deletions(-) diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index dc111ed..427e77e 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2010.05.01.082808" +#define Cdrskin_timestamP "2010.05.16.090624" diff --git a/libburn/async.c b/libburn/async.c index bd2efc2..e75ad59 100644 --- a/libburn/async.c +++ b/libburn/async.c @@ -23,6 +23,9 @@ #define Libburn_detach_done_workeR 1 */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif #include "libburn.h" #include "transport.h" diff --git a/libburn/cleanup.c b/libburn/cleanup.c index 0b6eb65..f80e749 100644 --- a/libburn/cleanup.c +++ b/libburn/cleanup.c @@ -10,6 +10,10 @@ cc -g -o cleanup -DCleanup_standalonE cleanup.c */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #include #include #include diff --git a/libburn/crc.c b/libburn/crc.c index fddc5b4..10bcf69 100644 --- a/libburn/crc.c +++ b/libburn/crc.c @@ -1,5 +1,9 @@ /* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #include "crc.h" static unsigned short ccitt_table[256] = { @@ -104,6 +108,15 @@ unsigned long crc32_table[256] = { 0x71C0FC00L, 0xE151FD01L, 0xE0E1FE01L, 0x7070FF00L }; + +/* Exploration ts B00214 : + ECMA-130, 22.3.6 "CRC field" + Generating polynomial: x^16 + x^12 + x^5 + 1 + Also known as CRC-16-CCITT, CRC-CCITT + + Use in libburn for raw write modes in sector.c. + There is also disabled code in read.c which would use it. +*/ unsigned short crc_ccitt(unsigned char *q, int len) { unsigned short crc = 0; @@ -112,6 +125,20 @@ unsigned short crc_ccitt(unsigned char *q, int len) crc = ccitt_table[(crc >> 8 ^ *q++) & 0xff] ^ (crc << 8); return ~crc; } + + +/* Exploration ts B00214 : + ECMA-130, 14.3 "EDC field" + "The EDC codeword must be divisible by the check polynomial: + P(x) = (x^16 + x^15 + x^2 + 1) . (x^16 + x^2 + x + 1) + " + + >>> Test whether this coincides with CRC-32 IEEE 802.3 + x^32 + x^26 + x^23 + x^22 + x^16 + x^12 + x^11 + x^10 + + x^8 + x^7 + x^5 + x^4 + x^2 + x + 1 + + Used for raw writing in sector.c +*/ unsigned int crc_32(unsigned char *data, int len) { unsigned int crc = 0; diff --git a/libburn/ddlpa.c b/libburn/ddlpa.c index b58e021..a5d2002 100644 --- a/libburn/ddlpa.c +++ b/libburn/ddlpa.c @@ -22,6 +22,10 @@ */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #include #include #include diff --git a/libburn/debug.c b/libburn/debug.c index 439169f..0d27dca 100644 --- a/libburn/debug.c +++ b/libburn/debug.c @@ -4,6 +4,10 @@ Provided under GPL version 2 or later. */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #ifdef WIN32 #include diff --git a/libburn/drive.c b/libburn/drive.c index 2788abf..bb5541e 100644 --- a/libburn/drive.c +++ b/libburn/drive.c @@ -6,6 +6,10 @@ */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #include #include diff --git a/libburn/ecma130ab.c b/libburn/ecma130ab.c index 8fc0845..7b9c6f6 100644 --- a/libburn/ecma130ab.c +++ b/libburn/ecma130ab.c @@ -1,6 +1,10 @@ /* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + /* ts A91016 : libburn/ecma130ab.c is the replacement for old libburn/lec.c Copyright 2009, Thomas Schmitt , libburnia-project.org diff --git a/libburn/file.c b/libburn/file.c index 7340aba..a5286b0 100644 --- a/libburn/file.c +++ b/libburn/file.c @@ -6,6 +6,10 @@ */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #include #include @@ -399,9 +403,13 @@ int burn_fifo_source_shoveller(struct burn_source *source, int flag) else ret = fs->inp->read_xt( fs->inp, (unsigned char *) bufpt, fs->inp_read_size); - if (ret == 0) + if (ret == 0) { + + /* >>> ??? ts B00326 */ + /* >>> report EOF of fifo input and fs->in_counter */; + break; /* EOF */ - else if (ret < 0) { + } else if (ret < 0) { libdax_msgs_submit(libdax_messenger, -1, 0x00020153, LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH, "Read error on fifo input", errno, 0); diff --git a/libburn/init.c b/libburn/init.c index 904f68f..4dff16e 100644 --- a/libburn/init.c +++ b/libburn/init.c @@ -5,6 +5,10 @@ Provided under GPL version 2 or later. */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #include diff --git a/libburn/libdax_audioxtr.c b/libburn/libdax_audioxtr.c index 0850907..5901d96 100644 --- a/libburn/libdax_audioxtr.c +++ b/libburn/libdax_audioxtr.c @@ -4,6 +4,10 @@ Copyright (C) 2006 Thomas Schmitt , provided under GPLv2+ */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #include #include #include diff --git a/libburn/libdax_msgs.c b/libburn/libdax_msgs.c index 99e7fb3..28bbb9a 100644 --- a/libburn/libdax_msgs.c +++ b/libburn/libdax_msgs.c @@ -5,6 +5,10 @@ provided under GPL version 2 or later. */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #include #include #include diff --git a/libburn/mmc.c b/libburn/mmc.c index f907c13..59b6292 100644 --- a/libburn/mmc.c +++ b/libburn/mmc.c @@ -5,6 +5,10 @@ Provided under GPL version 2 or later. */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + /* ts A61009 */ /* #include */ diff --git a/libburn/null.c b/libburn/null.c index 2f2f1be..278d360 100644 --- a/libburn/null.c +++ b/libburn/null.c @@ -5,6 +5,10 @@ */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #include "null.h" #include "libburn.h" #include diff --git a/libburn/options.c b/libburn/options.c index d98396b..4b4aa61 100644 --- a/libburn/options.c +++ b/libburn/options.c @@ -4,6 +4,10 @@ Provided under GPL version 2 or later. */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #include "libburn.h" #include "options.h" #include "drive.h" diff --git a/libburn/read.c b/libburn/read.c index a5a737f..5840f34 100644 --- a/libburn/read.c +++ b/libburn/read.c @@ -5,6 +5,10 @@ Provided under GPL version 2 or later. */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + /* #include ts A61013 : not in GNU/Linux man 3 malloc */ diff --git a/libburn/sbc.c b/libburn/sbc.c index c363e49..c3cef04 100644 --- a/libburn/sbc.c +++ b/libburn/sbc.c @@ -7,6 +7,9 @@ Provided under GPL version 2 or later. */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif #include #include diff --git a/libburn/sector.c b/libburn/sector.c index dc2ac7d..c5e3660 100644 --- a/libburn/sector.c +++ b/libburn/sector.c @@ -5,6 +5,9 @@ Provided under GPL version 2 or later. */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif #include diff --git a/libburn/sg-dummy.c b/libburn/sg-dummy.c index 113d5f5..013b54c 100644 --- a/libburn/sg-dummy.c +++ b/libburn/sg-dummy.c @@ -5,6 +5,10 @@ Provided under GPL version 2 or later. */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + /* diff --git a/libburn/sg-freebsd-port.c b/libburn/sg-freebsd-port.c index 1b4e254..1270192 100644 --- a/libburn/sg-freebsd-port.c +++ b/libburn/sg-freebsd-port.c @@ -95,6 +95,10 @@ Send feedback to libburn-hackers@pykix.org . */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + /** PORTING : ------- OS dependent headers and definitions ------ */ diff --git a/libburn/sg-freebsd.c b/libburn/sg-freebsd.c index bc67218..25a2392 100644 --- a/libburn/sg-freebsd.c +++ b/libburn/sg-freebsd.c @@ -5,6 +5,10 @@ Provided under GPL version 2 or later. */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #include #include #include diff --git a/libburn/sg-libcdio.c b/libburn/sg-libcdio.c index 8c4bf04..bc69401 100644 --- a/libburn/sg-libcdio.c +++ b/libburn/sg-libcdio.c @@ -94,6 +94,10 @@ Send feedback to libburn-hackers@pykix.org . */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + /** PORTING : ------- OS dependent headers and definitions ------ */ diff --git a/libburn/sg-linux.c b/libburn/sg-linux.c index 61c3bac..5cf7eff 100644 --- a/libburn/sg-linux.c +++ b/libburn/sg-linux.c @@ -104,6 +104,10 @@ Hint: You should also look into sg-freebsd-port.c, which is a younger and */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + /** PORTING : ------- OS dependent headers and definitions ------ */ diff --git a/libburn/sg.c b/libburn/sg.c index db2f2f9..e855b39 100644 --- a/libburn/sg.c +++ b/libburn/sg.c @@ -4,6 +4,11 @@ Copyright (C) 2009 Thomas Schmitt , provided under GPLv2+ */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#undef HAVE_CONFIG_H +#endif + #ifdef Libburn_use_libcdiO diff --git a/libburn/source.c b/libburn/source.c index 9cd6356..e0566f7 100644 --- a/libburn/source.c +++ b/libburn/source.c @@ -5,6 +5,10 @@ Provided under GPL version 2 or later. */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #include #include diff --git a/libburn/spc.c b/libburn/spc.c index 1418edb..93ff05c 100644 --- a/libburn/spc.c +++ b/libburn/spc.c @@ -5,9 +5,12 @@ Provided under GPL version 2 or later. */ - /* scsi primary commands */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #include #include #include diff --git a/libburn/structure.c b/libburn/structure.c index bc64278..d05acf7 100644 --- a/libburn/structure.c +++ b/libburn/structure.c @@ -4,6 +4,10 @@ Provided under GPL version 2 or later. */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + /* ts A61008 */ /* #include */ diff --git a/libburn/toc.c b/libburn/toc.c index a7024dc..1195a7c 100644 --- a/libburn/toc.c +++ b/libburn/toc.c @@ -5,6 +5,10 @@ */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + /* ts A61008 */ /* #include */ diff --git a/libburn/util.c b/libburn/util.c index 082ebce..0de4908 100644 --- a/libburn/util.c +++ b/libburn/util.c @@ -4,6 +4,10 @@ Provided under GPL version 2 or later. */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #include /* ts A61008 */ diff --git a/libburn/write.c b/libburn/write.c index 9bdccd7..778b7e5 100644 --- a/libburn/write.c +++ b/libburn/write.c @@ -6,6 +6,10 @@ */ +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #include #include