2006-10-13 10:22:21 +00:00
|
|
|
|
2006-11-16 11:17:55 +00:00
|
|
|
/* sg.c
|
|
|
|
Switcher for operating system dependent transport level modules of libburn.
|
2010-06-07 17:30:54 +00:00
|
|
|
Copyright (C) 2009 - 2010 Thomas Schmitt <scdbackup@gmx.net>,
|
|
|
|
provided under GPLv2+
|
2006-11-16 11:17:55 +00:00
|
|
|
*/
|
|
|
|
|
2010-05-16 09:07:42 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "../config.h"
|
|
|
|
#undef HAVE_CONFIG_H
|
|
|
|
#endif
|
|
|
|
|
2006-10-13 10:22:21 +00:00
|
|
|
|
2010-06-07 17:30:54 +00:00
|
|
|
#ifdef Libburn_use_sg_dummY
|
|
|
|
|
|
|
|
#include "sg-dummy.c"
|
|
|
|
|
|
|
|
#else
|
2009-12-19 14:34:48 +00:00
|
|
|
#ifdef Libburn_use_libcdiO
|
|
|
|
|
|
|
|
#include "sg-libcdio.c"
|
|
|
|
|
|
|
|
#else
|
2006-10-13 10:22:21 +00:00
|
|
|
#ifdef __FreeBSD__
|
|
|
|
|
|
|
|
#include "sg-freebsd.c"
|
|
|
|
|
2009-12-29 13:31:56 +00:00
|
|
|
#else
|
|
|
|
#ifdef __FreeBSD_kernel__
|
|
|
|
|
|
|
|
#include "sg-freebsd.c"
|
|
|
|
|
2006-10-13 10:22:21 +00:00
|
|
|
#else
|
2009-03-02 17:01:21 +00:00
|
|
|
#ifdef __linux
|
2006-10-13 10:22:21 +00:00
|
|
|
|
|
|
|
#include "sg-linux.c"
|
|
|
|
|
2010-06-07 17:30:54 +00:00
|
|
|
#else
|
|
|
|
#ifdef __sun
|
|
|
|
|
|
|
|
#include "sg-solaris.c"
|
|
|
|
|
2009-03-02 17:01:21 +00:00
|
|
|
#else
|
|
|
|
|
2009-03-02 20:01:37 +00:00
|
|
|
/* The dummy adapter formally fulfills the expectations of libburn towards
|
|
|
|
its SCSI command transport. It will show no drives and perform no SCSI
|
|
|
|
commands.
|
|
|
|
libburn will then be restricted to using its stdio pseudo drives.
|
|
|
|
*/
|
|
|
|
static int intentional_compiler_warning(void)
|
|
|
|
{
|
|
|
|
int INTENTIONAL_COMPILER_WARNING_;
|
2010-02-12 21:26:46 +00:00
|
|
|
int Cannot_recognize_GNU_Linux_nor_FreeBSD_;
|
2009-03-02 20:01:37 +00:00
|
|
|
int Have_to_use_dummy_MMC_transport_adapter_;
|
|
|
|
int This_libburn_will_not_be_able_to_operate_on_real_CD_drives;
|
|
|
|
int Have_to_use_dummy_MMC_transport_adapter;
|
2010-02-12 21:26:46 +00:00
|
|
|
int Cannot_recognize_GNU_Linux_nor_FreeBSD;
|
2009-03-02 20:01:37 +00:00
|
|
|
int INTENTIONAL_COMPILER_WARNING;
|
|
|
|
|
|
|
|
return(0);
|
|
|
|
}
|
|
|
|
|
2009-03-02 17:01:21 +00:00
|
|
|
#include "sg-dummy.c"
|
|
|
|
|
2010-06-07 17:30:54 +00:00
|
|
|
#endif /* ! __sun */
|
2009-03-02 17:01:21 +00:00
|
|
|
#endif /* ! __linux */
|
2009-12-29 13:31:56 +00:00
|
|
|
#endif /* ! __FreeBSD_kernel__ */
|
2009-03-02 17:01:21 +00:00
|
|
|
#endif /* ! __FreeBSD__ */
|
2009-12-19 14:34:48 +00:00
|
|
|
#endif /* ! Libburn_use_libcdiO */
|
2010-06-07 17:30:54 +00:00
|
|
|
#endif /* ! Libburn_use_sg_dummY */
|
2006-10-13 10:22:21 +00:00
|
|
|
|