Making optional use of statvfs() in sg-dummy
This commit is contained in:
parent
90e6740611
commit
11e69fa320
@ -1 +1 @@
|
|||||||
#define Cdrskin_timestamP "2009.03.02.200132"
|
#define Cdrskin_timestamP "2009.03.03.092057"
|
||||||
|
@ -162,6 +162,16 @@ TARGET_SHIZZLE
|
|||||||
AC_SUBST(ARCH)
|
AC_SUBST(ARCH)
|
||||||
AC_SUBST(LIBBURN_ARCH_LIBS)
|
AC_SUBST(LIBBURN_ARCH_LIBS)
|
||||||
|
|
||||||
|
dnl ts A90303
|
||||||
|
dnl Check the preconditions for using statvfs() in sg-dummy
|
||||||
|
dnl (sg-linux and sg-freebsd use statvfs() unconditionally)
|
||||||
|
STATVFS_DEF=-DLibburn_os_has_statvfS
|
||||||
|
AC_CHECK_HEADER(sys/statvfs.h, X=, STATVFS_DEF=)
|
||||||
|
AC_CHECK_FUNC([statvfs], X=, STATVFS_DEF=)
|
||||||
|
dnl If this would be done more specifically in Makefile.am
|
||||||
|
dnl via libburn_libburn_la_CFLAGS then undesired .o file names would emerge
|
||||||
|
CFLAGS="$CFLAGS $STATVFS_DEF"
|
||||||
|
|
||||||
dnl Add compiler-specific flags
|
dnl Add compiler-specific flags
|
||||||
|
|
||||||
dnl See if the user wants aggressive optimizations of the code
|
dnl See if the user wants aggressive optimizations of the code
|
||||||
|
@ -20,6 +20,10 @@ Present implementation: default dummy which enables libburn only to work
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#ifdef Libburn_os_has_statvfS
|
||||||
|
#include <sys/statvfs.h>
|
||||||
|
#endif /* Libburn_os_has_stavtfS */
|
||||||
|
|
||||||
#include "transport.h"
|
#include "transport.h"
|
||||||
#include "drive.h"
|
#include "drive.h"
|
||||||
#include "sg.h"
|
#include "sg.h"
|
||||||
@ -34,7 +38,6 @@ Present implementation: default dummy which enables libburn only to work
|
|||||||
extern struct libdax_msgs *libdax_messenger;
|
extern struct libdax_msgs *libdax_messenger;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** Returns the next index number and the next enumerated drive address.
|
/** Returns the next index number and the next enumerated drive address.
|
||||||
The enumeration has to cover all available and accessible drives. It is
|
The enumeration has to cover all available and accessible drives. It is
|
||||||
allowed to return addresses of drives which are not available but under
|
allowed to return addresses of drives which are not available but under
|
||||||
@ -165,7 +168,6 @@ int burn_os_stdio_capacity(char *path, off_t *bytes)
|
|||||||
|
|
||||||
#ifdef Libburn_os_has_statvfS
|
#ifdef Libburn_os_has_statvfS
|
||||||
struct statvfs vfsbuf;
|
struct statvfs vfsbuf;
|
||||||
int open_mode = O_RDONLY, fd, ret;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char testpath[4096], *cpt;
|
char testpath[4096], *cpt;
|
||||||
|
Loading…
Reference in New Issue
Block a user